AutoHotkey Community

It is currently May 27th, 2012, 10:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: September 20th, 2006, 6:40 pm 
Offline

Joined: May 22nd, 2006, 2:01 pm
Posts: 25
Hi,

let's see if someone can help me.
Code:
counter = 0
Loop, 10
{
counter += 1
var%counter% = test
}

Loop, 10

send_counter = 0
{
send_counter += 1
send, %var%counter%%
}

obviously the red line is wrong. Anybody knows how to treat this problem?

Regards

Oliver


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2006, 6:46 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
I think you wanted the braces to be beneath the loop and an array reference:
Code:
send_counter = 0
Loop, 10
{
   send_counter += 1
   send, % var%counter%
}

Note you can use A_Index instead of your own counter.


Last edited by polyethene on September 20th, 2006, 6:48 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2006, 6:47 pm 
Offline

Joined: May 22nd, 2006, 2:01 pm
Posts: 25
Of course, you're right!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2006, 7:24 pm 
Offline

Joined: May 22nd, 2006, 2:01 pm
Posts: 25
Ok,

I solved the problem by using

send_var := var%counter%
send, %send_var%

Hope this helps someone!

Regards

Oliver


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: BrandonHotkey, Maestr0 and 59 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