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 

Firefox

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





PostPosted: Sat Jul 25, 2009 11:49 pm    Post subject: Firefox Reply with quote

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
Back to top
lbrtdy



Joined: 13 Apr 2009
Posts: 101

PostPosted: Sat Jul 25, 2009 11:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
emerysteele
Guest





PostPosted: Sun Jul 26, 2009 5:29 am    Post subject: Reply with quote

??? Confused
Back to top
emerysteele
Guest





PostPosted: Sun Jul 26, 2009 6:01 am    Post subject: Reply with quote

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
Back to top
lbrtdy



Joined: 13 Apr 2009
Posts: 101

PostPosted: Sun Jul 26, 2009 5:16 pm    Post subject: Reply with quote

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





PostPosted: Sun Jul 26, 2009 7:42 pm    Post subject: Reply with quote

Nope that doesn't work
Back to top
emerysteele
Guest





PostPosted: Sun Jul 26, 2009 7:45 pm    Post subject: Reply with quote

I figured it out. I need to run the script as Administrator to make it work.
Back to top
Display posts from previous:   
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