I use a script that opens icq2002, pushes a button and sends several key strokes.
The problem is that after the button is pressed no keystrokes are sent and the whole script seems to stop working.
When i focus on another window the script appearently starts working again...
Can anyone explain this?
Here's what my script looks like:
Input>icqloc,Where is the ICQ startup file? (icq.exe),D:\ICQ\Icq.exe
Run Program>icqloc
GetActiveWindow>icqTitle,Xwhereisstarts,Ywhereitstarts
PushButton>icqTitle,My
Wait>3
Press Up
Press Up
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
The button is pressed but no key strokes are sent unless i change focus and if i press down/up manualy than everything is fine.
Thanks!
macro seems to stop
Moderators: JRL, Dorian (MJT support)
1. There is nothing to allow for the time it takes for the icq.exe application to start after the Run Program line. Subsequent commands may happen before the application is ready. Add a WaitWindowOpen line after the Run Program line.
2. You don't have a SetFocus line before the keystrokes are sent. How is the macro supposed to know where to send the keystrokes? At present they will land on whatever happens to have the focus at the time.
2. You don't have a SetFocus line before the keystrokes are sent. How is the macro supposed to know where to send the keystrokes? At present they will land on whatever happens to have the focus at the time.
MJT Net Support
[email protected]
[email protected]
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Try doing something like this:
Code: Select all
Input>icqloc,Where is the ICQ startup file? (icq.exe),D:\ICQ\Icq.exe
Run Program>icqloc
WaitWindowOpen>icqTitle
WaitReady>1
SetFocus>icqTitle
PushButton>icqTitle,My
Wait>3
Press Up
Press Up
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
Press Down
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Setting focus to it wont help since its already focused.
I tried and failed.
and i run the script when icq is already working so that it doesnt start the program but brings it to the foreground.
and when i use the script the little MS icon gets stuck on whichever color it was in (gray/yellow) and doesnt change untill i do something.
I tried and failed.
and i run the script when icq is already working so that it doesnt start the program but brings it to the foreground.
and when i use the script the little MS icon gets stuck on whichever color it was in (gray/yellow) and doesnt change untill i do something.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: