Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate

Author Message
IanN

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 6/17/2011
  • Status: offline
Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate Friday, June 17, 2011 2:56 PM (permalink)
0
Heya
I have written/found this script on the idea it goes in my start up folder. When the computer is turned on it starts windows media player playing my playlist called XPS. As starting media player in this negates any commands lines to minimize it this script would fill in, after waiting 5 seconds and assuming the media player is open it then minimizes it.
set shell = Wscript.createobject("wscript.Shell")
shell.run "wmplayer /playlist xps", 7, False    
wscript.Sleep 5000    
success = shell.appactivate("Windows Media Player")
if success then shell.sendkeys "% n"
 
Now i have tested this script and it works for stuff like mspaint, notepad and calculator. I think the problem lies within "success = shell.appactivate("Windows Media Player")" as in Windows media player is not the correct "title name" if u will but i got no idea what to put in its place.
 
After searching the internet for a while i did come across something called "API" which is meant to allowed u to capture windows would this be any use to me??
 
*Extra Info i don’t have any programming software this was all done with a notepad and naming it .vbs :)


 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 2 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9