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 

skip a command

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ryuho



Joined: 20 Apr 2005
Posts: 1
Location: San Jose, CA

PostPosted: Wed Apr 20, 2005 5:26 am    Post subject: skip a command Reply with quote

is there a command you can put to skip a command that gives off error?

run, c:/blah1
run, c:/blah2
run, c:/blah3

if blah1 is not found the whole script stops there, but i want it to try to run 2 and 3 too.. it seems really simple problem, but i cant seem to find the solution
_________________
Yes I am a n.o.o.b.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
MYYM



Joined: 05 Apr 2005
Posts: 132

PostPosted: Wed Apr 20, 2005 5:41 am    Post subject: Reply with quote

From the help file :
Quote:
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]

Quote:
If Target cannot be launched, an error window will be displayed, after which the script will behave as though an Exit command were encountered. To prevent this, include the string UseErrorLevel in the 3rd parameter


MYYM
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Wed Apr 20, 2005 5:51 pm    Post subject: Reply with quote

thx, what does MYYM mean, ive never heard of it
Back to top
niwi



Joined: 27 Feb 2005
Posts: 128
Location: Heidelberg, Germany

PostPosted: Fri Apr 22, 2005 6:45 am    Post subject: Reply with quote

Hi,

you can also use this:
Code:

IfExist, c:\blah1
{
  c:\blah1
}
Else
{
  IfExist, c:\blah2
  {
    c:\blah2
  }
  Else
  {
    IfExist, c:\blah3
    {
      c:\blah3
    }
    Else
    {
       Msgbox, Nothing found...
    }
  }
}


NiWi.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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