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?
Scripts Terminated Unexpectedly
Re: Scripts Terminated Unexpectedly
Post the code of one or more of those scripts otherwise no one will be able to help you.
Re: Scripts Terminated Unexpectedly
Hello. This is one of my scripts:Guest wrote:Post the code of one or more of those scripts otherwise no one will be able to help you.
Code: Select all
XButton1::RButton
Return
XButton2::LButton
Return
Re: Scripts Terminated Unexpectedly
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.zxvc wrote:Hello. This is one of my scripts:Guest wrote:Post the code of one or more of those scripts otherwise no one will be able to help you.This script is used to replace the backward and forward buttons of e.g., Logitech M905 mouse, with right-click and left-click buttons.Code: Select all
XButton1::RButton Return XButton2::LButton Return
Re: Scripts Terminated Unexpectedly
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 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.
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
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.
Who is online
Users browsing this forum: No registered users and 50 guests