Sign in to follow this  
Followers 0
supersonic

Can't close GUI using

29 posts in this topic

#1 ·  Posted (edited)

Hi everybody,

if I use more then one GUIs - 3 in the sample code below - I'm not able to use '$GUI_EVENT_CLOSE' to exit the loop.

Here's my sample code:

#include <GUIConstantsEx.au3>

Local $hGUI1 = GUICreate("GUI1", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI1)
GUISetState(@SW_DISABLE, $hGUI1)

Local $hGUI2 = GUICreate("GUI2", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI2)
GUISetState(@SW_DISABLE, $hGUI2)

Local $hGUI3 = GUICreate("GUI3", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI3)

Local $hMsg = 0
While 1
$hMsg = GUIGetMsg(1)
Switch $hMsg[1]
  Case $hGUI3
   Switch $hMsg[0]
    Case $GUI_EVENT_CLOSE
     ExitLoop
   EndSwitch
EndSwitch
WEnd

GUIDelete($hGUI1)
GUIDelete($hGUI2)
GUIDelete($hGUI3)

What am I doing wrong?

Anyone any ideas?

Greets,

-supersonic.

Edited by supersonic

Share this post


Link to post
Share on other sites



supersonic,

You are not doing anything wrong. The script exits when I click the [X] of GUI3 - does this not happen when you do it? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Hi supersonic,

there is a very good tutorial in the wiki "Managing Multiple GUIs".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

The 3rd GUI closes as expected and your code doesn't suggest you've done anything wrong. I'm using the latest beta on Windows 7 x64.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Ohhh, I forgot to mention: :)

If pressing ESC...

Share this post


Link to post
Share on other sites

supersonic,

Please give important information like that in the first post! :)

Just disable your GUIs after they have all shown - then ESC works: :D

#include <GUIConstantsEx.au3>

Local $hGUI1 = GUICreate("GUI1", 200, 200, 100, 100)
GUISetState(@SW_SHOW, $hGUI1)


Local $hGUI2 = GUICreate("GUI2", 200, 200, 400, 400)
GUISetState(@SW_SHOW, $hGUI2)

Local $hGUI3 = GUICreate("GUI3", 200, 200, 600, 600)
GUISetState(@SW_SHOW, $hGUI3)

GUISetState(@SW_DISABLE, $hGUI1)
GUISetState(@SW_DISABLE, $hGUI2)

Local $hMsg = 0
While 1
    $hMsg = GUIGetMsg(1)
    Switch $hMsg[1]
        Case $hGUI3
            Switch $hMsg[0]
                Case $GUI_EVENT_CLOSE
                    ExitLoop
            EndSwitch
    EndSwitch
WEnd

GUIDelete($hGUI1)
GUIDelete($hGUI2)
GUIDelete($hGUI3)

It seems that disabling a GUI prevents the ESC key from working for all subsequently created GUIs - although I have no idea why. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

A temporary fix would be to use HotKeySet or _IsPressed.

Edit: Strange, I didn't test by moving the GUISetState(@SW_DISABLE, $hWnd) lines after the 3rd GUI was displayed, I presumed it wouldn't have any affect on the ESC key issue. Oh well, you know what they say about presumption.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

In that case, this would do it:

#include <GUIConstantsEx.au3>

HotKeySet ("{ESC}", "_Close") ; Set the Escape key to perform a function to close the program

Local $hGUI1 = GUICreate("GUI1", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI1)
GUISetState(@SW_DISABLE, $hGUI1)

Local $hGUI2 = GUICreate("GUI2", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI2)
GUISetState(@SW_DISABLE, $hGUI2)

Local $hGUI3 = GUICreate("GUI3", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI3)

Local $hMsg = 0
While 1
$hMsg = GUIGetMsg(1)
Switch $hMsg[1]
  Case $hGUI3
   Switch $hMsg[0]
    Case $GUI_EVENT_CLOSE
     ExitLoop
   EndSwitch
EndSwitch
WEnd

GUIDelete($hGUI1)
GUIDelete($hGUI2)
GUIDelete($hGUI3)

Func _Close()
    Exit
EndFunc

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

guinness,

Who needs temoporary fixes? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Melba,

it's you again helping me out! :)

I simply forgot to mention "If pressing ESC..." in the first post, sorry for that.

Greets,

-supersonic.

Share this post


Link to post
Share on other sites

Who needs temoporary fixes?

Not anymore since you solved the problem. :) I edited my last post as I saw you had come in with a different approach, even though I find it strange it didn't work before.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

guinness,

I always try to follow the advice of the famous physicist Dr R V Jones - "Always try reversing the order of things to see if they work better". :)

The quote comes from a wonderful book "Most Secret War" (I think it is "Wizard War" in the US) where he describes his work as the head of British Air Intelligence throughout WW2. As a very young man he was involved at the highest level in some of the decisive moments of the conflict. The particular incident that drew the quote was the dropping of a German spy who was found unconscious as his radio had been suspended above him during his parachute descent and promptly knocked him out as they landed with no wind. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Sorry,

I have to bother you all again:

Melba is right - if moving moving the GUISetState(@SW_DISABLE, $hWnd) lines after the 3rd GUI was displayed it works...

But only for the example - at least for me... Due to the fact that the real script behind this issue is too big to extract a working sample,

I tried to find an other way to work around this behavior...

And I found it! Well, it is not a real solution... Please note the MsgBox() line...

#include <GUIConstantsEx.au3>

Local $hGUI1 = GUICreate("GUI1", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI1)
GUISetState(@SW_DISABLE, $hGUI1)

Local $hGUI2 = GUICreate("GUI2", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI2)
GUISetState(@SW_DISABLE, $hGUI2)

Local $hGUI3 = GUICreate("GUI3", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI3)

MsgBox(0, "", "", 1) ; TEST!!!

Local $hMsg = 0
While 1
$hMsg = GUIGetMsg(1)
Switch $hMsg[1]
  Case $hGUI3
   Switch $hMsg[0]
    Case $GUI_EVENT_CLOSE
     ExitLoop
   EndSwitch
EndSwitch
WEnd

GUIDelete($hGUI1)
GUIDelete($hGUI2)
GUIDelete($hGUI3)

Greets,

-supersonic.

Share this post


Link to post
Share on other sites

supersonic,

Excellent! :)

The MsgBox must somehow reset the ESC function - although as I said earlier I have absolutely no idea why it gets cancelled in the first place. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

How about this:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $hGUI1 = GUICreate("GUI1", 200, 200, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_DISABLED))
GUISetState(@SW_SHOW, $hGUI1)

Local $hGUI2 = GUICreate("GUI2", 200, 200, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_DISABLED))
GUISetState(@SW_SHOW, $hGUI2)

Local $hGUI3 = GUICreate("GUI3", 200, 200, -1, -1)
GUISetState(@SW_SHOW, $hGUI3)

Local $hMsg = 0
While 1
    $hMsg = GUIGetMsg(1)
    Switch $hMsg[1]
        Case $hGUI3
            Switch $hMsg[0]
                Case $GUI_EVENT_CLOSE
                    ExitLoop
            EndSwitch
    EndSwitch
WEnd

GUIDelete($hGUI1)
GUIDelete($hGUI2)
GUIDelete($hGUI3)
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Please,

if anyone has a good idea to his:

Perhaps there is an other way like MsgBox()? ;)

A empty popping MsgBox() somewhere in the script looks a bit silly... :)

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

How about my solution?

It works fine for me running AutoIt 3.3.6.1 or 3.3.7.21 on Windows 7 x64.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

water,

good idea, but this wouldn't work with my script. In the real script the other GUIs have alternating states...

Share this post


Link to post
Share on other sites

Well an empty messagebox with a timeout of 1 millisecond probably wont even appear quick enough for the user to register it, so you should be alright with that.

Share this post


Link to post
Share on other sites

Hi supersonic,

then just combine your states with $WS_Disabled.

BitOr($WS_DISABLED, <Your States>))

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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