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 

Trigger Keywait using a send command from another script

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






PostPosted: Fri Jul 18, 2008 6:41 pm    Post subject: Trigger Keywait using a send command from another script Reply with quote

Is it possible to trigger a keywait(specifically a keywait down followed by keywait up) with the send command from another script? I haven't had any luck. It sees the sent key in the key history but won't respond to it.


Example:

Code:

;This part is from script 1

...

Keywait, j, D
Keywait, j

...

;This part is from script 2

Send, {j down}
Sleep, 200
Send, {j up}
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 5887

PostPosted: Fri Jul 18, 2008 10:50 pm    Post subject: Reply with quote

You can ControlSend a key from Script 2 to Script 1 with Script 1's PID. Smile
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Jul 18, 2008 11:59 pm    Post subject: Reply with quote

I can't get that to work. Neither script has a gui. Using ControlSend, nothing even shows up in the key history. I even tried using scan/virtual codes.
Back to top
Tertius



Joined: 05 Jun 2008
Posts: 61

PostPosted: Sat Jul 19, 2008 12:26 am    Post subject: Reply with quote

Anonymous wrote:
I can't get that to work. Neither script has a gui. Using ControlSend, nothing even shows up in the key history. I even tried using scan/virtual codes.


Try this instead:
Code:
Keywait, j, D L
Keywait, j, L

_________________
- Tertius
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Jul 19, 2008 12:42 am    Post subject: Reply with quote

Thanks, Tertius! The logic option on keywait works great with send.
Back to top
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