AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question about sending keys with [ControlSend].

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
SharpOrangeGrapes



Joined: 27 Dec 2007
Posts: 5

PostPosted: Sat Dec 29, 2007 8:21 pm    Post subject: Question about sending keys with [ControlSend]. Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Sat Dec 29, 2007 9:18 pm    Post subject: Re: Question about sending keys with [ControlSend]. Reply with quote

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

PostPosted: Sat Dec 29, 2007 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
tonne



Joined: 06 Jun 2006
Posts: 1259
Location: Denmark

PostPosted: Sat Dec 29, 2007 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
SharpOrangeGrapes



Joined: 27 Dec 2007
Posts: 5

PostPosted: Sat Dec 29, 2007 10:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group