AutoHotkey Community

It is currently May 25th, 2012, 1:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: January 15th, 2007, 1:21 am 
Offline

Joined: February 13th, 2006, 10:40 pm
Posts: 389
Location: Utah
yeah but if you wanted your script to be closed source you wouldn't post it on the forum, or you would compile it first, so in my opinion anything on the forum is open source, so you can use it as long as you cite your sources

_________________
Image
"Power can be given overnight, but responsibility must be taught. Long years go into its making."


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Love it!
PostPosted: January 16th, 2007, 2:40 pm 
sun818 wrote:
Try iTunesKeys - It will let you rate songs. http://www.mattberube.com/software/ituneskeys/


Very useful :P


Report this post
Top
  
Reply with quote  
 Post subject: Re: maybe...
PostPosted: February 1st, 2007, 1:15 pm 
cooza wrote:
i bet you could get it to work when minimized or in tray by using part of the previous script.


Try this one. It works almost every time. It looks for hidden windows, so sometimes it finds itunes 'sidekick' windows, such as itunes remote speakers... instead of itunes main window. I'll look into that later.

Anyway, I mapped win+left to previous song, win+right to next, win+space to play/pause and win+i to launch itunes.

Enjoy

Code:
#right::
DetectHiddenWindows, On
;WinGet, active_id, ID, ahk_class iTunes
ControlSend, ahk_parent, {right}, ahk_class iTunes
;MsgBox, The active window's ID is "%active_id%".
DetectHiddenWindows, Off
return

#left::
DetectHiddenWindows, On
ControlSend, ahk_parent, {left}, ahk_class iTunes
DetectHiddenWindows, Off
return

#space::
DetectHiddenWindows, On
ControlSend, ahk_parent, {space}, ahk_class iTunes
DetectHiddenWindows, Off
return

#i::
Run %ProgramFiles%\iTunes\iTunes.exe
return


Report this post
Top
  
Reply with quote  
 Post subject: Re: maybe...
PostPosted: February 1st, 2007, 8:34 pm 
Ok, and here you go with a version that works with minimized and 'trayed' iTunes also.

Code:
; ############## iTunes ##############

; win+right -> next song
; win+left  -> previous song
; win+up    -> volume up
; win+down  -> volume down
; win+space -> play/pause
; win+i     -> play/pause

#right::
DetectHiddenWindows, On
;WinGet, active_id, ID, ahk_class iTunes
ControlSend, ahk_parent, ^{right}, iTunes ahk_class iTunes
;MsgBox, The active window's ID is "%active_id%".
DetectHiddenWindows, Off
return

#left::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{left}, iTunes ahk_class iTunes
DetectHiddenWindows, Off
return

#down::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{down}, iTunes ahk_class iTunes
DetectHiddenWindows, Off
return

#up::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{up}, iTunes ahk_class iTunes
DetectHiddenWindows, Off
return


#space::
DetectHiddenWindows, On
ControlSend, ahk_parent, {space}, iTunes ahk_class iTunes
DetectHiddenWindows, Off
return

#i::
DetectHiddenWindows, On
IfWinActive, iTunes ahk_class iTunes
   WinMinimize
else
   Run %ProgramFiles%\iTunes\iTunes.exe
DetectHiddenWindows, Off
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2007, 11:05 am 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
hey - nice one. Simple but very effective! Cheers :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2007, 5:16 pm 
Offline

Joined: January 7th, 2007, 2:11 am
Posts: 1
I only recently started getting into AHK, but this is exactly what I've been trying to do. I wonder, is this possible with any app? VLC perhaps?

Thank you, so much.

_________________
All your PDA are belong to us


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: maybe...
PostPosted: April 25th, 2007, 8:09 am 
Excellent. Very well written, I liked it simplicity. Thanks for the script. :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2007, 1:33 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
There's also a way using COM, which seems to be more reliable and it's the official way to remote control iTunes. Well, I've no script yet:

http://www.autohotkey.com/forum/topic16631-28.html

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 15th, 2007, 9:01 pm 
Hi @ all,

I´m a total newbie and have no ideas about scripting...

But I need to control my iTunes with these shortcuts either.

Can someone explain where I have to place the scipt to get these functions?

Thank you very much and sorry4lack of knowledge ;-)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2007, 9:36 am 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
Hiya h8cru. I assume you have already downloaded AutoHotkey. Just open Notepad, paste the script and save as a .ahk file. Then run the .ahk file whenever you want to use the hotkeys. If you want the script to startup whenever you turn on the computer, put it in your startup folder (C:\Documents and Settings\YOUR_USERNAME\Start Menu\Programs\Startup\).

Daorc :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2007, 9:42 am 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
Hi all,

I’ve tweaked the previous script to add the following:

Win+i now activates the search control so you can search straight away
Enter (when inside the search control) will start the songs playing that fit your search criteria and then minimise iTunes.

So now, using the following will play all the songs from your favourite band:

    Win+i
    Type “my favourite band”
    Enter


Fast, easy and simple! (I hope). Let me know how it works out ...

Code:
; ############## iTunes ##############

; win+right -> next song
; win+left  -> previous song
; win+up    -> volume up
; win+down  -> volume down
; win+space -> play/pause
; win+i     -> run
; enter (inside iTunes search control) -> play + minimise iTunes

DetectHiddenWindows, On

#right::
ControlSend, ahk_parent, ^{right}, iTunes ahk_class iTunes
return

#left::
ControlSend, ahk_parent, ^{left}, iTunes ahk_class iTunes
return

#down::
ControlSend, ahk_parent, ^{down}, iTunes ahk_class iTunes
return

#up::
ControlSend, ahk_parent, ^{up}, iTunes ahk_class iTunes
return


#space::
ControlSend, ahk_parent, {space}, iTunes ahk_class iTunes
return

#i::
IfWinExist,ahk_class iTunes
   {
   winset,top
   winactivate
   controlclick,Edit1,iTunes ahk_class iTunes ;activate the "search" control
   controlfocus,Edit1,iTunes ahk_class iTunes ;activate the "search" control
   }
else
   Run %ProgramFiles%\iTunes\iTunes.exe
return

#IfWinActive,iTunes ahk_class iTunes
~enter::
ControlGetFocus,focus_control,iTunes ahk_class iTunes
if focus_control=Edit1
   {
   PixelGetColor,playpause,82,39 ;detect pixel colour of the play/pause/stop button
   sleep 100 ;before winminimise - stops "enter" being relayed to the next down window
   winminimize
   if playpause in 0x212122,0x1B1B1C ;playing
      {
      ControlSend, ahk_parent, {space}{space} ;send "play/pause" hotkey twice (pause+play)
      return
      }
   if playpause=0xF4F5F5 ;paused or stopped
      {
      ControlSend, ahk_parent, {space} ;send "play/pause" hotkey once (play)
      return
      }
   }
return
#IfWinActive


Daorc :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: foobar
PostPosted: July 27th, 2007, 9:11 pm 
Ivan wrote:
Foobar2000 supports global key shortcuts in case anyone would like to switch to a media player that doesn't suck (on Windows, at least)


actually global hotkeys are an OS feature on most modern OS :) !!!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 8th, 2007, 8:24 pm 
Can you make it select the text already in the iTunes library search box? Just a suggestion that eliminates the need to deletes whats already there.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 8th, 2007, 9:56 pm 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
I didn't include this in my version because by doing so it would clear the search that is already playing (e.g. if I am listening to a particular band by having that band's name in the searchbox, and don't want to expand the currently list to include all of my music). If you want to change that, you can either:

press excape after pressing Win+i (this blanks the searchbox)

or

add a "controlsend" command to send the escape key just after giving the focus to the searchbox.

Daorc :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2007, 5:08 pm 
That works well enough.

good script


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, Zaelia and 22 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