Jump to content
Sign in to follow this  

I'm so bloody stupid sometimes!

Recommended Posts

I'm not exactly new to scripting or AutoIt, but I do seem to struggle my way through things every time...

This script works beautifully to close my window :

While 1
    If WinExists("Window Name") Then WinClose("Window Name")

My problem is simply Exiting the script once the window closes.

I know, I'm pretty stupid, eh? :huh2:

Yes, I've looked at the docs and searched and read results for almost two hours determined to figure this out... and I'm embarrassed to be posting this ;)

Thanks for reading my verbose plea for help :alien:

Share this post

Link to post
Share on other sites

er... of course I have.

too bad you offered no examples... instead I have your denigration...


Edited by 00pontiac

Share this post

Link to post
Share on other sites

hi 00pontiac,

Welcome to the forums :ph34r:

I don't think enaiman was trying to attack you personally, there are a wealth of examples of using Exit in the helpfile if you felt you needed one. :alien:

So cool down a bit, he was helping you, don't spurn hate when you get a tidbit of advice. :huh2:

Back to the topic,

If the script in your OP is your entire script(or the basic structure of it), you might want to take a look at WinWait() in the helpfile ;)



EDIT: Added welcome, advice, tip, fixed spacing. :)

Edited by smartee

Share this post

Link to post
Share on other sites

Thank you Smartee :huh2:

sometimes all I need is a simple suggestion to divert me from the wall I'm banging my head against. I'm no pro at autoit, that's for sure, but I have a dozen scripts or more that I've done in the past and never got stuck as badly as I did tonite...

is all the syntax sometimes, I just couldn't get past it.

WinWait... duh... I think I knew that. let's see, I installed autoit for the first time (according to date created) in aug. 2008... like I said, embarrassed to have posted this.

(and thanks for the welcome btw)

Share this post

Link to post
Share on other sites

Flaming is very easy and a thread can get out of control very quick. I don't want to do either so I will say only this:

- I was giving you all the help you needed. "Exit" is such an obvious command that anybody would think to search for.

By asking how do you exit a script, you have proven to ME that you even didn't bother looking and you went straight for the laziest solution - ask for help in the forum. A simple 1 minute look in the help file (or Online help) would have given you the answer.

By asking for an "example of using "Exit"" you have proven again my above point; if you had simply put an Exit somewhere in your 3 code line script - after all you can only have the Exit in 5 places in your script:

- before first line: - no sense in that

- after "While 1", your script would exit without doing anything

- after "Sleep(100)", same as above

- after "If WinExists("Window Name") Then WinClose("Window Name")" ... guess you had your answer here

- no need to consider the last one.

The conclusion should be obvious too.

That's all I had to say.

I won't reply again in this thread, if you post anything, it is likely that I will read your post and that's all. I will stay away of any of your threads in the future.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...