Specifying user inputs when using wine in a single command

Questions about Wine on Linux
Locked
hilarych
Newbie
Newbie
Posts: 2
Joined: Sun May 07, 2023 10:02 pm

Specifying user inputs when using wine in a single command

Post by hilarych »

I want to execute a program XXX.exe using wine and then enter YYY when the program asks for keyboard inputs.
I can do this using the following steps:

Code: Select all

wine XXX.exe 
The program then asks:

Code: Select all

Enter YYY or ZZZ:
and I enter:

Code: Select all

YYY
as input.

How can I put the two steps in a single command? I tried

Code: Select all

wine XXX.exe < YYY
but it does not work... :( I want to write it in a single line so I can execute the line in Python using os.system('wine ....').
hilarych
Newbie
Newbie
Posts: 2
Joined: Sun May 07, 2023 10:02 pm

Re: Specifying user inputs when using wine in a single command

Post by hilarych »

This works:

Code: Select all

echo YYY | wine XXX.exe
Problem solved! :)
Locked