Sign in to follow this  
Followers 0
AceLoc

i want to delete some things,,,

12 posts in this topic

is it possible to HIDE the 'Error' if this file dont exist'

im onley getting this(GetFatalError("0","1") :)

hope anybody can help me out thanxs allready :(


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites



is it possible to HIDE the 'Error' if this file dont exist'

im onley getting this(GetFatalError("0","1") :)

hope anybody can help me out thanxs allready :(

The BEST way to get help on something is either posting a scrpt, or giving a very detailed description of what kind of script you looking to find,

ask a vague question, get a vague answer

"FileDelete"

"DirRemove"

look in the helpfile

Share this post


Link to post
Share on other sites

The BEST way to get help on something is either posting a scrpt, or giving a very detailed description of what kind of script you looking to find,

ask a vague question, get a vague answer

"FileDelete"

"DirRemove"

look in the helpfile

he said what he meant to say.. he is tryin to say..

he got a script that Delete something dont care w/e it is..

and if that file dont exist you get an error Example: 'Could not find blablablablablaa.exe'

and then the script stops... how can you 'Hide' that error and continue the script

that is what he meant.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

WOW, this is the first time I'm actually able to help someone with something I've learned.

What you could do is make the file delete a second script. The first script will call the second script whenever it is time. Then before the actual file delete function, put an "IF" statement in telling the second script to close if the file doesn't exist, and if it does continue on, and then it will delete.

I feel so good finally being able to help......although there may be a better way to do this.

Edited by Champak

Share this post


Link to post
Share on other sites

there is a code for it i've seen it a few times but forgot it..

it was sumthin like

GetFatalError("0","1")

or something.. well ^

Share this post


Link to post
Share on other sites

I'm really with Paulie on this one, it's so much easier to answer someone specifically rather than generally not knowing what they are applying the answer to.....


~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

is it possible to HIDE the 'Error' if this file dont exist'

im onley getting this(GetFatalError("0","1") :)

hope anybody can help me out thanxs allready :(

Put the following at the top of your script

Opt("RunErrorsFatal", 0) That will suppress all errors.

You would be much better off adding an error handling routine in the script.

If FileExists($file) Then
Do This
Else
Do Something Else
EndIf

or if you want you could just use

If FileExists($File) Then Do_Whatever()
Func Do_Whatever()
   MsgBox(4096,'Good News','The file actually does exist at the specified location')
EndFunc
Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Put the following at the top of your script

Opt("RunErrorsFatal", 0) That will suppress all errors.

You would be much better off adding an error handling routine in the script.

If FileExists($file) Then
Do This
Else
Do Something Else
EndIf

or if you want you could just use

If FileExists($File) Then Do_Whatever()
Func Do_Whatever()
   MsgBox(4096,'Good News','The file actually does exist at the specified location')
EndFunc
I agree with error checking, with that done properly, you don't have to worry about fatal errors too much. But I was under the impression that Opt('RunErrorsFatal', 0) was for RunWait/Run only, leaving other causes to still cause an Error msg?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

RunErrorsFatal Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs:

1 = fatal error (default)

0 = silent error (@error set to 1)


~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post


Link to post
Share on other sites

I have a help file thanks :), just posting it without any comments, or you want to say what your interpretation is :( ?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I was just confirming your " But I was under the impression that Opt('RunErrorsFatal', 0) was for RunWait/Run only" dunno about the last past. :)


~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post


Link to post
Share on other sites

I agree with error checking, with that done properly, you don't have to worry about fatal errors too much. But I was under the impression that Opt('RunErrorsFatal', 0) was for RunWait/Run only, leaving other causes to still cause an Error msg?

Right you are. I mis-read the post. :)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0