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 

ControlSend Issues [Solved]

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



Joined: 18 Apr 2008
Posts: 860
Location: The Interwebs

PostPosted: Fri Apr 18, 2008 8:02 am    Post subject: ControlSend Issues [Solved] Reply with quote

I recently made a small, simple script to simply pause/play, skip, or go back in my iTunes even when it is minimized to system tray. It will work for some time, but when I leave it unused for a little while it stops working. I can fix the problem by restoring and reminimizing iTunes, but this defeats the purpose of the hotkeys, since it requires me to use more mouseclicks than if I just manually controlled it.

So, does anyone know why this might be happening? I have tried different send modes and setting longer key delays, but nothing seems to fix the problem.

Code:
NumPadDown::
   DetectHiddenWindows,On
   ControlSend, ahk_parent, {space}, iTunes ahk_class iTunes
   return

NumPadEnd::
   DetectHiddenWindows,On
   ControlSend, ahk_parent, ^{left}, iTunes ahk_class iTunes
return

NumPadPgDn::
   DetectHiddenWindows,On
   ControlSend, ahk_parent, ^{right}, iTunes ahk_class iTunes
return


Last edited by Krogdor on Sun Apr 20, 2008 11:33 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
A117
Guest





PostPosted: Fri Apr 18, 2008 8:36 am    Post subject: i just learned this Reply with quote

i donno why you write sth. on both sides of ahk_class
i just wrote my script as below
#c::ControlSend, , {Esc}, ahk_class MediaPlayerClassicW
Back to top
aaffe



Joined: 17 May 2007
Posts: 66

PostPosted: Fri Apr 18, 2008 8:38 am    Post subject: Reply with quote

Hy,
I did have the same problem in several scripts.
After searching the known bugs in autohotkey via the forum I found the solution from Chris:

Just use
Code:

SetControlDelay -1

before using Controlsend.
Greets,
aaffe
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 860
Location: The Interwebs

PostPosted: Sat Apr 19, 2008 2:06 am    Post subject: Reply with quote

Unfortunately, adding the "SetControlDelay -1" doesn't seem to have made a difference... It still works for some time and then ignores my hotkeys until I restore and minimize it again. Thanks for trying, though.

Does anyone else have any other ideas as to what the problem might be?




EDIT:

Nvm, it actually seems to be working well for now. Thanks for the help!
Back to top
View user's profile Send private message AIM Address
andz



Joined: 05 Oct 2007
Posts: 2

PostPosted: Wed Aug 06, 2008 5:11 pm    Post subject: Reply with quote

hi Krogdor.
do you have any solution for your problem?
or does it work now without changing anything?
i am trying to write a global hotkey script for last.fm with using ControlSend.
i got the same problem like you.
when last.fm client is in tray my script doesn't work.

edit:
i found a way to handle it.
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