Reputation: 3042
How to run this command properly?
Pause::Run notepad++ D:\Data\Config\Essential.ahk
I get this error:
Error: Failed attempt to launch program or document:
Action: <notepad++ D:\Data\Config\Essential.ahk>
Params: <>
Specifically: The system cannot find the file specified.
Using Notepad++ for any key, or Pause key with notepad doesn't work. This doesn't involve system directories, as talked in this related question (Why does AutoHotkey respond with a "System cannot find the file" error?). Do you have any idea?
Full error:
Upvotes: 1
Views: 419
Reputation: 3366
Is "notepad++.exe" in your path?
Try specifying the full path to notepad++.exe and see if that fixes it:
Pause::run "C:\Program Files (x86)\Notepad++\notepad++.exe" D:\Data\Config\Essential.ahk
NOTES:
cd \ && dir notepad.exe /s
set path
to see if notepad++.exe's directory is in your pathUpvotes: 2
Reputation: 10603
AHK cannot know that "notepad++" is a program, if you don't use the .exe extension, therefore the error message "The system cannot find the file specified".
Try also
Pause::Run notepad++.exe D:\Data\Config\Essential.ahk
or
Pause::Run notepad++.exe "D:\Data\Config\Essential.ahk" ; more accurate syntax
Upvotes: 0