advanced search

VBsvript Sendkeys (Example Credit Card Number)


VBscript: Very powerful scripting that can be used to do virtually anything A simple sendkeys to the current screen: For example, entering credit card number... Place a sticker on you credit card (or not!) Create a vbscript file in c:\tikicard called myscript.vbs with a text editor add this text and save then create a shortcut myscript.vbs in the same directory and call it myscript. At the text box on the web page that requires your card number, touch in your credit card with your tikitag sticker (Obviously changing "4929000000006" to whatever card number you want to use) Example 1 using objShell.SendKeys "Any data I want to pretend is from the keyboard" Option Explicit Dim objShell, WshShell set objShell = CreateObject("WScript.Shell") objShell.SendKeys "4929000000006" WScript.Quit Example 2 Sending 2 screens of data using cursor movement and the sleep command (WScript.Sleep "milliseconds to wait") to let the pages catch up Option Explicit Dim objShell, WshShell set objShell = CreateObject("WScript.Shell") objShell.SendKeys "4929000000006" objShell.SendKeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}" objShell.SendKeys "123" objShell.SendKeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}" objShell.SendKeys "{ENTER}" WScript.Sleep 500 objShell.SendKeys "{TAB}{TAB}" objShell.SendKeys "{ENTER}" WScript.Quit Example 3 Run Progams and send keys using objShell.Run("my command") Option Explicit Dim objShell, WshShell set objShell = CreateObject("WScript.Shell") objShell.Run("cmd") WScript.Sleep 500 objShell.SendKeys "dir" objShell.SendKeys "{Enter}" WScript.Sleep 3500 objShell.SendKeys "Exit" objShell.SendKeys "{Enter}" WScript.Quit Useful List of Special SendKeys commands: BACKSPACE {BACKSPACE}, {BS}, or {BKSP} BREAK {BREAK} CAPS LOCK {CAPSLOCK} DEL or DELETE {DELETE} or {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER} or ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} or {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT} SCROLL LOCK {SCROLLLOCK} TAB {TAB} UP ARROW {UP} F1 {F1}

 
4.8
Your rating: None Average: 4.8 (5 votes)