Jump to content

Recommended Posts

Posted

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

Posted

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
Posted

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
Posted

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

Posted (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 by Fanatick
  • Developers
Posted

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

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
  • Recently Browsing   0 members

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