 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sergio
Joined: 16 Mar 2008 Posts: 22 Location: Brooklyn
|
Posted: Sun May 11, 2008 7:18 pm Post subject: Loop Copy & Paste |
|
|
I'd like to create a loop to copy items and another to paste them. For the sake of simplicity, I've put them together so it will just copy and recall it to the Message Box. The following code turns the Clipboard contents into a variable called varItemNumberx (IE varItemNumber1, varItemNumber2, varItemNumber3...)
I can't figure out how to recall an entire list without actually typing out varItemNumber1, varItemNumber2. I know its simple, but driving me nuts!!
| Code: | ^F11::
Loop %varLoopRegSales%
{
Sleep, 50
Send, {ENTER}
Send, {CTRLDOWN}c{CTRLUP}
Sleep, 50
varItemNumber%A_Index%:=Clipboard : ------Setting the variable works fine
Msgbox, %varItemNumber1% : ------ Recalling it requires that I explicitly write that number. |
I tried, the following code, but it just yields a single number response.
| Code: | | Msgbox, %varItemNumber%%A_Index% |
_________________
 |
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Sun May 11, 2008 7:28 pm Post subject: |
|
|
try:
| Code: | ^F11::
Loop %varLoopRegSales%
{
Sleep, 50
Send, {ENTER}
Send, {CTRLDOWN}c{CTRLUP}
Sleep, 50
varItemNumber%A_Index%:=Clipboard : ------Setting the variable works fine
Msgbox % varItemNumber%A_Index% |
|
|
| Back to top |
|
 |
Sergio
Joined: 16 Mar 2008 Posts: 22 Location: Brooklyn
|
Posted: Sun May 11, 2008 7:47 pm Post subject: Thanks |
|
|
I'm so glad I asked because the space between the first percentage and the variable name is counterintuitive. It works like a charm. Thanks! _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|