Fanatick Posted November 26, 2008 Posted November 26, 2008 Winsetstate ("Importer un Script - Messenger Plus!","",@SW_HIDE) Controlclick("Importer un Script - Messenger Plus!","","[CLASS:Button; INSTANCE:2]") Controlclick("Importer un Script - Messenger Plus!","","[CLASS:Button; INSTANCE:3]") while WinExists("Messenger Plus! Live") <> 1 Sleep(10) WEnd Send("{Enter}") Winsetstate ("Messenger Plus! Live","",@SW_HIDE) exit I have this code but i don't understand why the loop is infinite , i would want that it do the task one time. Thanks for help
Kerros Posted November 26, 2008 Posted November 26, 2008 the Wend is going to make it repeat, and there is no qualifier to tell it to stop... remove WEnd and it should only run once. Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.
Developers Jos Posted November 26, 2008 Developers Posted November 26, 2008 The WinExists() test is that testing for a portion of the Windows Title? If so you need to set the coorect option: Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted November 26, 2008 Developers Posted November 26, 2008 the Wend is going to make it repeat, and there is no qualifier to tell it to stop... remove WEnd and it should only run once.Nah... there is a While there... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Fanatick Posted November 26, 2008 Author Posted November 26, 2008 (edited) Yeah but when i delete while + wend + <>1 , It make a infinite loop Thanks Jos but i don't know how use it :s so if you can configure my script thx ! Edited November 26, 2008 by Fanatick
Developers Jos Posted November 26, 2008 Developers Posted November 26, 2008 Thanks Jos but i don't know how use it :s so if you can configure my script thx !You forgot to answer the initial question i raised.....The default test for WinExists() is testing for the specified string at the start of the window title.Open the helpfile and read up on what it all means... there is plenty info on this particular topic.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Fanatick Posted November 26, 2008 Author Posted November 26, 2008 (edited) I dont understand what you mean .... Edited November 26, 2008 by Fanatick
Nevin Posted November 26, 2008 Posted November 26, 2008 I suggest you fully explain what you are trying to do, so that we don't have to guess.
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