AutoHotkey Community

It is currently May 27th, 2012, 6:12 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Storing variable help...
PostPosted: December 3rd, 2005, 2:29 am 
Offline

Joined: November 16th, 2004, 1:05 pm
Posts: 83
Hiyaz all,

How can i store a variable?
Code:
Loop,
{
Sleep,100
Msgbox Test
}

Z::
Msgbox Looped %A_index% times
Exitapp

That doesn't work, the msgbox outside the loop, shows the index as 0, how can i get it to save the index of that loop? and+ 1 too it.

hope i make sense.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 3rd, 2005, 3:14 am 
Offline

Joined: December 1st, 2005, 7:04 pm
Posts: 37
Location: Los Angeles, CA
in the loop you have to store the var somewhere else, then you can call it whenever u want.

Code:
Loop,
{
Sleep,100
Msgbox Test
tempvar = %a_index%
}

Z::
Msgbox Looped %tempvar% times
Exitapp

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 3rd, 2005, 2:31 pm 
Offline

Joined: November 16th, 2004, 1:05 pm
Posts: 83
How could i now add 1 to that number?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 3rd, 2005, 3:14 pm 
Offline

Joined: December 15th, 2004, 10:24 pm
Posts: 303
Location: United States
Code:
tempvar := tempvar + 1

Carefully read the relevant material in Variables and Expressions

_________________
1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php

2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>>


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, HotkeyStick, Wicked and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group