Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate [英] Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate

查看:93
本文介绍了Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Heya

我已经在我的启动文件夹中写了/发现了这个脚本。当计算机开启时,它启动Windows媒体播放器播放名为XPS的播放列表。由于启动媒体播放器否定任何命令行以最小化它,这个脚本
将填写,等待5秒后假设媒体播放器打开它然后最小化它。

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")

如果成功,则shell.sendkeys"%n"

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"

 

现在我已经测试了这个脚本,它适用于像mspaint,记事本和计算器这样的东西。我认为问题在于"success = shell.appactivate(" Windows Media Player")"如在Windows媒体播放器中不是正确的"标题名称"如果你愿意,但我得到了
不知道放在哪里。

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.

 

在互联网上搜索了一会儿我确实遇到过称为"API"的东西。这意味着允许你捕捉窗户这对我有用吗?

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

 

*额外信息我没有任何编程软件都是用记事本完成的,并命名为.vbs:)

*Extra Info i don’t have any programming software this was all done with a notepad and naming it .vbs :)

推荐答案

这是VB.NET论坛。 :)

This is the VB.NET forum. :)

要回答您的问题,请在下面的链接中查看VBScript论坛并在那里提出您的问题:

For response to your question, look in the link below for the VBScript forum and ask your question there:


这篇关于Windows Media Player 12 - Sendkeys - VBScript - shell.appactivate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆