| View previous topic :: View next topic |
| Author |
Message |
SharpOrangeGrapes
Joined: 27 Dec 2007 Posts: 5
|
Posted: Sat Dec 29, 2007 8:21 pm Post subject: Question about sending keys with [ControlSend]. |
|
|
Hello,
Wondering how I could combine the ControlSend commands into one line:
| Code: |
followKey = {F8}
ControlSend,, % followKey%A_Index%, ahk_id %currentID%
ControlSend,, {Enter}{Shift Down}7{Shift up}follow{Enter}, ahk_id %currentID%
|
I have tried different combinations, but it just doesn't work. Any suggestions are welcome, thank you in advance.
SOG
PS"Sorry the code might not make sense. It is a cut and paste out of a Loop."DS |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Dec 29, 2007 9:18 pm Post subject: Re: Question about sending keys with [ControlSend]. |
|
|
| Code: |
followKey = {F8}
ControlSend, , % followKey%A_Index% . "{Enter}{Shift Down}7{Shift up}follow{Enter}", ahk_id %currentID%
|
Read about variables and expressions |
|
| Back to top |
|
 |
SharpOrangeGrapes
Joined: 27 Dec 2007 Posts: 5
|
Posted: Sat Dec 29, 2007 9:31 pm Post subject: |
|
|
Thank you for your reply. Your line does not work for me + I have already tried yours and other variations + read the documentation on variables, controlsend, etc.
I am beginning to think it has something to do with my functions and global variables/arrays... I'm not sure what is going on though.
Thanks. |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1259 Location: Denmark
|
Posted: Sat Dec 29, 2007 9:53 pm Post subject: |
|
|
| Code: | | % followKey%A_Index% | in a loop means
| Code: | %followKey1% ; first iteration
%followKey2% ; second iteration |
Without more code its impossible to say whats wrong. _________________ there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face
- Kashmir |
|
| Back to top |
|
 |
SharpOrangeGrapes
Joined: 27 Dec 2007 Posts: 5
|
Posted: Sat Dec 29, 2007 10:08 pm Post subject: |
|
|
Thanks for your reply Tonne. I will post more soon, as I am about to log off.
The followKey array only includes different {F8} keystrokes e.g. F1-F12.
Will reply soon with more, appreciate the help, as I have been madly trying to solve it just for the heck of it.
SOG |
|
| Back to top |
|
 |
|