 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ophthalmos
Joined: 17 Jun 2008 Posts: 17 Location: Kiel, Germany
|
Posted: Tue Jul 01, 2008 10:26 pm Post subject: AutoHotkey 4 iTunes |
|
|
This script lets you control iTunes with global hotkeys and visual feedback.
14.4.09: New Version (2.0). Now COM.ahk from Sean is used (http://www.autohotkey.com/forum/topic22923.html).
3.9.09: New Version (2.1). Revised and extended version.
27.9.09: Version 2.2. Bug fixes. Thanks to wrecklass.
16.12.09: Version 2.3. New features: change playlist (ctrl-win-p), search dead tracks; bug fixes
This script uses much other code I found in this forum. Pars pro toto special thanks to infogulch for showing, how to work with trackart.
Download latest version (2.3): http://www.autohotkey.net/~ophthalmos/ahk_4_iT.zip
Last edited by ophthalmos on Wed Dec 16, 2009 11:55 am; edited 22 times in total |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Tue Jul 01, 2008 10:35 pm Post subject: |
|
|
Ohne code-Tag gehen leider alle Zeileneinzüge flöten (sofern überhaupt welche vorhanden waren). Etwas, was bei einem Script > 3 Zeilen absolut kontraproduktiv ist.  |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Wed Jul 02, 2008 10:31 am Post subject: |
|
|
Please use LTrim Join and break your lines.
But very impressive script.
One thing I noticed:
| Code: | | If Lang = 07 ; 0407, 0807 Swiss, 0c07 Austrian, 1007 Luxembourg, 1407 Liechtenstein |
you can use
| Code: | | If Lang in 07,0407,0807,0c07,1007 ; 0407, 0807 Swiss, 0c07 Austrian, 1007 Luxembourg, 1407 Liechtenstein |
|
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Wed Jul 02, 2008 10:33 am Post subject: |
|
|
My code went missing
| Code: | | If Lang = 07 ; 0407, 0807 Swiss, 0c07 Austrian, 1007 Luxembourg, 1407 Liechtenstein |
you can use
| Code: | | If Lang in 07,0407,0807,0c07,1007 ; 0407, 0807 Swiss, 0c07 Austrian, 1007 Luxembourg, 1407 Liechtenstein |
|
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Wed Jul 02, 2008 10:35 am Post subject: |
|
|
| I have no idea why I can't see the code I posted, must be on my end. |
|
| Back to top |
|
 |
ehagood
Joined: 30 Jan 2006 Posts: 50
|
Posted: Thu Sep 25, 2008 10:24 pm Post subject: |
|
|
Wow ophthalmos,
I just downloaded this and it is great. Excellent job!
ehagood |
|
| Back to top |
|
 |
ophthalmos
Joined: 17 Jun 2008 Posts: 17 Location: Kiel, Germany
|
Posted: Tue Apr 14, 2009 11:41 am Post subject: New Version |
|
|
I've changed the first message and posted a new version of the code.
Version 1.0 used ws4ahk.ahk, written by erictheturtle.
Version 2 uses COM.ahk by Sean because it allows to evaluate events. |
|
| Back to top |
|
 |
gregster
Joined: 19 Mar 2009 Posts: 9
|
Posted: Tue Apr 14, 2009 6:30 pm Post subject: |
|
|
Actually I learned my first ahk two months ago by going line by line through your first version, because I planned to make some extensions to iTunes myself. Thank you very much for that. It helped a lot to get things started.
Later I discovered Infogulch's script and I liked it even a little bit better because of the COM usage which has the advantage of processing events, like you stated correcly. That was a good lesson, too. Thanks to infogulch for that.
I'm looking forward to examine your code and perhaps I am able to learn again something although I have now already some experience with the COM thing. I'll my post my iTunes script in a few weeks (still very beta) and may be it will be interesting for you, too. Although I assume that some of my extensions are quite special for my needs
Anyway many thanks for the said reasons. |
|
| Back to top |
|
 |
Voltron43
Joined: 27 Mar 2009 Posts: 76 Location: Dublin, IE
|
Posted: Thu Apr 30, 2009 5:29 pm Post subject: |
|
|
There are a few language issues that need to be fixed.
Added Line 57:
Edit Line 174:
Was
| Code: | | Menu, Tray, Add, Beenden, ExitiTunes |
Is
| Code: | | Menu, Tray, Add, %lng_Exit%, ExitiTunes |
Edit Line 861:
Was
| Code: | | iTRating = unbewertet |
Is
| Code: | | iTRating = %lng_NotRated% |
It'd also be great to have the script check to see if iTunes is already running. Also to have the option for the script to exit iTunes or not and to start iTunes or not. _________________ My Scripts |
|
| Back to top |
|
 |
victorng
Joined: 01 Mar 2009 Posts: 4
|
Posted: Tue May 12, 2009 1:17 pm Post subject: |
|
|
wow thank you for writing this, probably the most complete iTUnes I've seen, save me so much time using iTunes
My questions/suggestions:
- Everytime I open iTunes/the script, it automatically play the first song of the first album, which is annoying since then i have to pause it manually, how do I disable this?
- I know you can do this by editing the script, but still, would you add the options to allow users to choose what kind of tags to be shown, or could you tell me how to do that manually?
for exp, I don't care about my song's bit rate & file size or song duration that much, and would only needs song name, artist name & album name along with album cover.
Thank you very much |
|
| Back to top |
|
 |
ophthalmos
Joined: 17 Jun 2008 Posts: 17 Location: Kiel, Germany
|
Posted: Tue May 12, 2009 6:43 pm Post subject: |
|
|
Dear folks, thank you for the feedback.
To Voltron43: I’ve corrected the script with yours suggestions. Thank you very much.
I have avoided adding options, because this needs an additional ini-file or registry-entries. I am afraid of the work.
For calling the script, I use another script (my ever-running script) with the following code:
| Code: | /*
This script starts ahk_4_iT.ahk and iTunes.
If the script is still running, it terminates the script, but not iTunes.
If the script is loaded in the editor (UltraEdit), this window is ignored.
*/
DetectHiddenWindows, on
IfWinExist, % "ahk_id " WinExist("ahk_4_iT.ahk"),, UltraEdit
PostMessage, 0x111, 65405, 0
Else
Run, ahk_4_iT.ahk,, UseErrorLevel
If ErrorLevel = Error
MsgBox, «ahk_4_iT» failed to start.`nPerhaps it is not found.
|
I hope this enables one of your wishes at least.
Last edited by ophthalmos on Tue May 12, 2009 7:08 pm; edited 2 times in total |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 417
|
Posted: Tue May 12, 2009 6:52 pm Post subject: |
|
|
| ophthalmos wrote: | | I have avoided adding options, because this needs an additional ini-file or registry-entries. |
One little INI file isn't really an issue when it adds tons of value to the script. You can also use the AHK file as your INI as long as you don't compile it, just wrap the INI sections in /* comments.
Why are you using 3 levels of WinExist? |
|
| Back to top |
|
 |
Voltron43
Joined: 27 Mar 2009 Posts: 76 Location: Dublin, IE
|
Posted: Wed May 13, 2009 5:08 pm Post subject: |
|
|
| victorng wrote: | | - Everytime I open iTunes/the script, it automatically play the first song of the first album, which is annoying since then i have to pause it manually, how do I disable this? |
You can either comment/remove line 138 or add a PlayPause line right after line 139. I do the latter to load the song info in the popup window.
| Code: | COM_Invoke(iTunesApp, "Play")
COM_Invoke(iTunesApp, "PlayPause") |
I've also edited line 143 to minimize iTunes upon startup.
| Code: | | COM_Invoke(COM_Invoke(iTunesApp, "BrowserWindow"), "Minimized", "True") |
_________________ My Scripts |
|
| Back to top |
|
 |
ophthalmos
Joined: 17 Jun 2008 Posts: 17 Location: Kiel, Germany
|
Posted: Wed May 20, 2009 7:31 pm Post subject: update |
|
|
| An extended version with the possibility of individual settings for the modifier hotkeys and the behavior at start-up can be downloaded as an exe-file from this website. Those who want the source code are welcome to contact me. Use the formula on that site. |
|
| Back to top |
|
 |
Bidomo in guest mode Guest
|
Posted: Mon Jul 27, 2009 5:28 pm Post subject: Crashing... |
|
|
Hi people!
I've been using this script for a couple days, and i've noticed that autohotkey (not compiled) gives an error in music files larger than 17 minutes, while playing pordcast or larger music files |
|
| 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
|