| 1. |
Solve : starting program in dos? |
|
Answer» Hi guys, also, when i try this on say, superscan, i start it fine and now am able to input info in the box, but what would the command be to make a button click called "Me" under the ip address i entered. Using only the keyboard, what actions do you have to take to give the "Me" button focus? It is these actions you need to script. Once the "Me" button has focus, sending the enter key will produce the button click. Note: If your application is updated, your script may break. Just something to be aware of. PS. I've always called the tilde a squiggle, but you won't find that in any reference. Nice site, Sidewinder. Mobzy, I think you will want to try the following right now: WshShell.SendKeys "~" or WshShell.SendKeys "ENTER" and WshShell.SendKeys "TAB" Just imagine you don't have a mouse and you have to use your keyboard but record all the keystrokes you make and turn it into a script.Thanks for your answer and trying to help me. ive added: set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "scanner.exe" WScript.Sleep 100 WshShell.AppActivate "scanner" WScript.Sleep 100 WshShell.SendKeys "Me" WScript.Sleep 100 WshShell.SendKeys "~" WScript.Sleep 100 WshShell.SendKeys "TAB" WScript.Sleep 2500 and set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "scanner.exe" WScript.Sleep 100 WshShell.AppActivate "scanner" WScript.Sleep 100 WshShell.SendKeys "Me" WshShell.SendKeys "TAB" WScript.Sleep 100 WshShell.SendKeys "~" WScript.Sleep 100 and still the same thing. you say imagine i have no mouse, but when i try and press keys to see what buttons activate i just hear error sounds. Am i doing it right? thanks again .SOMETHING great happened thanks to you sir. ill post more in a bit. i thankyou so much!!!!you way works perfect and i understand about the imagine no mouse thing i was curious, say i wanted to enter an ip into the box normally id use WshShell.SendKeys "192.168.0.1" WScript.Sleep 100 how .. now this i think is confusing, would i be able to have a small dialog popup, and user enter an IP into that, and click ok, and it echos the info back into the superscan. hah, hard 1 ay?Glad you got it working. Quote how .. now this i think is confusing, would i be able to have a small dialog popup, and user enter an IP into that, and click ok, and it echos the info back into the superscan. Why the confusion? Typing into a small dialog popup is no different from typing into the scanner GUI. Quote hah, hard 1 ay? Not nearly as difficult as you might imagine. Check out this site for some ideas. thanks for advice above mate, ill check it out in a bit. I need some help guys. if used TAB to cycle through menus, and also ctrl+tab.. i found more menus, n cant seem to get anywhere, no commands seem to work to cycle through. any idears? maybe they arnt true gui buttons, but they link to say, start scan and they scan. ( not superscan ). Ive hiy a brick wall!:( any ideas? id really appreciated it!!! The plot thickens. With Windows objects, this can be accomplished by first writing a script to display all the verb names for an object and their values. With this information, you can work backwards to script the GUI. This was demonstrated in the second example. If your application supplied a COM object, you may have to research either the registry or an object browser for the program id and go from there. The sendkeys method has codes for almost every key or key combination except PRNTSCRN. You'll have to manually go through the key sequences needed to accomplish your task and then script every single keystroke. This can be a bit tedious so check out if your application has command line parameters where you can accomplish your task from the command prompt. If you give us more info on the superscan program, exact name and version, perhaps one the the members will have some experience with this specific software. Good luck. |
|