Hello, i need to know how to send a pause/start command to a program, vlc media player.
I have been googling like a maniac but still didn't find anything.
Thnx so much for your time!
Send pause command to vlc?
Moderator: DosItHelp
Re: Send pause command to vlc?
Take AutoIt and send a <space> to the VLC window.
Re: Send pause command to vlc?
Alos, VBscript can do that, try this code, it will open a notepad and write text in and save it in your D drive
make sure to leave empty line at the end of this batch,
The code work on the active window, so if you wanted to apply that to your vlc, it must be the active window in that moment, to send a space bar key, replace "Welcome to DosTips.com{ENTER}^sD:\dotsips.txt" with " " (single space)
adjust the 3000 as you need to make a delay (1000=1 seconds)
See Theis Topic for more keyboard keys : Link
Code: Select all
@Echo OFF
( FOR /F "tokens=1*" %%a IN ('findstr "^:write: " ^< "%~F0"') DO Echo.%%b )>"%~DP0write.vbs"
Cscript //nologo "%~DP0write.vbs"
Exit
:write: Dim WshShell
:write: Set WshShell = WScript.CreateObject("WScript.Shell")
:write: WshShell.Run("cmd /c notepad.exe")
:write: WScript.Sleep 1000 ' five seconds as a delay
:write: WshShell.SendKeys "Welcome to DosTips.com{ENTER}^sD:\dotsips.txt"
:write:
REM Leave Empty Line after this one
The code work on the active window, so if you wanted to apply that to your vlc, it must be the active window in that moment, to send a space bar key, replace "Welcome to DosTips.com{ENTER}^sD:\dotsips.txt" with " " (single space)
adjust the 3000 as you need to make a delay (1000=1 seconds)
See Theis Topic for more keyboard keys : Link
Re: Send pause command to vlc?
'
With vbScript there is no way to guarantee the window will be active during send.
autoIT knows
Clicks are bulletproof.
With vbScript there is no way to guarantee the window will be active during send.
Code: Select all
oWSH.AppActivate( title )
oWSH.SendKeys( " " )
Code: Select all
If sendKeepActive( $title, $text ) Then send( "{SPACE}" )
Code: Select all
ControlClick( $title, $text, $controlID )