-
July 22nd, 2019, 02:48 PM
#1
How do I minimize a window in VBScript
Hello,
I am not a programmer but I find a VBScript file which it works to play a mp3 , and now when the mp3 file play the windows media player or other windows player like VLC, it popups , my question is how to minimize the windows media player directly or without see it when it plays the mp3, which command do I need to add thank you
this is the VBScript I use which it works to play the a mp3 file
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "d:\Image\Cabin\AFTER_LANDING.mp3"
Wscript.Sleep 500
WshShell.SendKeys "^a"
Wscript.Sleep 500
WshShell.SendKeys "{ENTER}"
-
July 28th, 2019, 03:09 AM
#2
Re: How do I minimize a window in VBScript
-
July 28th, 2019, 04:22 AM
#3
Re: How do I minimize a window in VBScript
Thanks Arjay for your respond, as I mentioned that I do not know much about this, can you give me an example how to add the parameter a 0 in this script thanks.
-
July 28th, 2019, 04:27 AM
#4
Re: How do I minimize a window in VBScript
Code:
WshShell.Run ("d:\Image\Cabin\AFTER_LANDING.mp3", 0)
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 28th, 2019, 09:26 AM
#5
Re: How do I minimize a window in VBScript
Thanks also 2kaud
I did as your example but I got an error
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("c:\Temp\Cabin\FSL_A320X_CABIN_PA_AFTER_LANDING.mp3", 0)
Wscript.Sleep 500
WshShell.SendKeys "^a"
Wscript.Sleep 500
WshShell.SendKeys "{ENTER}"
this the error I got
-
July 28th, 2019, 09:59 AM
#6
Re: How do I minimize a window in VBScript
Try
Code:
WshShell.Run "d:\Image\Cabin\AFTER_LANDING.mp3", 0
Sorry, but my VBscript is rusty - I usually program in c++ which requires the ()
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 28th, 2019, 11:44 AM
#7
Re: How do I minimize a window in VBScript
Okay no problem, maybe someone else know how ;-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|