Jump to content

Pretending menu


Guest yoshi
 Share

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,

Link to comment
Share on other sites

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

  • 5 months later...

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
Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...