AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run Command

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
compuboy_r



Joined: 04 May 2004
Posts: 68

PostPosted: Mon Sep 06, 2004 12:45 pm    Post subject: Run Command Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Sep 06, 2004 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Sep 06, 2004 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Sep 06, 2004 2:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
compuboy_r



Joined: 04 May 2004
Posts: 68

PostPosted: Mon Sep 06, 2004 9:17 pm    Post subject: Reply with quote

Thanks for this speedy Addition


compuboy_r
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group