Script only works sometimes?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JohnTravolski
Posts: 21
Joined: 22 Dec 2015, 15:10

Script only works sometimes?

24 Dec 2015, 12:06

So, this is my script:
Spoiler
Whenever I MANUALLY start this script up or MANUALLY reload the script, it works perfectly and will open the selected file with the program exactly as it is supposed to with no issues whatsoever. However, when I create a shortcut to the script (the script is not compiled and is located at this filed directory: "C:\Expedited\Scripts\AutoHotKey\OpenWith.ahk") and place that shortcut in the startup folder in Windows 8.1 ("C:\Users\Purple Kirby 2\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\OpenWith - Shortcut.ink") the script ALWAYS loads (appears in the bottom right corner with the other notification icons) but the keyboard shortcuts themselves (that open the selected file with the specific program mentioned in the script) sometimes (as in, sometimes they do and sometimes they don't) work as they're supposed to. In order to get the script so that it always works, I have to manually reload the script.

So even though the script always loads at startup, it only works sometimes and not other times (until I manually reload the script). Why is this? What should I do to fix it? I'm running Windows 8.1 Pro 64 Bit and the Unicode 64 Bit version of AutoHotkey.
isAdmin

Re: Script only works sometimes?

24 Dec 2015, 17:48

Perhaps try adding this short code at the top of your script will do the trick to ensure it runs as Administrator https://autohotkey.com/docs/Variables.htm#IsAdmin :xmas:
JohnTravolski
Posts: 21
Joined: 22 Dec 2015, 15:10

Re: Script only works sometimes?

24 Dec 2015, 20:45

Thanks, I'll try it and let you know how it goes after a few runs. I'm really new to this program, so I appreciate all the help that has been offered to me.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Lim88 and 139 guests