| View previous topic :: View next topic |
| Author |
Message |
emerysteele Guest
|
Posted: Sat Jul 25, 2009 11:49 pm Post subject: Firefox |
|
|
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
|
Posted: Sat Jul 25, 2009 11:57 pm Post subject: |
|
|
| 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 |
|
 |
emerysteele Guest
|
Posted: Sun Jul 26, 2009 5:29 am Post subject: |
|
|
???  |
|
| Back to top |
|
 |
emerysteele Guest
|
Posted: Sun Jul 26, 2009 6:01 am Post subject: |
|
|
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
|
Posted: Sun Jul 26, 2009 5:16 pm Post subject: |
|
|
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 |
|
 |
emerysteele Guest
|
Posted: Sun Jul 26, 2009 7:42 pm Post subject: |
|
|
| Nope that doesn't work |
|
| Back to top |
|
 |
emerysteele Guest
|
Posted: Sun Jul 26, 2009 7:45 pm Post subject: |
|
|
| I figured it out. I need to run the script as Administrator to make it work. |
|
| Back to top |
|
 |
|