Guest yoshi Posted June 7, 2004 Share Posted June 7, 2004 Hi, As mentioned in help file, WinMenuSelectItem fails on toolbars "Pretending" menu. Unfortunately my application which I need to automate has this kind of menu. Click the menu text of a tab shows a submenu if exists. The application is so-called client server type and the response from the server varies depending on the time executed. So sleep function sometimes fails to catch the submenu. What do I do to make MouseClick command to wait until submenu appears ? Thanks, Link to comment Share on other sites More sharing options...
pekster Posted June 7, 2004 Share Posted June 7, 2004 What do I do to make MouseClick command to wait until submenu appears ?How about taking a region around the menu before you click, doing a PixelChecksum, and the waiting until the PixelChecksum for that same reagon changes (which means something has changed on the screen in that region.) Then continue with your script. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
CyberSlug Posted June 7, 2004 Share Posted June 7, 2004 You might try good-old Send. Inefficient example to select home page in an open instance of Internet Explorer. Opt("WinTitleMatchMode", 2) WinActivate("Internet Explorer") Send("!voh");Alt+V, O, H Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Guest yoshi Posted June 8, 2004 Share Posted June 8, 2004 pekster, Great idea ! It worked. I can't be too thankful for your advice. Cheers, yoshi, Link to comment Share on other sites More sharing options...
Reznor Posted November 13, 2004 Share Posted November 13, 2004 (edited) How about taking a region around the menu before you click, doing a PixelChecksum, and the waiting until the PixelChecksum for that same reagon changes (which means something has changed on the screen in that region.) Then continue with your script.<{POST_SNAPBACK}>That i have figured out, but my problem is the change may not occour..If it dose not occour I need to run a particular function over and over until the pixel field dose change, then continue with script.. (i dont like making new threads for whats hopefully a small question ) Edited November 13, 2004 by Reznor Link to comment Share on other sites More sharing options...
Wolvereness Posted November 13, 2004 Share Posted November 13, 2004 (edited) try declaring $x = TimerInit() before you loop then set If TimerDiff($x) = ~ Then ExitLoop Edited November 13, 2004 by Wolvereness Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
Reznor Posted November 14, 2004 Share Posted November 14, 2004 (edited) Thanks that works out whenever i will need it in the future err how about exit loop when pixelchecksum is true (pixel changed) ? Is there a good place to find begginers examples like this? I think after this i am done with the script because it is effective enough. this is one of the misc things I have tried. I get functions to work but when I run this script the function dosnt run.. $checksum = PixelChecksum(580, 320, 585, 330);1 while $checksum = PixelChecksum(580, 320, 585, 330) $1 = tfunc1() do $i = $i + 1 until $checksum = PixelChecksum(580, 320, 585, 330) wend Func TFunc1() send ("vitnomus{tab}") sleep (10000) endfunc Actualy, i tried a lot to figure this out but its not coming together. Maybe I'll make a tutorial scripit for pixelchecksum and related script if i learn this. Edited November 14, 2004 by Reznor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now