Jump to content

Recommended Posts

Did you remove AutoItSetOption("GUITaskbarEntry") ?

Because when I use it in my script, AutoIt says:

---------------------------

AutoIt Error

---------------------------

Line 34  (File "C:\scripts\Gui\Test.au3"):

AutoItSetOption("GUITaskbarEntry", 1)

Error: Unknown option or bad parameter specified.

---------------------------

OK 

---------------------------

The option is still in the helpfile, so I assumed it works.

Guess not :)

Link to post
Share on other sites
  • Administrators

Can you tell me what's going on?

You can now have multiple windows with multiple entries in the task bar, therefore a minimize to taskbar option made no sense (which window, which task, which icon, multiple tray icons, single icon? tray menus?). So we are thinking about it to see if there is any sensible variation.
Link to post
Share on other sites

Here is a small example:

#include "GUIConstants.au3"

$parentgui = GUICreate("Parent",400,300)

$childgui = GUICreate("Child",340,120,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$parentgui)

GUISwitch($childgui)
GUISetState(@SW_SHOW)

While 1
   $msg = GUIGetMsg(1)

   $ctrlmsg = $msg[0]
   $win = $msg[1]
   $posx = $msg[3]
   $posy = $msg[4]
   
   Select
      Case $ctrlmsg = -3 And $win = $parentgui
         ExitLoop
      Case $ctrlmsg = -3 And $win = $childgui
         GUISetState(@SW_HIDE)
         GUISwitch($parentgui)
         GUISetState(@SW_SHOW)
   EndSelect
WEnd

GUIDelete()

Exit

Hope, this helps a little bit. :)

So long...

Holger

Edited by Holger
Link to post
Share on other sites
  • Administrators

Here is a small example:

#include "GUIConstants.au3"

$parentgui = GUICreate("Parent",400,300)

$childgui = GUICreate("Child",340,120,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$parentgui)

GUISwitch($childgui)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg(1)

    $ctrlmsg = $msg[0]
    $win = $msg[1]
    $posx = $msg[3]
    $posy = $msg[4]
   
    Select
        Case $ctrlmsg = -3 And $win = $parentgui
            ExitLoop
        Case $ctrlmsg = -3 And $win = $childgui
            GUISetState(@SW_HIDE)
            GUISwitch($parentgui)
            GUISetState(@SW_SHOW)
    EndSelect
WEnd

GUIDelete()

Exit

Hope, this helps a little bit. :)

So long...

Holger

:)

Case $ctrlmsg = -3

should be:

Case $ctrlmsg = $GUI_EVENT_CLOSE

;)

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

    No registered users viewing this page.

×
×
  • Create New...