Jump to content

Hotkey


Recommended Posts

first of all thanks for responding

However i have already try that and it doesn't work for example

HotKeySet("{ESC}", "Terminate")

MsgBox(64, "Welcome", ' ' & @LF & @LF &'Please follow a few simple steps ')

Func Terminate()

Exit

EndFunc

I would like the script to terminate without clicking on the message box

Link to comment
Share on other sites

Just a thought....

May want to experiment a bit...

Does the hot key checking routine operate while waiting for user input?

(In other words, the fact that the program is waiting for you to click "ok" before proceeding may mean that hotkey checking is suspended, as is the rest of the program, until you do so)

Edited by everseeker

Everseeker

Link to comment
Share on other sites

  • Developers

I would like the script to terminate without clicking on the message box

Change the MsgBox to a SplashTextOn.

When you display a msgbox you are asking for user input or you can have the msgbox timeout after x seconds.

Edited by JdeB

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

  • Developers

Thanks again

But need to use a message box and it can not time out

I understand what you are saying and i agree. that is why i was looking into the adlibenable command.

Thanks anyway

what about something like this?

HotKeySet("{ESC}", "Terminate")
HotKeySet("{ENTER}", "Continue")
$Loop = 1

SplashTextOn ("Welcome", ' ' & @LF & @LF &'Please follow a few simple steps ')
While $Loop=1
   Sleep(200)
Wend
SlashTextOf()
; rest of the script

Func Terminate()
   Exit
EndFunc

Func Continue()
   $loop = 0
EndFunc

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

Explanation of behavior from the help file:

If the current function is a "blocking" function, then the keypresses are buffered and execute as soon as the blocking function completes. MsgBox and FileSelectFolder are examples of blocking functions.

Maybe the AutoGUI project could provide even more alternatives....
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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...