| View previous topic :: View next topic |
| Author |
Message |
ludditemike
Joined: 28 Mar 2006 Posts: 1
|
Posted: Tue Mar 28, 2006 5:36 am Post subject: iTunes controls with fast-forward/rewind |
|
|
The other iTunes controls out there weren't really doing it for me, so I tossed this together. Requires Scripts for Itunes from http://www.maximized.com/freeware/scriptsforitunes/. Looking around a little, shouldn't be too hard if someone wants to adapt it for Winamp or whatever.
| Code: |
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Michael Griffin <not.public@example.com>
;
; Script to control iTunes with media keys
; Hold down prev/next for rewind/fastforward
; Tap to jump to prev/next track
;
; Requires the very handy Scripts for iTunes
; http://www.maximized.com/freeware/ScriptsForiTunes/
;
#SingleInstance force
; Time in ms before we consider this holding down the button
?hysttime := 333
; Path to iTunes scripts, this is the default - not used, Run doesn't like variables
?scriptPath = %A_ProgramFiles%\iTunes\Scripts
; Initialize the hold flag
?hyst := 0
; Next/Fast-Foward
Media_Next::
; Start fastforwarding now
Run C:\Program Files\iTunes\Scripts\FastForward.vbs
; Start the countdown
SetTimer, hyst, %?hysttime%
return
Media_Next Up::
; They let go of the key right away
if ?hyst < 1
{
Run C:\Program Files\iTunes\Scripts\Next.vbs
}
; Key has been down for > ?hysttime
Else
{
Run C:\Program Files\iTunes\Scripts\Play.vbs
}
; Reset our timer and flag for the next run
SetTimer, hyst, Off
?hyst := 0
return
; Prev/Rewind
Media_Prev::
Run C:\Program Files\iTunes\Scripts\Rewind.vbs
SetTimer, hyst, %?hysttime%
return
Media_Prev Up::
if ?hyst < 1
{
Run C:\Program Files\iTunes\Scripts\BackTrack.vbs
}
Else
{
Run C:\Program Files\iTunes\Scripts\Play.vbs
}
SetTimer, hyst, Off
?hyst := 0
return
Media_Play_Pause::
Run C:\Program Files\iTunes\Scripts\PlayPause.vbs ; play/pause toggle
?hyst := 0
return
Media_Stop::
Run C:\Program Files\iTunes\Scripts\Stop.vbs ; stop
?hyst := 0
return
; We only get here if he button has been down for ?hysttime ms or more
hyst:
?hyst := 1
SetTimer, hyst, Off
return |
|
|
| Back to top |
|
 |
yeeha Guest
|
Posted: Tue May 30, 2006 10:59 am Post subject: iTunes forward & rewind with HoeKey |
|
|
Adding this to your HoeKey script file also does the job:
=Rem| -Fast Forward-
^@39=Msg|iTunes|793|0|3211264 ; Ctrl+Alt+Right
=Msg|iTunes|793|0|3211265 ;(Hack: Send some msg quickly after previous to stop forwarding 2 or 3 units)
=Rem| -Rewind-
^@37=Msg|iTunes|793|0|3276800 ; Ctrl+Alt+Left
=Msg|iTunes|793|0|3276801 ;(Hack: Send some msg quickly after previous to stop rewinding 2 or 3 units) |
|
| Back to top |
|
 |
yeeha Guest
|
Posted: Wed Dec 26, 2007 12:45 pm Post subject: complete iTunes settings |
|
|
Here my complete list of Hoekey settings for iTunes, for your convenience:
=Rem|-- iTunes --
~T=Run|"C:\Program Files\iTunes\iTunes.exe" ; Launch iTunes
^@36=Msg|iTunes|793|0|917504 ; Ctrl+Alt+Home : play/pause
^@45=Msg|iTunes|793|0|917504 ; Ctrl+Alt+Insert: play/pause
^@35=Msg|iTunes|793|0|851968 ; Ctrl+Alt+End : stop
^@33=Msg|iTunes|793|0|786432 ; Ctrl+Alt+PageUp : previous song
^@34=Msg|iTunes|793|0|720896 ; Ctrl+Alt+PageDown: next song
^@39=Msg|iTunes|793|0|3211264 ; Ctrl+Alt+Right: Forward 5 sec
=Msg|iTunes|793|0|3211265 ; (Hack: Send some msg quickly after previous one, to prevent fast-forwarding more than one unit)
^@37=Msg|iTunes|793|0|3276800 ; Ctrl+Alt+Left : Rewind 5 sec
=Msg|iTunes|793|0|3276801 ; (Same Hack) |
|
| Back to top |
|
 |
yeeha Guest
|
Posted: Wed Dec 26, 2007 2:52 pm Post subject: |
|
|
I forgot to add the volume-up/down keys in the previous post:
^@38=Msg|iTunes|793|0|655360 ; Ctrl+Alt+Up : Volume up
^@40=Msg|iTunes|793|0|589824 ; Ctrl+Alt+Down: Volume down
Also very useful to have Volumouse installed if you click as much as you type  |
|
| Back to top |
|
 |
SimplifyLife
Joined: 10 Dec 2007 Posts: 13
|
Posted: Sat Feb 02, 2008 5:58 pm Post subject: |
|
|
I love this script, but Im having a hard time finding where you define what the short cut keys will be.
I dont see anywhere you specify Ctrl+Alt+____ for the trigger.
Anyone know where you edit that? |
|
| Back to top |
|
 |
SimplifyLife
Joined: 10 Dec 2007 Posts: 13
|
Posted: Sat Feb 02, 2008 6:48 pm Post subject: |
|
|
Ok I knocked out something that works. Someone might have a better way to do this.. but it does serve it's purpose.
Hopefully it's useful to someone else with similiar needs.
I like to get books from audible.com where the author reads it to you. Its easier for me, but I like to be able to take notes. so I took what was done with this script and made some changes that make it perfect for that. I close all other hot keys while Im working on this.
with only itunes and word open I can now perform some nice functions with my hands in the neutral position. I hate having to take my hands off and reach for the mouse, etc.:
Flip between docs with Caps
Rewind indefinately with k
Fast Forward Indefinately with l
One 5 second rewind with it starting the playback again with f
| Code: |
CapsLock::
SendPlay, {Alt Down}{Tab Down}{Tab UP}{Alt UP}
return
#IfWinActive, iTunes
k:: ; FastForward
Run C:\Program Files (x86)\iTunes\Scripts\Rewind.vbs
return
#IfWinActive, iTunes
l:: ; FastForward
Run C:\Program Files (x86)\iTunes\Scripts\FastForward.vbs
return
#IfWinActive, iTunes
f:: ; Rewind
Run C:\Program Files (x86)\iTunes\Scripts\Rewind.vbs
sleep 100
SendPlay, {Space}
SendPlay, {Space}
return |
|
|
| Back to top |
|
 |
sashabe
Joined: 09 Oct 2006 Posts: 21
|
Posted: Wed Jan 21, 2009 11:44 pm Post subject: |
|
|
| yeeha wrote: | I forgot to add the volume-up/down keys in the previous post:
^@38=Msg|iTunes|793|0|655360 ; Ctrl+Alt+Up : Volume up
^@40=Msg|iTunes|793|0|589824 ; Ctrl+Alt+Down: Volume down
Also very useful to have Volumouse installed if you click as much as you type  |
Thanks yeeha, your keys helped me ultimately. |
|
| Back to top |
|
 |
|