Damein Posted March 1, 2014 Posted March 1, 2014 (edited) So I've noticed that when you press a button on a GUI and lets say it just displays a MsgBox, when that MsgBox is still active (User hasn't pressed "Ok") the user can click another button on the GUI and that action will be cued and as soon as the user pressed "Ok" the second buttons action is fired without them having to press the button again. Is it possible to not allow this? Without having to do something like.. Func _Test() If $ActiveFunction = 0 Then $ActiveFunction = 1 MsgBox(0, "Test", "This is a MsgBox") $ActiveFunction = 0 Else Sleep(10) EndIf EndFunc Edited March 1, 2014 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Moderators Melba23 Posted March 1, 2014 Moderators Posted March 1, 2014 Damein,If all you want to show is a MsgBox, then make it "Task Modal", like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetState() MsgBox(8192, "Blocking", "Press me to continue") ; $MB_TASKMODAL While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndIf you want the main GUI to be unresponsive during other functions, then just disable it with GUISetState as you enter the function and then re-enable it as the function ends. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Damein Posted March 1, 2014 Author Posted March 1, 2014 (edited) Ah, good idea. I will Disable the main GUI Thanks! *** EDIT *** Slight problem with the GuiSetState. When it happens, the window gets minimized, is this normal/avoidable? Kind of obnoxious that after your function is over, you have to re-select the GUI from the taskbar to use it again. Edited March 1, 2014 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Moderators Melba23 Posted March 1, 2014 Moderators Posted March 1, 2014 Damein,That should not happen - please post the code you are using. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Damein Posted March 1, 2014 Author Posted March 1, 2014 (edited) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Images\Icon.ico #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=R.S.S. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include ".\Skins\hex.au3" #include "_UskinLibrary.au3" ; End includes for program ; Load Skin _Uskin_LoadDLL() _USkin_Init(_Hex(True)) ; End Load Skin ; Set options for program Opt("GUIOnEventMode", 1) ; End options for program Global $NewStatusCheck, $FoundBattery, $SelectionGui _SelectionGui() Func _SelectionGui() $SelectionGui = GUICreate("Selection..", 800, 600) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUICtrlCreatePic(@ScriptDir & "\Images\Logo.bmp", 190, 20, 400, 100) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 130) GUISetBkColor(0xFFFFFF) $CreateNewButton = GUICtrlCreateButton("New Worksheet", 40, 200, 180, 50) GUICtrlSetOnEvent(-1, "_NewWorkSheet") GUICtrlSetFont(-1, 12) $EditButton = GUICtrlCreateButton("Edit Worksheet", 310, 200, 180, 50) GUICtrlSetOnEvent(-1, "_EditWorkSheet") GUICtrlSetFont(-1, 12) $ChangeStatusButton = GUICtrlCreateButton("Change Status", 570, 200, 180, 50) GUICtrlSetOnEvent(-1, "_ChangeStatus") GUICtrlSetFont(-1, 12) $FinalizeButton = GUICtrlCreateButton("Finalize Worksheet", 170, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Finalize") GUICtrlSetFont(-1, 12) $TagButton = GUICtrlCreateButton("Tag Battery", 440, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Tag") GUICtrlSetFont(-1, 12) $SearchButton = GUICtrlCreateButton("Search For Battery", 300, 500, 180, 50) GUICtrlSetOnEvent(-1, "_Search") GUICtrlSetFont(-1, 12) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 560) GUICtrlCreateLabel("An R.S.S. Production ©", 670, 585, 200) GUICtrlSetFont(-1, 9) GUISetState() EndFunc ;==>_SelectionGui Func _NewWorkSheet() GuiSetState(@SW_DISABLE, $SelectionGui) $SerialNumber = InputBox("New", "Please input the serial number of the new battery..") If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then $VerifyNew = MsgBox(4, "New", "A worksheet has already been created for this battery." & @CRLF & @CRLF & "If this is a new worksheet for the same battery, press yes. If not, press no.") If $VerifyNew = 6 Then $Count = DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber, 1) $Count[1] += 1 FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") Else Sleep(10) EndIf EndIf DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) If @error Then DirCreate(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") EndIf If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then Sleep(10) Else FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") EndIf GuiSetState(@SW_ENABLE, $SelectionGui) WinActivate("Selection..") EndFunc ;==>_NewWorkSheet Func _EditWorkSheet() MsgBox(0, "Test", "Edit") EndFunc ;==>_EditWorkSheet Func _ChangeStatus() $SerialCheck = InputBox("Stat.", "Please input the serial number of the battery in question..") If $SerialCheck = "" Then MsgBox(48, "Error", "Error, no serial number input!") EndIf If $SerialCheck > "" Then $Count = DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialCheck, 1) If @Error Then MsgBox(48, "Error", "No battery found, please enter the serial number again or create a worksheet for this battery.") Else $FoundBattery = 1 While $NewStatusCheck = "" $StatusChange = InputBox("Stat.", "Please input the desired status change for " & $SerialCheck & "." & @CRLF & @CRLF & "Initial" & @CRLF & "Charge" _ & @CRLF & "Constant" & @CRLF & "Rundown" & @CRLF & "Repair" & @CRLF & "Passed" & @CRLF & "Ready") If $StatusChange = "Initial" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Initial Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Initial") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Initial") EndIf ElseIf $StatusChange = "Charge" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to On Charge Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Charge") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Charge") EndIf ElseIf $StatusChange = "Constant" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Constant Current Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Constant") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Constant") EndIf ElseIf $StatusChange = "Rundown" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Rundown Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Rundown") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Rundown") EndIf ElseIf $StatusChange = "Repair" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Repair Line.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Repair") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Repair") EndIf ElseIf $StatusChange = "Passed" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Passed.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Repair") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Repair") EndIf ElseIf $StatusChange = "Ready" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Ready To Be Shipped.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Ready") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Ready") EndIf EndIf WEnd $NewStatusCheck = "" EndIf EndIf $NewStatusCheck = "" $SerialCheck = "" $StatusChange = "" EndFunc ;==>_ChangeStatus Func _Finalize() MsgBox(0, "Test", "Final") EndFunc ;==>_Finalize Func _Tag() MsgBox(0, "Test", "Tag") EndFunc ;==>_Tag Func _Search() $SerialCheck = InputBox("Search..", "Input the serial number of the battery you are searching for.") If $SerialCheck = "" Then MsgBox(48, "Error", "Error, no serial number input!") EndIf If $SerialCheck > "" Then $SerialNumbers = IniReadSection(@ScriptDir & "\Data\Serials.ini", "Serials") For $i = 1 To $SerialNumbers[0][0] If $SerialNumbers[$i][1] = $SerialCheck Then $FoundBattery = 1 EndIf Next If $FoundBattery < 1 Then MsgBox(48, "Error", "Serial number not found. Please verify serial number." & @CRLF & @CRLF & "If problem persists, please speak with your operations manager.") Else $Info = IniReadSection(@ScriptDir & "\Data\" & $SerialCheck & ".ini", "Info") For $i = 1 To UBound($Info) - 1 MsgBox(0, "Test", $Info[$i][0] & "=" & $Info[$i][1]) Next EndIf EndIf EndFunc ;==>_Search Func _Exit() Exit EndFunc ;==>_Exit While 1 Sleep(10) WEnd I added in a WinActivate for now, but I would prefer for it not to happen. Here are the two actually related parts Func _SelectionGui() $SelectionGui = GUICreate("Selection..", 800, 600) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUICtrlCreatePic(@ScriptDir & "\Images\Logo.bmp", 190, 20, 400, 100) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 130) GUISetBkColor(0xFFFFFF) $CreateNewButton = GUICtrlCreateButton("New Worksheet", 40, 200, 180, 50) GUICtrlSetOnEvent(-1, "_NewWorkSheet") GUICtrlSetFont(-1, 12) $EditButton = GUICtrlCreateButton("Edit Worksheet", 310, 200, 180, 50) GUICtrlSetOnEvent(-1, "_EditWorkSheet") GUICtrlSetFont(-1, 12) $ChangeStatusButton = GUICtrlCreateButton("Change Status", 570, 200, 180, 50) GUICtrlSetOnEvent(-1, "_ChangeStatus") GUICtrlSetFont(-1, 12) $FinalizeButton = GUICtrlCreateButton("Finalize Worksheet", 170, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Finalize") GUICtrlSetFont(-1, 12) $TagButton = GUICtrlCreateButton("Tag Battery", 440, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Tag") GUICtrlSetFont(-1, 12) $SearchButton = GUICtrlCreateButton("Search For Battery", 300, 500, 180, 50) GUICtrlSetOnEvent(-1, "_Search") GUICtrlSetFont(-1, 12) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 560) GUICtrlCreateLabel("An R.S.S. Production ©", 670, 585, 200) GUICtrlSetFont(-1, 9) GUISetState() EndFunc ;==>_SelectionGui And Func _NewWorkSheet() GuiSetState(@SW_DISABLE, $SelectionGui) $SerialNumber = InputBox("New", "Please input the serial number of the new battery..") If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then $VerifyNew = MsgBox(4, "New", "A worksheet has already been created for this battery." & @CRLF & @CRLF & "If this is a new worksheet for the same battery, press yes. If not, press no.") If $VerifyNew = 6 Then $Count = DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber, 1) $Count[1] += 1 FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") Else Sleep(10) EndIf EndIf DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) If @error Then DirCreate(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") EndIf If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then Sleep(10) Else FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.") EndIf GuiSetState(@SW_ENABLE, $SelectionGui) WinActivate("Selection..") EndFunc ;==>_NewWorkSheet Disregard the poor indentions and stuff, I always fix em up at the end ^^; Edited March 1, 2014 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Moderators Melba23 Posted March 1, 2014 Moderators Posted March 1, 2014 Damein,The GUI is not minimizing when I run that code - without the skinning because I do not have the necessary files. Can you please try commenting out the 2 skin functions and see if that is causing the problem for you too? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Damein Posted March 1, 2014 Author Posted March 1, 2014 I removed the skin functions and it still minimizes for me Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Moderators Melba23 Posted March 1, 2014 Moderators Posted March 1, 2014 Damein,Does it minimize before or after the InputBox line? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Damein Posted March 1, 2014 Author Posted March 1, 2014 After, here is a video demo of it. http://www.twitch.tv/prophetegamings/b/507365527 Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Moderators Melba23 Posted March 1, 2014 Moderators Posted March 1, 2014 Damein,I did not doubt you - but the GUI certainly does not minimize when I run that script. I fear you are stuck with the WinActivate line unless someone else can come with a solution - sorry. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Damein Posted March 1, 2014 Author Posted March 1, 2014 Oh, I didn't assume you doubted me, I just thought maybe if you saw it in action since we can't seem to re-create it it would help I am a horrible person at explaining things through words, and actions generally speak louder so I generally explain things hands on lol. Thanks for the help thus far though! Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
orbs Posted March 3, 2014 Posted March 3, 2014 (edited) @Damein, please note that the main GUI is not minimized - it is simply placed under all the other windows. you can see that clearly if you comment-out the WinActivate line, run your script, and before click any button, make sure all other windows are minimized. you can resolve this by specify the "parent window" of the MsgBox, like this -look at the MsgBox's in _NewWorkSheet() : expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Images\Icon.ico #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=R.S.S. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <EditConstants.au3> #include <GUIConstantsEx.au3> ;#include ".\Skins\hex.au3" ;#include "_UskinLibrary.au3" ; End includes for program ; Load Skin ;_Uskin_LoadDLL() ;_USkin_Init(_Hex(True)) ; End Load Skin ; Set options for program Opt("GUIOnEventMode", 1) ; End options for program Global $NewStatusCheck, $FoundBattery, $SelectionGui _SelectionGui() Func _SelectionGui() $SelectionGui = GUICreate("Selection..", 800, 600) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUICtrlCreatePic(@ScriptDir & "\Images\Logo.bmp", 190, 20, 400, 100) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 130) GUISetBkColor(0xFFFFFF) $CreateNewButton = GUICtrlCreateButton("New Worksheet", 40, 200, 180, 50) GUICtrlSetOnEvent(-1, "_NewWorkSheet") GUICtrlSetFont(-1, 12) $EditButton = GUICtrlCreateButton("Edit Worksheet", 310, 200, 180, 50) GUICtrlSetOnEvent(-1, "_EditWorkSheet") GUICtrlSetFont(-1, 12) $ChangeStatusButton = GUICtrlCreateButton("Change Status", 570, 200, 180, 50) GUICtrlSetOnEvent(-1, "_ChangeStatus") GUICtrlSetFont(-1, 12) $FinalizeButton = GUICtrlCreateButton("Finalize Worksheet", 170, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Finalize") GUICtrlSetFont(-1, 12) $TagButton = GUICtrlCreateButton("Tag Battery", 440, 350, 180, 50) GUICtrlSetOnEvent(-1, "_Tag") GUICtrlSetFont(-1, 12) $SearchButton = GUICtrlCreateButton("Search For Battery", 300, 500, 180, 50) GUICtrlSetOnEvent(-1, "_Search") GUICtrlSetFont(-1, 12) GUICtrlCreateLabel("______________________________________________________________________________________________________________________________________", 0, 560) GUICtrlCreateLabel("An R.S.S. Production ©", 670, 585, 200) GUICtrlSetFont(-1, 9) GUISetState() EndFunc ;==>_SelectionGui Func _NewWorkSheet() GuiSetState(@SW_DISABLE, $SelectionGui) $SerialNumber = InputBox("New", "Please input the serial number of the new battery..") If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then $VerifyNew = MsgBox(4, "New", "A worksheet has already been created for this battery." & @CRLF & @CRLF & "If this is a new worksheet for the same battery, press yes. If not, press no.",0,$SelectionGui) If $VerifyNew = 6 Then $Count = DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber, 1) $Count[1] += 1 FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & "-" & $Count[1] & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.",0,$SelectionGui) Else Sleep(10) EndIf EndIf DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) If @error Then DirCreate(@ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.",0,$SelectionGui) EndIf If FileExists(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") Then Sleep(10) Else FileCopy(@ScriptDir & "\Data\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber) FileMove(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\Default.ini", @ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini") IniWrite(@ScriptDir & "\Data\Worksheets\" & $SerialNumber & "\" & $SerialNumber & ".ini", "Info", "Serial", $SerialNumber) MsgBox(0, "New", "New worksheet completed. Please move on to Edit Worksheet.",0,$SelectionGui) EndIf GuiSetState(@SW_ENABLE, $SelectionGui) EndFunc ;==>_NewWorkSheet Func _EditWorkSheet() MsgBox(0, "Test", "Edit") EndFunc ;==>_EditWorkSheet Func _ChangeStatus() $SerialCheck = InputBox("Stat.", "Please input the serial number of the battery in question..") If $SerialCheck = "" Then MsgBox(48, "Error", "Error, no serial number input!") EndIf If $SerialCheck > "" Then $Count = DirGetSize(@ScriptDir & "\Data\Worksheets\" & $SerialCheck, 1) If @Error Then MsgBox(48, "Error", "No battery found, please enter the serial number again or create a worksheet for this battery.") Else $FoundBattery = 1 While $NewStatusCheck = "" $StatusChange = InputBox("Stat.", "Please input the desired status change for " & $SerialCheck & "." & @CRLF & @CRLF & "Initial" & @CRLF & "Charge" _ & @CRLF & "Constant" & @CRLF & "Rundown" & @CRLF & "Repair" & @CRLF & "Passed" & @CRLF & "Ready") If $StatusChange = "Initial" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Initial Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Initial") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Initial") EndIf ElseIf $StatusChange = "Charge" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to On Charge Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Charge") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Charge") EndIf ElseIf $StatusChange = "Constant" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Constant Current Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Constant") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Constant") EndIf ElseIf $StatusChange = "Rundown" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Rundown Readings.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Rundown") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Rundown") EndIf ElseIf $StatusChange = "Repair" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Repair Line.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Repair") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Repair") EndIf ElseIf $StatusChange = "Passed" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Passed.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Repair") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Repair") EndIf ElseIf $StatusChange = "Ready" Then $NewStatusCheck = 1 MsgBox(0, "Stat.", "Status changed to Ready To Be Shipped.") If $Count[1] = 1 Then IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & ".ini", "Status", "Status=Ready") Else IniWriteSection(@ScriptDir & "\Data\Worksheets\" & $SerialCheck & "\" & $SerialCheck & "-" & $Count[1] & ".ini", "Status", "Status=Ready") EndIf EndIf WEnd $NewStatusCheck = "" EndIf EndIf $NewStatusCheck = "" $SerialCheck = "" $StatusChange = "" EndFunc ;==>_ChangeStatus Func _Finalize() MsgBox(0, "Test", "Final") EndFunc ;==>_Finalize Func _Tag() MsgBox(0, "Test", "Tag") EndFunc ;==>_Tag Func _Search() $SerialCheck = InputBox("Search..", "Input the serial number of the battery you are searching for.") If $SerialCheck = "" Then MsgBox(48, "Error", "Error, no serial number input!") EndIf If $SerialCheck > "" Then $SerialNumbers = IniReadSection(@ScriptDir & "\Data\Serials.ini", "Serials") For $i = 1 To $SerialNumbers[0][0] If $SerialNumbers[$i][1] = $SerialCheck Then $FoundBattery = 1 EndIf Next If $FoundBattery < 1 Then MsgBox(48, "Error", "Serial number not found. Please verify serial number." & @CRLF & @CRLF & "If problem persists, please speak with your operations manager.") Else $Info = IniReadSection(@ScriptDir & "\Data\" & $SerialCheck & ".ini", "Info") For $i = 1 To UBound($Info) - 1 MsgBox(0, "Test", $Info[$i][0] & "=" & $Info[$i][1]) Next EndIf EndIf EndFunc ;==>_Search Func _Exit() Exit EndFunc ;==>_Exit While 1 Sleep(10) WEnd PS i didn't read through your script, but i hope it did not do anything naughty to my system... PS #2 what software you used to produce that video? Edited March 3, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
Damein Posted March 4, 2014 Author Posted March 4, 2014 I will look into it. I used XSplit Broadcaster and ZoomIt for the panning feature. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now