Jump to content

script close/pause on key press


Recommended Posts

  • Developers

hi there i want to make a shutdown/close feature for the script when i press a key is this posible and how is it done if it is. i have read in the help file and found nothing usefull yet can some one assist me pls

<{POST_SNAPBACK}>

just look for hotKetSet()....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Here you go, this is my code

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Davo818
;
;Save your ass
;www.Gamerzvault.com
; ----------------------------------------------------------------------------

; Script Start - Add your code below here


HotKeySet("{ESC}", "CloseWMP")
HotKeySet("{end}", "CloseFF")
Sleep (100)

;what to do if ESC is pressed
While 1
Sleep (100)
Wend
Func CloseWMP()
ProcessClose ( "wmplayer.exe" )
Sleep (100)
EndFunc
 
;Close firefox
 While 1
     Sleep (100)
 WEnd
 
 Func CloseFF()
     ProcessClose ( "firefox.exe" )
     Sleep (100)
 EndFunc
 
 Exit
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...