Jump to content

Hide all output (including errors) from user


Recommended Posts

Is there a way in Autoit to hide all output, even fatal errors so no matter what, nothing is shown to someone who is sitting at the desk?

I'm not trying to do anything bad or anything like that, I'm writing scripts for the company I work for, and one of the bigger things they want is so that even if a script crashes and burns, it doesn't show the person at the desk the error message, since they then get concerned and start calling the help desk at that point.

so when deploying a script to run on 10,000 computers, if there's a way to hide all unexpected errors I'd love to know it.

(I tried using OnAutoItExit thinking I would catch errors with it and hide them, but that showed some errors when someone logged off during a sleep call.)

Link to comment
Share on other sites

You should be able to handle all errors within your script, if it is written robustly. The only errors that you may not be able to catch are runtime errors, but you shouldn't really encounter those unless you didn't follow good coding practices when writing your script.

If you are still receiving errors then you could always write a separate script to monitor the system for any error messages related to your scripts and quickly close them before the user can see them.

Link to comment
Share on other sites

Is there a way in Autoit to hide all output, even fatal errors so no matter what, nothing is shown to someone who is sitting at the desk?

I'm not trying to do anything bad or anything like that, I'm writing scripts for the company I work for, and one of the bigger things they want is so that even if a script crashes and burns, it doesn't show the person at the desk the error message, since they then get concerned and start calling the help desk at that point.

so when deploying a script to run on 10,000 computers, if there's a way to hide all unexpected errors I'd love to know it.

(I tried using OnAutoItExit thinking I would catch errors with it and hide them, but that showed some errors when someone logged off during a sleep call.)

Let me get this straight...

...an enterprise big enough to have 10,000 computers...

...will let a noobie scripter...

...deploy a buggy script to 10,000 computers...

...and doesn't want the help desk to know if anything goes wrong?

OK! What could possibly be wrong here?

:)

P.S. Could you post the name of the company, please, and the date of deployment? I want to short the stock that day... :P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

maybe he doesnt want the companies IT.Superstar Programmers to know that he is ONLY using "inferior little autoit scripting language" to write useful programs?

in my company (about same setup size of 10k computers) there are alot of ppl that let only "visual c something" be a good valid language to write all programs, even if the same job can be done much faster with autoit or perl

Link to comment
Share on other sites

we have guys using different scripting languages, myself i am more comfortable with other ones, but autoit is the one we recently decided on as our primary.

In Winbatch (which is what some of us useto use) there is a feature that would suppress all errors, so even if you didn't catch the error in your script, it still would not pop up an error box and would close itself without bothering the user. This will then log all errors to a file that you can look at and not interrupt the user. That is the standard practice here since in the past we have run against errors that can crash a script before a check can be run, and our environment varies greatly by region and how old PCs are, who was in charge when they were set up, how long it's been since they were reimaged etc.

That is what i am looking for, and I wouldn't call myself a noobie scripter, just one that hasn't used autoit long. (besides, an insult isn't a good answer to an honest question)

I would sooner catch the errors so I can handle them, but I would like to know if there is a safety so it doesn't bother users. It's not so that the help desk doesn't know there's a problem, if there was no problem there wouldn't be the script i'm writing.

If something does go wrong with the script I know about it from logs, and that's all we need here and the method we prefer.

Edited by wes517
Link to comment
Share on other sites

just a quick update, the script has made it to over 7000 pcs now and no-one has filed a ticket with the help desk, so i must have caught all the errors myself anyway.

I take it from noone responding with a yes or no answer that Autoit doesn't have any way of redirecting all output including errors to a log instead of showing the error to the user.

if anyone does know, i'd still like to know if this exists for cases where you just need a quick and dirty script, or if there is a chance it could find it's way into a future version.

Link to comment
Share on other sites

Let me get this straight...

...an enterprise big enough to have 10,000 computers...

...will let a noobie scripter...

...deploy a buggy script to 10,000 computers...

...and doesn't want the help desk to know if anything goes wrong?

OK! What could possibly be wrong here?

:)

P.S. Could you post the name of the company, please, and the date of deployment? I want to short the stock that day... :P

I work for the same company as this guy and he has become the laughing stock of our department!!! And he is flat out LYING about "no errors." Thanks to him, we had a 300% increase in call volume because of how buggy his hacked together code is! I'm not sure how much longer he'll be sticking around, as he is one of our JUNIOR admins and, according to him, "has never scripted before in his life." From what I've seen of his code, it looks like he used the record feature of autoit and a bunch of send keys...pathetic!

Seriously, while we like autoit, most of us have moved on to bigger and better. Heck, half of the admins here write stuff in assembly and have written code for various linux distros. Anyone ever use turbolinux? I wrote that and my own filesystem as my masters thesis when I graduated from Yardale with a 4.0 grade point average. Heaven have mercy that this witless hack actually try to ask a question to resolve a clearly chair-to-keyboard interface problem. :P

I can't wait to hear him crying in the bathroom over this, his e-feelings have been hurt beyond repair and I fear he may never venture online again!

Edited by cheerulez
Link to comment
Share on other sites

Let me get this straight...

...an enterprise big enough to have 10,000 computers...

...will let a noobie scripter...

...deploy a buggy script to 10,000 computers...

...and doesn't want the help desk to know if anything goes wrong?

OK! What could possibly be wrong here?

:)

P.S. Could you post the name of the company, please, and the date of deployment? I want to short the stock that day... :P

maybe he doesnt want the companies IT.Superstar Programmers to know that he is ONLY using "inferior little autoit scripting language" to write useful programs?

in my company (about same setup size of 10k computers) there are alot of ppl that let only "visual c something" be a good valid language to write all programs, even if the same job can be done much faster with autoit or perl

EXACTLY!!!!!! What a N00B! I work with this guy, and even though he claims to be an Admin, he's really just a Junior Admin. Every admin in our organization who knows anything write our own scripts in binary and use our own written assembler, compiler, etc. I mean, really, what kind of a tool exposes his noobiness online for other people to see. I'm so embarrassed for my organization.

Nobbe, good job on putting the noob in his place. I realize you guys are using Visual Crap to write your scripts but I commend you for staking out the forum of a noob scripting language merely to put noobs in their place. Good job! Who knows, with your dedication, maybe someday I will be able to call you a fellow binarian brother.

SaltyDS, your infinite wisdom shines gloriously in your assumption of what wes517 (the noob) is trying to do. With your awesome insight and your line by line breakdown of a potential disaster, you've unknowingly saved the the company from destroying itself, which would no doubt lead from the devaluing of our stocks to a stock market crash and utimately, damnation. Thank you second Jesus!

Link to comment
Share on other sites

EXACTLY!!!!!! What a N00B! I work with this guy, and even though he claims to be an Admin, he's really just a Junior Admin. Every admin in our organization who knows anything write our own scripts in binary and use our own written assembler, compiler, etc. I mean, really, what kind of a tool exposes his noobiness online for other people to see. I'm so embarrassed for my organization.

Nobbe, good job on putting the noob in his place. I realize you guys are using Visual Crap to write your scripts but I commend you for staking out the forum of a noob scripting language merely to put noobs in their place. Good job! Who knows, with your dedication, maybe someday I will be able to call you a fellow binarian brother.

SaltyDS, your infinite wisdom shines gloriously in your assumption of what wes517 (the noob) is trying to do. With your awesome insight and your line by line breakdown of a potential disaster, you've unknowingly saved the the company from destroying itself, which would no doubt lead from the devaluing of our stocks to a stock market crash and utimately, damnation. Thank you second Jesus!

Hey Chuck, didn't know you were on these boards! You heard about him too huh? What dolt hired this guy? Thank god we use a proprietary OS on all our systems, otherwise we would have been screwed! Three cheers for those l33t e-admonishers!

Link to comment
Share on other sites

SaltyDS, your infinite wisdom shines gloriously in your assumption of what wes517 (the noob) is trying to do. With your awesome insight and your line by line breakdown of a potential disaster, you've unknowingly saved the the company from destroying itself, which would no doubt lead from the devaluing of our stocks to a stock market crash and utimately, damnation. Thank you second Jesus!

Bummer. Now what happens when all my shorted stock in your company gets called in... :P

You guys interested in hiring a part-time scripter 'til I get that paid off at eTrade?

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Bummer. Now what happens when all my shorted stock in your company gets called in... :P

You guys interested in hiring a part-time scripter 'til I get that paid of at eTrade?

:)

Only if you are willing to learn Trinary scripting. We are very close to inventing this technology even though we are a rug and carpet cleaning company.

Link to comment
Share on other sites

I don't know why you people are being so negative here.

It makes perfectly good sense to not have any errors reported which could be passed on to the Help Desk or the developer, so that someone could figure out what was going wrong and fix it. Just write it to a log file that no one would look at unless they knew there was a problem, which of course they don't because the error message was not displayed.

Now comes the part where I get to qualify my statement above.

It makes perfectly good sense to a mental midget. To those of you who work with the OP, think of it this way, in a matter of days (if not hours) you will be able to claim "This guy was once a junior administrator at our company."

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!"

Link to comment
Share on other sites

...we are a rug and carpet cleaning company.

Strange... my due diligence before buying your stock indicated you were telemarketing company that specialized in spamming online forums from multiple newly created accounts. I must have missed a page in the prospectus.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

The sick thing about this post is I don't know if everyone is kidding or just trolls...

Anywho trying to get back on topic, I think the OP has a good point... Is there a way using AutoIt, to suppress all error and send them to a log file?

Link to comment
Share on other sites

To those of you who work with the OP, think of it this way, in a matter of days (if not hours) you will be able to claim "This guy was once a junior administrator at our company."

Sadly, this really isn't a claim we want to make. This whole thing is a black eye on the company and we'll likely be bankrupt by the end of the year from all the bad publicity this is garnering. I mean, the poor guy asks a legitimate, albeit completely idiotic, question and now he'll likely need to take his own life to purge the shame from his family name!

Hopefully, we'll be able to parlay our new trinary programming language and 73 and 3/4s bit OS (which, by the way, fits on a floppy) into some positive cash streams. Otherwise I fear that the dividends PsaltyDS is so counting on won't be available to our stockholders this year. :)

Edited by cheerulez
Link to comment
Share on other sites

The sick thing about this post is I don't know if everyone is kidding or just trolls...

Probably the latter.

Anywho trying to get back on topic, I think the OP has a good point... Is there a way using AutoIt, to suppress all error and send them to a log file?

I hope not.

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!"

Link to comment
Share on other sites

The sick thing about this post is I don't know if everyone is kidding or just trolls...

What do you mean? We're all just one big happy family here...

Posted Image

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I'm puzzled...

To give an answer to the OP's original question:

Most errors can be covered/handled in your code, but it depends on what you're doing.

If you're using COM Objects, you need to register an error handler to cover the fatal com errors AutoIt spits out(if any), otherwise, look into the Opt command, it will allow you to disable some other "fatal" error popups you might encounter.

Other than that, you'll just have to check the return code and @error state after each vital function you call, and examine the result, and take action from there on. :)

Edited by FreeFry
Link to comment
Share on other sites

Is there some element of humor in this thread that I am not getting? A joke other people find funny? Because right now all I am seeing is a completely ridiculous thread gone even more awry. I have seem far more intelligent, purposeful threads be locked before they got half as pointless.

I hope you do find this funny, and that your not really as idiotic as all this posting make you to be. Stop posting, stop editing and re-editing your previous posts. If your call volume has gone up 300% I'm sure you can find something better to do with your time. Maybe find out how someone lets a programmer -newbie or not- deploy code to 7k machines without anyone reviewing or testing it.

At best, your wasting time, and bandwith, and this is all a joke that I just don't get.

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...