Problems with Open-Source Downloads read and

QT & AppleScript

  • The OS X version of my QT program needs to open with multiple arguments. Since doesn't take arguments, My best guess is to use AppleScript to simulate that. What I'm looking for is for Terminal to open an adb shell session against a specific device. Doing it manually from a console you'd see something like this:

    $ adb -s mydevice:5555 shell (This opens up a ssh like connection to an android device.)

    How can I pass this to using Applescript? I can open with startDetached running an AppleScript with hardcoded values:

    tell application "Terminal"
    set shell to do script "/Applications/myapp/adb shell" in window 1
    end tell

    But I've no success passing multiple arguments. Someone suggested using a bash script, but calling a bash script with startDetached does not open up a console for interaction. Is there another way for QT to accomplish what I need? This operation is easy-peasy using QT/Windows, since cmd accepts arguments.

  • Lifetime Qt Champion


    Maybe "this": will help

  • Thanks. Still no joy.

  • open a '.command' file instead of a bash script ?

  • I tried that :(

    It's frustrating that something so trivial is such a time sink. In Windows it's dead-easy:

    if (os == 1)
    cstring = "cmd /k adb -s "+ daddr+port+" shell";

Log in to reply