I'm very new to scripting and I downloaded AutoHotkey since it was easy to learn and quite versatile. I'm also using SciTE4AutoHotkey as the editor. I'm also taking an inline tutorial to learn these products. I coded the "test" script as follows:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Persistent
#SingleInstance force
MsgBox Hello World
>"C:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "C:\Users\wbh2_\Documents\AutoHotkey_Scripts\Test.ahk"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1 Time: 0.1055
I know what the problem is, that there is a space in between the words Program and Files in the path command. What I don't know is how to fix it. I've searched this form and have found nothing, I've used the internet to try and find the answer and I've even tried ChatGPT, to no avail. This is very frustrating since I can see the problem but not the solution.
I need help (as a noob)
Thanks in advance for your help!
MrBill
[Mod actions: Moved to the v1 section since this is v1 code (the main section is for v2 code). Added [code][/code] tags. Please use them yourself when posting code.]
[Mod edit: Now moved to the SciTE4AutoHotkey subforum, since this is not about AHK, but the editor.]