Jump to content
xuzo

CTRL + Break is not stopping the script with Scite

Recommended Posts

Implementation of Jos's suggestion.  I tested it with a 3rd party program focused.  Should solve your issue.

; Add at top of script
HotKeySet("^{pause}", "_exit"); Ctrl+Break

; I put at bottom of script
func _exit()
    Exit
EndFunc

 

Share this post


Link to post
Share on other sites

Bingo!!!!

; Add at top of script
HotKeySet("^{pause}", "_exit"); Ctrl+Break

; I put at bottom of script
func _exit()
    Exit
EndFunc

This works perfectly ;)

Now, how can I have that code appended to ALL scite files by default on header and footer of file?

Like a template or a macro, so I don't have to paste that code in to every new Scite file?

Share this post


Link to post
Share on other sites

Make a file, lets use the name:  MyFunctions.au3 

; This is contents of MyFunctions.au3

#include-once

; Set exit hotkey
HotKeySet("^{pause}", "_exit"); Ctrl+Break

; Define exit function
func _exit()
    Exit
EndFunc

 

I think you can put MyFunctions.au3 file into the:

C:\Program Files (x86)\AutoIt3\Include\   or your equivalent filepath and it will become available from anywhere.

Now in future scripts you can include MyFunctions.au3

#include "MyFunctions.au3"

I have never done that.  I make a local Include directory.

Example:

#include "Include\MyFunctions.au3"

Where Include in this case is a subfolder of my project folder.

Edited by Xandy

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

×
×
  • Create New...