0

my goal is to run a script on a Windows 7 with OpenSSH from an Android device, that will control the cursor. I have written an AutoIt script and compiled it into an exe on the pc (tested it from the cmd, and it works).

the problem is, when i log in from the android and test using ConnectBot (simply run the script), it doesn't do anything. console debugging shows nothing as if all was successful. I have tried running other compiled AutoIt scripts for file creation for example, and they work fine.

can someone explain to me why this happens and what can be done? i suspect environment variables issues here, but don't know what can be done.

Thanks

2 Answers 2

1

ok found out the reason-openssh doesnt provide gui apps control. found a workaround invoking psexec from ssh, and using it to activate the mouse control script.

3
  • 2
    Interesting problem/solution. You should post some more details in your question/answer (e.g. some code) so that it might be of any use for others.
    – Andreas
    Feb 13, 2016 at 8:20
  • 1
    to sum up- for situation when you want to execute gui scripts remotely (e.g. opening non-console apps without the need to see them, moving cursor, pressing keys) on windows machines (without the headache of x server) place psexec tool on the windows, and wrap the script-calling into "psexec <host> ... -i <call to gui script>", then call the command via an ssh channel.
    – R.Y.
    Feb 14, 2016 at 11:04
  • 1
    You can edit your answer and put the details there. ;-) Oh and you an also accept your own answer.
    – Andreas
    Feb 14, 2016 at 14:20
0

If the problem is that OpenSSH does not provide control for non-console apps, a clean solution would be to compile your script as a console application.

C:\Users\Linus> Aut2exe.exe /in yourscript.au3 /console

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.