AutoHotkey Community

It is currently May 26th, 2012, 9:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Firefox
PostPosted: July 26th, 2009, 12:49 am 
I have created an autohotkey script that allows me to change itunes songs when i'm not in itunes. It works fine, except when i am in firefox. here is my code

Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT/XP/Vista/7
; Author:         €M€RY$T€€L€
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetNumlockState, AlwaysOn  ;turns numlock to always on.

F7::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{LEFT}  ; < previous
return

F8::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, {SPACE}  ; play/pause toggle
return

F9::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{RIGHT}  ; > next
return

F10::
Send {Volume_Mute}  ; vol master mute.
return

F11::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{DOWN}  ; vol down
return

F12::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{UP}  ; vol up
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 12:57 am 
Offline

Joined: April 13th, 2009, 3:15 am
Posts: 101
maybe instead of ahk_parent use ahk_class iTunes if the iTunes window is opened? WindowSpy it if you have it in a tool bar.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 6:29 am 
??? :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 7:01 am 
I have also noticed that the code below does not work in firefox but works in any other window.

Code:
F1::Run C:\Program Files (x86)\AutoHotkey\AppleAluminumKeyboard\monitoroff.bat  ; turns monitor off.
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 6:16 pm 
Offline

Joined: April 13th, 2009, 3:15 am
Posts: 101
I'm willing to bet because that hotkey is used by firefox to trigger the help file. Add * in front of F1 so it becomes a hotkey instead.

Code:
*F1::Run C:\Program Files (x86)\AutoHotkey\AppleAluminumKeyboard\monitoroff.bat  ; turns monitor off.
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 8:42 pm 
Nope that doesn't work


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2009, 8:45 pm 
I figured it out. I need to run the script as Administrator to make it work.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, krajan, patgenn123, wolverineks, Yahoo [Bot] and 61 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group