I'm getting this issue whenever I use SciTE4AHK:
"C:\Program Files\SciTE\..\AutoHotkey.exe" /ErrorStdOut "C:\Users\s_man\Dropbox\AHK\test1.ahk"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Exit code: 1 Time: 0.2442
I can open the same AHK file and run it on other AHK editor interfaces, but it always fails with SciTE.
When I make a brand new basic program in SciTE it still fails.
Any ideas?
"C:\Program\ is not recognized ...command" Error
-
- Posts: 7
- Joined: 08 Apr 2019, 16:40
Re: "C:\ Program\ is not recognized ...command" Error
same, just installed the beta 2 yesterday. Wonder what is wrong
Re: "C:\Program\ is not recognized ...command" Error
Same error here
Although the text of the error is not at all explicit i had manually modify the file ahk.properties to indicate the name of the autohotkey executable (which is AutoHotkeyU64.exe in my case)
Although the text of the error is not at all explicit i had manually modify the file ahk.properties to indicate the name of the autohotkey executable (which is AutoHotkeyU64.exe in my case)
Code: Select all
AutoHotkey=$(AutoHotkeyDir)\AutoHotkeyU64.exe
-
- Posts: 1
- Joined: 08 Jan 2023, 09:04
Re: "C:\Program\ is not recognized ...command" Error
dJeePe wrote: ↑27 Oct 2022, 12:09Same error here
Although the text of the error is not at all explicit i had manually modify the file ahk.properties to indicate the name of the autohotkey executable (which is AutoHotkeyU64.exe in my case)
Code: Select all
AutoHotkey=$(AutoHotkeyDir)\AutoHotkeyU64.exe
This solution was outdated for me, but after much frustration muddling through I could figure it out!
Understanding The problem:
When you try to run a script through SciTE4AutoHotkey, SciTE searches your AutoHotkey install folder for the .exe file it needs to run.
The problem being that SciTE can't find this file because newer versions of AutoHotkey changed both the name of the .exe files and the folder where it is located.
Note: In the future, if newer updates to AutoHotkey ever change the paths to the .exe files or alter their names, you could easily update this solution to reflect these changes.
SOLUTION:
OPTION #1: - it is IDEAL because it fixes the problem for all users (but requires admin privileges)
Find the file "ahk.properties" inside the SciTe folder and open it with notepad.
By default, SciTe installs itself inside the AutoHotkey install folder, so the path to this file should be something like "C:\Program Files\AutoHotkey\SciTE\ahk.properties"
In the 14th line of the ahk.properties file you should FIND this written:
AutoHotkey=$(AutoHotkeyDir)\AutoHotkey.exe
REPLACE IT with any ONE of the following ALTERNATIVES, depending on which version of AutoHotkey you wish to run (any of them should work):
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey32.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey64.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey64_UIA.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey32_UIA.exe
Just save these changes (admin privileges required to save) and it's fixed!
OPTION #2: - if you don't have admin privileges, you can fix the problem (but only for your current user profile in windows):
- Open the SciTE app window
- Click the "Options" drop menu then select "Open User Properties"; a new tab should open: "SciTEUser.properties"
- Under " # Add here your own settings " you should copy and paste ONE of the following ALTERNATIVES, depending on which version of AutoHotkey you wish to run:
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey32.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey64.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey64_UIA.exe
OR
AutoHotkey=$(AutoHotkeyDir)\v2\AutoHotkey32_UIA.exe
Just save changes. Exit and re-open SciTE to apply the changes and... Problem solved!
Who is online
Users browsing this forum: No registered users and 42 guests