Want script to open terminal
I'm doing a program (OS X) that needs to open a terminal then issue a command:
"adb -s ipaddress:5555 shell" where the ipaddress is variable depending on what android device is connected. Terminal.app can't accept arguments, so I'm trying a bash script:
/Applications/adbfire/adb -s $1 shell
daddr = "192.168.1.1:5555"
cstring = "/Applications/adbFire/startadb.command";
QProcess::startDetached(cstring,QStringList() << daddr);
I need the startDetached to open a terminal, then run the code. Now it sends activity to Application output. Can I make startDetached act as if I double-clicked the file: open a term to run it?
You are trying start two external process at a time. You can try the following.
- Use the 'system' api to start the external command. Try whether this helps.
- You can start the external process as terminal. This process is treated like I/O device. Redirect the stdin/out of external process and write what you want from Qt process.
See if any of these help you.
Thanks, I'll try this out.