Jump to content
Sign in to follow this  

Remap Pause Key to Another Function?

Recommended Posts

Hello user2037,

First, Welcome to the AutoIt Forums ;)

Would HotKeySet() work for what your trying to do?

Global $Paused
HotKeySet("{HOME}", "TogglePause") ; Will pause your script if the 'Home' is pressed,
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here ;;;;
While 1

Func TogglePause()
 $Paused = NOT $Paused
 While $Paused
 ToolTip('Script is "Paused"',0,0)

Func Terminate()
 Exit 0

Func ShowMessage()
 MsgBox(4096,"","This is a message.")

As you can see with the other HotKey's there are multiple ways to run a function from a HotKey or HotKey combination. There is also _IsPressed(), although I generaly prefer HotkeySet() since its more Global.

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...