Lexikos / AutoHotkey-Release

Release script for AutoHotkey. Builds the binaries, help file and installer, and automates other release steps.
https://autohotkey.com/
36 stars 14 forks source link

Please provide more documentation for "ShellRun" script #1

Closed llinfeng closed 7 years ago

llinfeng commented 7 years ago

Hope you could clarify the syntax for your ShellRun command.

Lexikos commented 7 years ago

If there was any documentation to provide, it would not be in this repository. Your request is misplaced.

The parameters are merely passed as-is to the IShellDispatch2.ShellExecute interface method, as shown in the code. You can find documentation on MSDN, or find help on the AutoHotkey forums.

Elijas commented 5 years ago

@llinfeng

I've been searching documentation about ShellRun too when ShellRun("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --new-window www.google.com") didn't work, it turns out, parameters should have been provided as separate argument, just as is written in documentation: ShellRun("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "--new-window www.google.com")

In your case, you made a syntax error - you should not use single quotation mark symbols: Bad: ShellRun("C:\Program Files\Mozilla Firefox\firefox.exe", "-new-instance -url 'https://www.twitch.tv/directory/following' -url 'https://www.twitter.com'") Good: ShellRun("C:\Program Files\Mozilla Firefox\firefox.exe", "-new-instance -url https://www.twitch.tv/directory/following -url https://www.twitter.com")

The good version launches firefox for me with both sites open.