Jump to content

Script exit on - Send("{ESC}")


MvGulik
 Share

Go to solution Solved by JohnOne,

Recommended Posts

Erm. Is there some odd case known where sending Send("{ESC}") makes your script just exit ?

- Accessing some other application menu-bar options.
- exit code:
+>00:59:55 AutoIT3.exe ended.rc:0
>Exit code: 0 Time: 3.174


[v3.3.12.0 on WinXp(32)(Classic)]

... Guess I'm off finding a fix/workaround.

Edit: Right ... Send("{ESC}", 1) doing the job. (Erm, nope. But at least no script exit.)

Edit: O dear. {ALT} is used/redirected to a application function. (seems I run out of menu closing options. >_< )

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

 

Is GUI?

Opt("GUICloseOnESC", 1) ;1=ESC  closes, 0=ESC won't close

Checked, by forcing a Opt("GUICloseOnESC", 0). Nope. Still exits on sending a ESC.

Although I use GUICreate in my script, its only used to force a single instance.

My script is a command line tool that is interacting(do some stuff and exit) with a other application(active focus) when the ESC is send.

Edit: A older autoit compiled version is not having this issue. Think its using v3.3.0.0.

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Solution

Are you able to create a reproducer?

EDIT:

And just for sanity sake, do you employ a Hotkey which uses Esc and is an exit function by any chance?

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

EDIT:

And just for sanity sake, do you employ a Hotkey which uses Esc and is an exit function by any chance?

Aha, there we go.

I did had a general personal include that was using ESC in a hotkey. Disabling that include made the script flow normally again.

(Its a old script, but I should have thought about possible ESC hotkey conflicts here.)  :>

Time to take a closer look at that part.

(pending slapping a solved tag on the topic)

Edit: Yep, that definitely was it. *Solved*

Thanks JohnOne.   :)

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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...