| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sat Jun 28, 2008 9:34 pm Post subject: Variable in a variable |
|
|
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
|
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5890
|
Posted: Sat Jun 28, 2008 9:57 pm Post subject: |
|
|
Your code would work with following amendment:
| Code: | | ControlSend,, <text>, % "ahk_id " ID%PSY% |
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Jun 29, 2008 8:05 am Post subject: |
|
|
Oh so sorry.
Feel like an idiot.
Thanks though! |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5890
|
Posted: Sun Jun 29, 2008 8:19 am Post subject: |
|
|
| 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.
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 458
|
Posted: Sun Jun 29, 2008 10:16 am Post subject: |
|
|
| It's briefly documented in the page about Arrays. I believe this is called double-dereferencing. |
|
| Back to top |
|
 |
|