Jump to content

Recommended Posts

Posted

It's the same thing !

While 1 == While 1=1

While <expression>

If the expression is true the following statements up to the WEnd statement are executed. This loop continues until the expression is false.

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted

1 == 1 evaluates to true.

1 evaluates to true.

Since both are true, both work. Similarly, you could use any other guaranteed true value like 2 == 2 or "Hello" == "Hello"

Using the single value increases the speed of the script just a bit by not having to parse the extra value and operator.

Posted (edited)

scriptstopper,

First, Welcome to the AutoIt Forums ;)

While is looking for a 'True' Statement, and will loop eternally until the statement is no longer True. You can use any statement for While to check, as long as it can give a True or False Return.

While PixelChecksum($x,$y,$w,$h)=0 ;will continue looping until the the pixel region is no longer black
While StringInStr($text,"Running") ;will continue looping until the the $text no longer contains 'Running' in it
While $var1=$var2 ;will continue to loop until one of those variables differ from the other

So Using the statement '1' as in (While 1) is telling the loop it is always True, and to eternally loop. to exit an always true loop you will need to call 'ExitLoop'

Realm

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Posted

Almost eternally grateful.

And forgive the double-post. I thought I checked, this is a heavily-modified forum interface than what i am used to seeing (phpBB3).

;) or :) your preference.

don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

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