Jump to content
Sign in to follow this  
YaKillaCJ

iTunes Scripting

Recommended Posts

YaKillaCJ

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)

Share this post


Link to post
Share on other sites
protoid

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

Share this post


Link to post
Share on other sites
YaKillaCJ

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

Share this post


Link to post
Share on other sites
torels

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.