 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
polyphenol
Joined: 07 Oct 2005 Posts: 1
|
Posted: Fri Oct 07, 2005 12:33 pm Post subject: iTunes Anywhere (keyboard shortcuts) |
|
|
Just a little script for controlling iTunes from any window using keyboard shortcuts. Feel free to change them to your liking, of course. Changed it to use winkey[#]. You could change it to ctrl[^] or ctrl-alt[^!] or ctrl-shift[^+],etc. . Man, I love AutoHotkey.
Let me know of any problems or ideas. I am just getting aquainted with an app called 'Winspector Spy', mentioned somewhere in these here forums.
Hotkey List
--------------------------
winkey + \ = launch iTunes or hide/show
winkey + . = next song
winkey + , = previous song
winkey + / = play/pause toggle
winkey + ; = volume up
winkey + ' = volume down
winkey + = = preview song every 10 sec
winkey + - = stop preview mode
--------------------------
Peace, Dave
| Code: | ; iTunes Anywhere
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Polyphenol <myemail@nowhere.com>
;
; Script Function:
; Control iTunes from anywhere with hotkeys
;
#NoTrayIcon
#SingleInstance force
DetectHiddenWindows, on
#\::
IfWinNotExist, ahk_class iTunes
{
Run %ProgramFiles%\iTunes\iTunes.exe ;launch program
return
}
IfWinExist, ahk_class iTunes ; toggle minimize/restore
{
IfWinNotActive ; restores window
WinActivate
Else
WinMinimize ; minimizes windows
return
}
#.::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{RIGHT} ; > next
return
#,::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{LEFT} ; < previous
return
#/::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, {SPACE} ; play/pause toggle
return
#;::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{UP} ; vol up
return
#'::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{DOWN} ; vol down
return
#=::
SetTimer, songpreview, 10000 ; change song every 10 sec
songpreview:
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{RIGHT}
return
#-::
SetTimer, songpreview, Off
return
;endofscript |
|
|
| Back to top |
|
 |
gbo
Joined: 27 Jul 2005 Posts: 1 Location: Lausanne (Switzerland)
|
Posted: Wed Jan 11, 2006 9:00 pm Post subject: |
|
|
Thank you, I was looking for that and you've done it  _________________ _________________
Best Regards
Gil
Use what talents you possess;
the woods would be very silent if no
birds sang except those that sang best. |
|
| Back to top |
|
 |
Szara Guest
|
Posted: Fri Jun 23, 2006 3:15 pm Post subject: |
|
|
| I quit using iTunes in Windows solely because I couldn't figure out how to do this. Thank you much! |
|
| Back to top |
|
 |
johnnysoko
Joined: 22 Jul 2006 Posts: 2
|
Posted: Sat Jul 22, 2006 5:42 am Post subject: Rating songs? |
|
|
I'm wanting to use AutoHotkey to create a small device that I can use to remotely control itunes. One of the features I really want is to be able to rate songs while I'm 20 ft from the computer. Is there a way to include 'rate current song' and choose between 1 and 5 stars usings hotkeys?
Thanks. |
|
| Back to top |
|
 |
Sivoev Guest
|
Posted: Sat Jul 22, 2006 9:08 pm Post subject: |
|
|
| umm not very likely. unless there already is a hotkey for it (and there isnt as far as i know) it would be difficult at best, involving some kind of advanded control mouse click (if possible) |
|
| Back to top |
|
 |
johnnysoko
Joined: 22 Jul 2006 Posts: 2
|
|
| Back to top |
|
 |
Niiklas Guest
|
Posted: Wed Jul 26, 2006 12:51 am Post subject: |
|
|
| These commands doesn't work when I minimize iTunes to the traybar. Do you think you can fix that? |
|
| Back to top |
|
 |
Ivan Guest
|
Posted: Wed Jul 26, 2006 10:45 am Post subject: foobar |
|
|
| Foobar2000 supports global key shortcuts in case anyone would like to switch to a media player that doesn't suck (on Windows, at least) |
|
| Back to top |
|
 |
sun818 Guest
|
|
| Back to top |
|
 |
Rob H Guest
|
Posted: Mon Jan 01, 2007 4:36 am Post subject: |
|
|
Ok ,so this works great for me, but I'm wondering if its possible to send the imput to a different computer on a network using global hotkeys and how hard that would be to do.
Also if thats too hard I have an alternative, I run a program that simulates multiple monitors, maybe i could make a script that would in effect move the cursor to the left say 1500 pixles or whatever, sends an imput, then goes back to the original position. Then on the client computer i would have the above script.
if anyone feels ambitious or just wants to help or give advice you can email me at:
Rob[*dot*]Hyman[*at*]gmail[*dot*]com |
|
| Back to top |
|
 |
Veovis
Joined: 13 Feb 2006 Posts: 390 Location: Utah
|
Posted: Tue Jan 02, 2007 12:07 am Post subject: |
|
|
Here is my script for controlling iTunes:
Infortunately, it does not work when iTunes is minimized or chilling in the tray, but if you just have it hiding behing whatever your working on, it works fine. Enjoy!
| Code: | /*
---------------------iTunes Helper----------------------------
------------------------by Veovis-----------------------------
Control iTunes from any program, even full screen ones. Use the
Song Selector to choose what song to play, and the commands to
play,pause,skip songs, or change volume.
.-= Song Selector =-.
Hotkey: Ctrl /
Press the hotkey, type something, then press enter (or wait for
the 5 second timeout) and iTunes will perform a search and play
all songs that have your critia in the name, artist, album, etc.
So typing aquabats will play all songs by the aquabats, and
"aqua charge" would play all songs by aquabats in album charge.
.-= Commands =-.
Hotkey: Ctrl . (period)
Press ctrl . to have the computer listen for one of the following:
- space Play/pause current song.
- p Start song over (type 2p to play previous song)
- n Play next song.
- shift p Play previous album.
- shift n Play next album.
(in the following # means NUMBERS not WINKEY)
- #p/#n/#P/#N Go forward/back # songs/albums
If you type a number, then p,n,P or N then iTunes will go
forward/back that many songs/albums, for ex: 6n would go
forward six songs and 2P will go back 2 albums
- # enter If you type a number between 0 and 100 and press
enter it will set the iTunes volume to the nearest
5%. So pressing 37enter will set it to 35.
- escape Cancel
For Example:
Pressing: Does:
{ctrl}/aquabats Plays all songs that match "aquabats" (using iTunes search)
{ctrl}.{space} Play/pause
{ctrl}.p Previous song
{ctrl}.n next song
{ctrl}.{shift}p Previous album
{ctrl}.{shift}n Next Album
{ctrl}.4p go back 4 songs
{ctrl}.5{shift}n go forward 5 albums
{ctrl}.50 Set volume to 50%
*/
#singleinstance force
#NoEnv
SendMode Input
SetFormat,float,0.0
SetKeyDelay 25
StringCaseSense, On
^/::
Input, UserInput, T5,{enter}{escape}
ifequal,userinput,, return ;if no input, dont continue
ifequal,errorlevel,EndKey:Escape,return ;if you press escape dont do anything
controlsend,edit1,{esc},iTunes ;this fixes a bug if your last search returned nothing
loop, 2 ;dont know why this is necesary, just dont remove it
{
controlsettext,edit1,%userinput%,iTunes
controlsend,,{enter}{tab}{down}{enter},iTunes
}
return
^.::
Input,command,C t3 *,{enter}, ,p,n,P,N
if errorlevel = Match
{
stringright,key,command,1
stringtrimright,count,command,1
if key = %A_space%
controlsend,ahk_parent,{space},iTunes
if key = p
controlsend,ahk_parent,{left %count%},iTunes
if key = n
controlsend,ahk_parent,{right %count%},iTunes
if key = P ;previous album
controlsend,ahk_parent,+^!{left %count%}{alt up}{control up}{shift up},iTunes
if key = N ;next album
controlsend,ahk_parent,+^!{right %count%}{alt up}{control up}{shift up},iTunes
}
if command = 0
controlsend,ahk_parent,^+{down}{shift up}{ctrl up},iTunes
else if command = 100
controlsend,ahk_parent,^+{up}{shift up}{ctrl up},iTunes
else if (command > 0) and (command <= 50)
{
steps := round(command*2,-1)/10
volume := steps*5
controlsend,ahk_parent,^+{down}{shift up}{ctrl up},iTunes
controlsend,ahk_parent,^{up %steps%}{ctrl up},iTunes
}
else if (command > 50) and (command < 100)
{
steps := round((100 - command)*2,-1)/10
volume := 100 - steps*5
controlsend,ahk_parent,^+{up}{shift up}{ctrl up},iTunes
controlsend,ahk_parent,^{down %steps%}{ctrl up},iTunes
}
return |
_________________
"Power can be given overnight, but responsibility must be taught. Long years go into its making." |
|
| Back to top |
|
 |
cooza Guest
|
Posted: Wed Jan 03, 2007 10:26 pm Post subject: maybe... |
|
|
| i bet you could get it to work when minimized or in tray by using part of the previous script. |
|
| Back to top |
|
 |
brandon_r87 Guest
|
Posted: Sun Jan 14, 2007 5:15 pm Post subject: |
|
|
Hi,
I'm making a simple GlovePie script so I can control iTunes with my Wii remote, mind if I include this script or link here so people can see what they need for the global shortcuts? |
|
| Back to top |
|
 |
Veovis
Joined: 13 Feb 2006 Posts: 390 Location: Utah
|
Posted: Sun Jan 14, 2007 8:56 pm Post subject: |
|
|
of course! go ahead! the whole point of autohotkey is that its open source, and everyone helps each other out. If we wanted to not share our source, we could compile it, but here everyone helps each other out! Just make sure to say where you got your code from. _________________
"Power can be given overnight, but responsibility must be taught. Long years go into its making." |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3005 Location: Minnesota
|
Posted: Mon Jan 15, 2007 1:18 am Post subject: |
|
|
| Just a small note, AutoHotkey itself is open-source, but it's at the scripter's discretion as to whether their creation will also be open-source. You could even distribute a commercial application written in AutoHotkey. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|