The wait system...! [RESOLVED]

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

The wait system...! [RESOLVED]

Post by ABIVEN » Sat May 15, 2010 5:40 am

Hello,

I use MS a lot but always with the wait> simple command .
I don't succeed any more accomplished command.
Even after reading Marcus TETTMAR advices.

One example :

// OPEN CORTONA SOFTWARE
// Ctrl + w + Enter opens CORTONA

Let>WF_TYPE=2
Let>WW_TIMEOUT=30
Wait>1.17
Press CTRL
Wait>0.17
Send>w
Wait>0.17
Release CTRL
Wait>0.17
Press Enter
Waitwindowopen>C:\Documents and Settings\...\Explore3D.wrl
WaitReady>0
PlayWav>c:\windows\media\chimes
Wait>10


The chimes rings long before the window opens

Thanks

PS With a mistake in the name (Explore4D instead Explore3D) the script stops allright.
Last edited by ABIVEN on Sat May 15, 2010 9:25 pm, edited 1 time in total.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Using techniques to wait until screen is fully loaded

Post by adroege » Sat May 15, 2010 10:59 am

WaitReady is not able to work sucessfully with *EVERY* situation, however I noticed you didn't try it using the parameter of "1". Using WaitReady>1 also makes it wait for screen paint events to complete.


So, instead of WaitReady>0 in your situation try WaitReady>1


If that doesn't work, there are many other techniques to use.

You can use image recognition, WaitCursorChanged>, WaitPixelColor>, WaitRectChanged>

You decide visually what indicates the screen is fully open and when the script should continue.

Hope this points you in the right direction.

JeffDaruecan
Newbie
Posts: 18
Joined: Thu Mar 25, 2010 11:00 am
Location: Vancouver

Post by JeffDaruecan » Sat May 15, 2010 12:55 pm

Not sure if this could help as I'm not 100% sure what your wanting the script to do.

You can try using a waitscreenimage command. Use the image capture tool to select a small portion that never changes once the window is loaded. Something such as a logo or toolbar icon would work nicely. Import the image into your script and then have it export at the script starts.


\\beginning of script
exportdata>EXPLORE4D_OPEN.BMP_DATA,%Temp_Dir%\Explore4D Open.bmp


waitscreenimage>%Temp_Dir%\Explore4D Open.bmp



This will allow your script to stop and wait until the image you selected is visible. Once found it will continue the script and play the chimes.

ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Post by ABIVEN » Sat May 15, 2010 9:24 pm

Thanks

I use the two of them and that seems to be better

bold text becomes :

Exportdata>C:\Documents and Settings\....\clipboard.bmp
Waitwindowopen>C:\Documents and Settings\...\Explore3D.wrl
Waitscreenimage>C:\Documents and Settings\....\clipboard.bmp
WaitReady>1

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