Jump to content

Recommended Posts

Posted

Hi,

I found that with every AutoIt script there is this AutoIt v3 window :

Posted Image

So my question is : What is it for ? Why it exists ?

Cheers, FireFox.

Posted

From the help file:

  Quote

AutoItWinSetTitle

....

Remarks

The AutoIt window is usually hidden. The purpose of changing the title is to allow other programs (or other AutoIt scripts) to interact with AutoIt.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

Here is how you show it/kill it :)

$hAutoItWinTitle_Wnd = WinGetHandle(AutoItWinGetTitle())
WinSetState($hAutoItWinTitle_Wnd, "", @SW_SHOW)

;WinClose($hAutoItWinTitle_Wnd)

$iKill = MsgBox(36, "Question...", "Kill AutoIt Window?", 0, $hAutoItWinTitle_Wnd)

If $iKill = 6 Then
    WinClose($hAutoItWinTitle_Wnd)
    Sleep(2000) ;Not affecting :(
EndIf

Hm, it seems that when we close that window, the entire script is exits... not good...

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

@MrCreator

Thanks for reply :o

Edit : Its impossible to continue script if you kill it .... :)

Cheers, FireFox.

Edited by FireFox
Posted (edited)

  FireFox said:

So my question is : What is it for ? Why it exists ?

All GUI based processes AFAIK show have a GUI window. So every AutoIt3 script interpreted has a hidden window named "AutoIt v3". If you wish to politely close the AutoIt process then use Winclose() on that window. I do not see it in the latest FAQ, but it used to use AutoItWinGetTitle() and AutoItWinSetTitle() to set and check the AutoIt window title to see if it exists and exit if it does exist to avoid duplicate running of the same script.

:)

Edit:

Replaced "show" with "have" for a more correct meaning.

Edited by MHz
Posted (edited)

  Quote

I do not see it in the latest FAQ, but it used to use AutoItWinGetTitle() and AutoItWinSetTitle() to set and check the AutoIt window title

It's in the Help File. Or i am the only one seeing my post? :)

Btw, i think it is wrong that the script is exits when we closing that window. Script shouldn't exit unless i (as a scripter) told him to do so (i.e: via Exit function or at EOS => End Of Script :o).

Edited by MrCreatoR

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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
  • Recently Browsing   0 members

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