| View previous topic :: View next topic |
| Author |
Message |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Fri Jul 04, 2008 5:09 am Post subject: iTunes Play Status |
|
|
Is there a way to identify the iTunes playing status?
I am guessing something along the lines of like...
| Code: | ; current play status (0=Pause/Stopped, 1=Playing)
If( iTunesPlayStatus == 0 ) ; iTunes not playing
{
ControlSend, ahk_parent, {space} ; Play
}
else
{
ControlSend, ahk_parent, {space} ; Pause/Unpause
}
return
|
Any ideas? _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
John W
Joined: 09 Apr 2007 Posts: 169
|
Posted: Fri Jul 04, 2008 12:34 pm Post subject: |
|
|
Try the Spy in the installation directory of AHK. Maybe there is a difference between playing and not playing in the output. Then you can compare. _________________ John
Inactive - Until AutoHotkey is available for Linux. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1323
|
Posted: Fri Jul 04, 2008 1:40 pm Post subject: |
|
|
I once wrote a script to a request of a member. I don't know if it'll work or not as I don't use iTunes, however, here it is anyway.
| Code: | COM_Init()
piT := COM_CreateObject("iTunes.Application")
; pevent := COM_ConnectObject(piT, "iTunes_")
MsgBox % ITPlayerState := COM_Invoke(piT, "PlayerState")
/*
ITPlayerStateStopped = 0
ITPlayerStatePlaying = 1
ITPlayerStateFastForward= 2
ITPlayerStateRewind = 3
*/
; COM_Release(pevent)
COM_Release(piT)
COM_Term()
Return
iTunes_OnPlayerStopEvent(prms)
{
MsgBox % "The stopped track number: " . COM_DispGetParam(prms)
}
|
|
|
| Back to top |
|
 |
|