alhadrad Posted March 27, 2007 Share Posted March 27, 2007 (edited) i need help i have worked with visual basic before but am hveing trouble debuging my script. i am trying to run a program that by default has a menu. there is a function to hide the menu by pressing the escape key. so in my script when the program loades immeadiately the escape key is pressed to hide the menu. i next want the program to kill using the escape key by defauld the program escape function is alt+f4. i want this script to run in the backround all the time but i can only get it to work on the initial load of the program. if anyone could help that would be great. scrip is attached. p.s. the program i am tryring to run is snes9x a open source emulator for Linux/Unix, MacOS, and Windows. hidemenu() func hidemenu() WinWaitActive("Snes9X v1.43 for Windows") send("{esc}") endfunc $hotkey = "{esc}" $hotkeyset = 0 While 1 esckill() Wend Func esckill() If $hotkeyset = 0 then HotKeySet($hotkey, "killemu") Elseif $hotkeyset = 1 then HotKeySet($hotkey) EndIf EndFunc Func killemu() $hotkeyset = 1 WinKill("Snes9X v1.43 for Windows") EndFunc WinWaitClose("Snes9X v1.43 for Windows") call hidemenu() Edited March 27, 2007 by alhadrad Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now