AutoHotkey Community

It is currently May 26th, 2012, 8:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Variable in a variable
PostPosted: June 28th, 2008, 9:34 pm 
i think that would be cool. I could do alot more this way, more loops.
more loops = efficiancy
efficiancy = speed and more work done
=D

Example:

Code:
PSY=0
START:
IF PSY=%PSY%
    PSY +=1
Run Notepad.exe
Sleep 300
WinGet, ID%PSY%, ID, Untitled - Notepad
ControlSend,, <text>, ahk_id %ID%PSY%%
GOTO START


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2008, 9:57 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Your code would work with following amendment:

Code:
ControlSend,, <text>, % "ahk_id " ID%PSY%


:)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2008, 8:05 am 
Oh so sorry.
:oops:
Feel like an idiot.
Thanks though!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2008, 8:19 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Anonymous wrote:
Feel like an idiot.


It took me 6 months, before I learnt this from one of Titan's post.
It would be helpful if this was someway documented.

:)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2008, 10:16 am 
Offline

Joined: February 18th, 2008, 8:26 pm
Posts: 442
It's briefly documented in the page about Arrays. I believe this is called double-dereferencing.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: poserpro, RaptorX, sjc1000 and 61 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