AutoHotkey Community

It is currently May 26th, 2012, 11:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: November 11th, 2009, 8:08 am 
Offline

Joined: December 20th, 2005, 7:14 pm
Posts: 61
is there a way to detect if itunes or windows media player is playing a song?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2009, 10:12 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
If you mean, is there a universal way to detect whether both applications are playing audio, probably not.

I'm pretty sure you will have to figure it out separately for both.

Is this what you mean?

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2009, 11:41 am 
yes and no. it does answer half of my question as to whether there's a universal way but since there's not, i'd like a specific answer to itunes and windows media player. thanks for taking the time to answer though.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2009, 11:58 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
AFAICT this is the simplest way to tell if Itunes is playing.
Code:
ControlGetText, plyStat, Button10, ahk_class iTunes
    If plyStat Contains pause
   msgbox, Itunes is playing.
    else
   msgbox, Itunes is not playing.
This works in Itunes 8.1.1.10.

Looking for a way to return the status of WMP ;).

edit:

Looks like your going to have to use COM to figure out wheter or not WMP is playing.
See here: http://www.autohotkey.com/forum/viewtopic.php?t=33686

IMO this is hell just to find out whether or not its playing and results will probably be OS and version dependent.

You could always cheat by getting the color of a pixel on the play button.

Good luck!

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], hyper_, Leef_me, Pulover, rbrtryn, XstatyK 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