Hi,
Me too, I'm in the need of simulating some mouseklicks in a `silly` application that isn`t to be handled by keyboard.
This way, we must use the scriptstatemets winwait_ etc.
Because this application should work as a software-interface, we decided to run it on a remote-pc somewhere in the serverroom.
And there the `problem` starts, if you try it to do via RDP...
All commands using WinWait etc. can not be processed as soon you are disconnected from this pc.
There are 4 different ways you can be connected to a Remote-PC (in conjuction with RDP)...:
1. Way:
This is the way you will do it normaly...
2. Way:
You use the /console switch
3. Way:
The way 1 and 2 are `terminalsessions` in fact - this way you are not realy steering the PC remotly...
If you use a real remote-steering software as pc-anywhere etc. - then you are realy in the position of steering the PC... (and this is the only way, your AutoIt-Script will go on even you are disconnected from the PC (as far as I know)).
4. Way:
If you where connected by lets say PC-Anywhere and have started your script it can happen to you, that you will connect to that PC by RDP /concole mode the next time.
And thats very, very unlucky - because from this moment on, your script will stop as soon you will terminate this RDP session.
I tried to have my script detecting if it runs in a RDP-session.
I used the environement variables `sessionname` and `clientname` - but this doesn't work in case 4...
(in case 4, windows reports still a real console-mode in place of the `takeover-mode` of the PC-Anywhere steering...
This is true only, if you use the same windows-account in all cases...
(just for clearance)
How to detect case 4?
Thanks
Thomas
ps: hope you will understand my `english`...