Jump to content

iTunes Scripting


Recommended Posts

I have searched and found this: http://www.autoitscript.com/forum/index.ph...amp;hl=toolbars

However, Im still a little lost at finding the required info.

Background Info:

I Own an iPod Touch and have IntelliRemote. The problem is that its limited to only controlling iTunes when its highlighted window. So I figured Ill look in2 scripting. So far I have it do this. This runs the simple task of Next Track and it does it whether its Minimized (Both Regular or as Toolbar). I added *Run("C:\Program Files\iTunes\iTunes.exe")* to get that done even if I have toolbar enabled.

Wanted to kno if theres a way 2 bypass Run() because I doubt its a good Idea to have it Open everytime.

Heres what Ive Written:

Run("C:\Program Files\iTunes\iTunes.exe")

WinSetState("iTunes","iTunes",@SW_MAXIMIZE)

WinActivate("iTunes","iTunes")

WinWaitActive("iTunes")

Send("{MEDIA_NEXT}")

WinSetState("iTunes","iTunes",@SW_MINIMIZE)

Link to comment
Share on other sites

Maxing itunes to change the song is unnecessary-

you might want to try using the extremely useful UDFs found here instead of sending a keystroke:

http://www.autoitscript.com/forum/index.ph...5&hl=itunes

And here's two lines of script that'll go to the next song:

$iTunesApp = ObjCreate("iTunes.Application");you only need to do this once, itunes must be open beforehand

$iTunesApp.NextTrack        ;this changes the song

edit***

And to have iTunes only run if it isnt open already try:

If Not (ProcessExists("itunes.exe")) Then
    Run("C:\Program Files\iTunes\itunes.exe")
EndIf
Edited by protoid
Link to comment
Share on other sites

Thanx alot. It was looking like a foreign language at first but its making sense now :mellow:

Ive altered this so its only 1 button on my iPod Touch as an example. Just would like a thumbs up if Im in right direction :(

$iTunesApp = ObjCreate("iTunes.Application");you only need to do this once, itunes must be open beforehand
If $iTunesApp.VisualsEnabled = 0 Then
        $iTunesApp.VisualsEnabled = 1
    Else
        $iTunesApp.VisualsEnabled = 0
    EndIf
Link to comment
Share on other sites

look at the iTunes udf in my signature :mellow:

cheers

Edit: oops... didn't notice the link XD

Edited by torels

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...