Jump to content

Help with While... Wend


Joosh
 Share

Recommended Posts

Okay, i have made a script that performs a lot of actions, the problem is...

1. When i execute the while... wend action of my script it will continue that and not perform the rest of the script at the same time, is there any way to combat this?

2. On another issue I was using a WinMenuSelectItem action earlier in my script but it was not working and i ended up using Send and the shortcut keys for File, Tools etc...

I would really appreciate any feedback you could provide and if its of any help, i need the while... wend to be active at the same time as im issuing mouse click commands. At the moment i am using 2 programs to solve this issue but i would much rather not, any help would be greatly appreciated

Link to comment
Share on other sites

while and wend are made so that they execute inside as long as the while is true.

If you want to preform some other action or check, use of a function is recomended.

Ex:

$x=1
While $x=1
;do some stuff
sleep(10)
test()
wend


func test()
if winactive("my window","") then 
winclose("my window","")
endif
endfunc

on anouther note, WinMenuSelectItem works well with standard windows controls, but many programers use thier own custom controls and invalidate its use.

AutoIt3, the MACGYVER Pocket Knife for computers.

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...