Jump to content
Sign in to follow this  
AustrianOak

Incrementing variable

Recommended Posts

AustrianOak

I know in c++ to increment a variable its like i++;

what is it in autoit. I know I could do $i = $i + 1 but whats the way in autoit

Edited by IWantIt

Share this post


Link to post
Share on other sites
Monamo

I know in c++ to increment a variable its like i++;

what is it in autoit. I know I could do $i = $i + 1 but whats the way in autoit

Either, as you stated:

$i = $i + 1

or else

$i += 1

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites
AustrianOak

thats what i was looking for. thanks

Share this post


Link to post
Share on other sites
Jos

I know in c++ to increment a variable its like i++;

what is it in autoit. I know I could do $i = $i + 1 but whats the way in autoit

That works in AutoIt3 too, but have you looked in the Helpfile for the answer?

Operator Description

=

Assignment. e.g. $var = 5 (assigns the number 5 to $var)

+=

Addition assignment. e.g. $var += 1 (adds 1 to $var)

-=

Subtraction assignment.

*=

Multiplication assignment.

/=

Division assignment.

&=

Concatenation assignment. e.g. $var = "one", and then $var &= 10 ($var now equals "one10")


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

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  

×