Clicking Okay

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
myrddin
Newbie
Posts: 3
Joined: Fri Apr 07, 2006 12:14 pm

Clicking Okay

Post by myrddin » Fri Apr 07, 2006 12:19 pm

Hello There

We are currently evaluating the Scheduler software but cannot seem to get it to work.

We are trying to automate the running of a piece of software via a shortcut on the desktop. We are using Windows 2003 server. We just want to doubleclick the icon on the desktop for the software to run, then click okay to a dialog box to continue. For some reason we can get the scheduler to run the software but it will not then click okay for the software to proceed. If tried using SetFocus, IfWindowOpen etc but with no luck...

Any ideas

Many thanks

User avatar
JRL
Automation Wizard
Posts: 3503
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Apr 07, 2006 12:34 pm

Have you tried recording a script or are you writing one manually? At this point I'd like to know whether a recorded script works or fails.

If you have not recorded one, simply select the "Record" icon from the Macro Scheduler main menu then follow the prompts. It should be a very short script, start the program, then click "OK", then stop recording. Run the recorded script and see if it works.

Let us know,
Dick

myrddin
Newbie
Posts: 3
Joined: Fri Apr 07, 2006 12:14 pm

Post by myrddin » Fri Apr 07, 2006 1:59 pm

Hello

Its both - using a script and I also recorded a macro. It seems to work fine if you stay logged in to the machine but if you leave the machine and the desktop is locked we find that the application has started to run but is waiting for you to click the okay button, even though it was recorded in the macro.

many thanks

User avatar
JRL
Automation Wizard
Posts: 3503
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Apr 07, 2006 2:10 pm

I'm wondering if the window is slow to open when you're coming out of the screensaver. If your setfocus> runs before the window is open, it cannot set focus

Try placing a long wait (eg.Wait>30) just ahead of the setfocus>. If that works there are things like WaitWindowOpen> and WaitReady> that can be tried to cut the time down to what is actually needed.

Let us know,
Dick

myrddin
Newbie
Posts: 3
Joined: Fri Apr 07, 2006 12:14 pm

Post by myrddin » Tue Apr 11, 2006 7:54 am

Hello

Thanks for the reply. I've added a wait>30 just before the SetFocus but that hasn't worked. The application is up on the screen but its still waiting for a left click on the button (or hitting the enter key). I don't think its setting the focus on the application window...

Thanks

User avatar
JRL
Automation Wizard
Posts: 3503
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Apr 11, 2006 1:01 pm

I just re-read your previous post.
It seems to work fine if you stay logged in to the machine but if you leave the machine and the desktop is locked...
Are you running this from the server or are you logged in remotely? These are two completely different situations. If you are logged in remotely, try searching the forum for "remote desktop" and see if there is any help for you there. If you are running from the server and not getting focus, try using "View System Window" under the "Tools" menu to see if the actual name of the window is the same as what shows in the banner. Its difficult to get the correct window names in some applications.

Later,
Dick

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts