Jump to content
Sign in to follow this  
Fanatick

Why it dont do the task 1time?

Recommended Posts

Fanatick

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

Share this post


Link to post
Share on other sites
Kerros

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.

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Fanatick

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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Fanatick

I dont understand what you mean ....

Edited by Fanatick

Share this post


Link to post
Share on other sites
Nevin

I suggest you fully explain what you are trying to do, so that we don't have to guess.

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  

×