Sign in to follow this  
Followers 0
Fanatick

Why it dont do the task 1time?

8 posts in this topic

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



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

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

#5 ·  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

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

#7 ·  Posted (edited)

I dont understand what you mean ....

Edited by Fanatick

Share this post


Link to post
Share on other sites

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  
Followers 0