Jump to content
Sign in to follow this  
Guest yoshi

Pretending menu

Recommended Posts

Guest yoshi

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,

Share this post


Link to post
Share on other sites
pekster

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.

Share this post


Link to post
Share on other sites
CyberSlug

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!

Share this post


Link to post
Share on other sites
Guest yoshi

pekster,

Great idea ! It worked.

I can't be too thankful for your advice.

Cheers,

yoshi,

Share this post


Link to post
Share on other sites
Reznor

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 by Reznor

Share this post


Link to post
Share on other sites
Wolvereness

try declaring

$x = TimerInit()

before you loop then set

If TimerDiff($x) = ~ Then ExitLoop
Edited 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]

Share this post


Link to post
Share on other sites
Reznor

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 by Reznor

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×