| View previous topic :: View next topic |
| Author |
Message |
compuboy_r
Joined: 04 May 2004 Posts: 68
|
Posted: Mon Sep 06, 2004 12:45 pm Post subject: Run Command |
|
|
Whenever a Run command is used with a file whose extension is not registered AHK closes with an error, but it should have given an OpenWith dialog or A MessageBox saying that the file is not registered with any application.
compuboy |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Mon Sep 06, 2004 1:04 pm Post subject: |
|
|
| Quote: | | A MessageBox saying that the file is not registered with any application. | I tested this on my system and it does display such a MsgBox. It says something like "Specifically: The file does not have an associated application." It then terminates the current thread.
To avoid getting such an error, you could run the associated app directly and pass the document name as a parameter. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Mon Sep 06, 2004 1:16 pm Post subject: |
|
|
| I just saw your directory script, so now I see why you want this. I'll add a parameter to the Run/RunWait commands that tells the command to set ErrorLevel when there's an error instead of displaying a warning dialog and terminating the thread. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Mon Sep 06, 2004 2:50 pm Post subject: |
|
|
Since this is a feature others have asked for, I've added it and updated the installer at http://www.autohotkey.com/download/
Example usage: | Code: | Run, ReadMe.doc, , Max UseErrorLevel ; Launch maximized and don't display dialog if it fails.
if ErrorLevel = ERROR
MsgBox The document could not be launched. |
|
|
| Back to top |
|
 |
compuboy_r
Joined: 04 May 2004 Posts: 68
|
Posted: Mon Sep 06, 2004 9:17 pm Post subject: |
|
|
Thanks for this speedy Addition
compuboy_r |
|
| Back to top |
|
 |
|