Scripts Terminated Unexpectedly

Report problems with documented functionality
myh

Scripts Terminated Unexpectedly

03 Dec 2017, 21:26

My AutoHotKey version is 1.1.26.01 64-bit. I add tasks to Windows Task Scheduler to open my AutoHotKey scripts after logon. However, I find the AutoHotKey scripts are often terminated unexpectedly (often after my laptop wakes up from sleep) and I can see Task Scheduler's Last Run Result has the error message:
The process terminated unexpectedly. (0x8007042B)

Actually, I meet this problem since I started to use AutoHotKey in 2015. Is there a solution to this problem?
Guest

Re: Scripts Terminated Unexpectedly

04 Dec 2017, 07:10

Post the code of one or more of those scripts otherwise no one will be able to help you.
zxvc
Posts: 3
Joined: 31 Dec 2015, 20:17

Re: Scripts Terminated Unexpectedly

04 Dec 2017, 09:17

Guest wrote:Post the code of one or more of those scripts otherwise no one will be able to help you.
Hello. This is one of my scripts:

Code: Select all

XButton1::RButton
Return

XButton2::LButton
Return
This script is used to replace the backward and forward buttons of e.g., Logitech M905 mouse, with right-click and left-click buttons.
zxvc
Posts: 3
Joined: 31 Dec 2015, 20:17

Re: Scripts Terminated Unexpectedly

11 Dec 2017, 09:52

zxvc wrote:
Guest wrote:Post the code of one or more of those scripts otherwise no one will be able to help you.
Hello. This is one of my scripts:

Code: Select all

XButton1::RButton
Return

XButton2::LButton
Return
This script is used to replace the backward and forward buttons of e.g., Logitech M905 mouse, with right-click and left-click buttons.
I switch to AutoHotKey v2.0-a081-cad307c. It seems the unexpected termination after waking up from Connected Standby is solved with the v2.0. I have tested with v2.0 without any close and reopen of AutoHotKey for about a week and don't meet the unexpected termination anymore.
Guest

Re: Scripts Terminated Unexpectedly

13 Dec 2017, 10:22

I'll leave it to the experts to provide an explanation (if any) but some general remarks:

You have a single line remapping in your script above, the returns are pointless to have this does the same

Code: Select all

XButton1::RButton
XButton2::LButton
you only need "return" when you have multiline hotstrings/hotkeys.

Also you mention "one of your scripts" you can have all your hotkeys and hotstrings in one script so you only have to load one if that is all you have in your other scripts.

You start scripts using Windows Task Scheduler which is of course one way but not required (sounds tedious to me) I would simply add your script(s) to your startup folder and be done with it (you can also use a batch file to start scripts of course and put that in your start up folder). I would only use the task scheduler to run scripts at specific times.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 104 guests