Jump to content

ControlSend


Recommended Posts

I'm trying to send a delete signal to the windows media player to delete the currently playing song. So i tryed

ControlSend ( "Windows Media Player", "", "1", "{DEL}" )
but it doesn't work. i was wondering is anyone saw anything i was doing wrong or if anyone knows of another way, cause i couldn't find and hotkey combination to delete it.

Link to comment
Share on other sites

Well it seems there is a typo in the help file I think...

ControlSend ( "title", "text", controlID, "string" [, flag])

Should be...

ControlSend ( "title", "text", ClassNameNN , "string" [, flag])

This work's...

ControlSend ("Windows Media Player", "", "ATL:SysListView321", "{DEL}")

You many need to use the below but if the "Now playing" list wasn't in focus.

ControlSend ("Windows Media Player", "", "ATL:SysListView321", "{DEL 2}")

If it wasn't in focus and you use the first code above it will simply highlight it, using the second code, even if the playlist is not in focus it will still work :).

Edited by Burrup

qq

Link to comment
Share on other sites

Forget what I said about typo in the help file. And what you posted first was very close to right, should use your way as its easier and less space :).

ControlSend ( "Windows Media Player", "", 1, "{DEL}" ); < works

You had...

ControlSend ( "Windows Media Player", "", "1", "{DEL}" )

Using the quotation marks caused the 1 to be interpreted as a string instead of an integer, next remove the quotes and it will work fine :evil:.

Edited by Burrup

qq

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...