* Windows:
1. Explorer menu: Tools -> Folder Options -> File Types
2. Select file type, press "Advanced"
3. Select "Open" and press "Edit"
4. Insert your command line into the field "Application used to perform action"
Windows uses %1 (%2, %3 etcet.) to denote the dropped/activated file-path(s) as variable(s).
If a command line contains paths with spaces, they need to be enclosed in double-quotes.
Replace everything including the <> in the following examples with your values:
Quote:
<short path to your application> <short part to the file to feed the application>
<path without spaces to your application> <path without spaces to the file to feed the application>
"<path with spaces to your application>" "<path with spaces to the file to feed the application>"
"<path with spaces to your application>" /switch "<path with spaces to the file to feed the application>"
"<path with spaces to your application>" <anything>
"<path with spaces to your application>" /switch "%1"
* AutoHotkey:
Passing Command Line Parameters to a Script, the
Run command
AutoHotkey uses %1% (%2%, %3% etcet.) to denote the dropped/activated file-path(s) as variable(s).
If a command line contains paths with spaces, they are preferred to be enclosed in double-quotes (but it is not always necessary). Don't forget to escape the comma's.
---
So, when in Windows:
Quote:
C:\Program files\AutoHotkey\AutoHotkey.exe" "c:\C:\Program files\AutoHotkey\scripts\pdfopener.ahk" "%1"
try this instead
Quote:
"C:\Program files\AutoHotkey\AutoHotkey.exe" "C:\Program Files\AutoHotkey\scripts\pdfopener.ahk" "%1"
or this
Quote:
"C:\Program files\AutoHotkey\AutoHotkey.exe" ""C:\Program Files\AutoHotkey\scripts\pdfopener.ahk" "%1""
if you compile your pdfopener script, you could use:
Quote:
"C:\Program Files\AutoHotkey\scripts\pdfopener.exe" "%1"
HTH