• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

n00b problem: VBScript

Schadenfroh

Elite Member
writing an automated install for quicktime alternative and im making a vbscript to go thru the intall and not install WMP classic

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("quicktime.exe")
WScript.Sleep 1500
WshShell.SendKeys "~"
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 1000
WshShell.SendKeys "{DOWN}"
WScript.Sleep 1000
WshShell.SendKeys "{DOWN}"
WScript.Sleep 1000
WshShell.SendKeys "{SPACE}"

always gives me an error that halts the program and says that line 12, WshShell.SendKeys "{SPACE}", is invalid

i thought that WshShell.SendKeys "{SPACE}" was the correct way of making a spacebar hit, right?
 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthsendkeys.asp

Remarks

Use the SendKeys method to send keystrokes to applications that have no automation interface. Most keyboard characters are represented by a single keystroke. Some keyboard characters are made up of combinations of keystrokes (CTRL+SHIFT+HOME, for example). To send a single keyboard character, send the character itself as the string argument. For example, to send the letter x, send the string argument "x".

Note To send a space, send the string " ".


I don't know VBscript, but hope it helps
 
Back
Top