Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send a keystroke "ctrl+alt+shift+PageUp" in *.vbs file?

Status
Not open for further replies.

maysider

Technical User
Apr 5, 2006
15
CZ
How to send a keystroke in WXP "ctrl+alt+shift+PageUp" from *.vbs file?
I have this (all text):

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^%+{PGUP}" 'enlarge subtitle'

I really don't know, why it doesn't run.

Not even "^%{PGUP}" takes effect.

thanx
 
You may have to play with the WshShell.AppActivate method before sending keystrokes.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sendkeys is evil but if you are stuck with having to do it for some reason, then I suggest using AutoIt if that is feasible for your situation.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
PHV: unfortunately this doesn't solve the problem
EBGreen and PHV: My task was to zoom in / zoom out a FFDShow subtitle via Girder or via *.vbs file, but FFDShow has a speciality, which doesn't allow this with any simple keystroke. I have to use ONLY a keyboard.....very interesting and very sorrowful :((
 
Is it possible for you to use AutoIt in your environment? If so, it has much better sendkeys support than native vbscript does.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
EBGreen: by chance....Do you know, what does the exact orders the AutoIt use? E.g. a keystrokes by number in ASCII or anything else?
thanx
 
Here is a link to the AutoIt documentation. It should be able to answer any questions that you have about AutoIt's functionality:


[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top