Sunblood Posted March 30, 2010 Share Posted March 30, 2010 expandcollapse popupWhile 1 $msg = GUIGetMsg(1) Switch $msg[1] Case $gui Switch $msg[0] Case $GUI_EVENT_CLOSE SaveSettings() Exit Case $GUI_EVENT_MINIMIZE WinSetState("Watchdog", "", @SW_HIDE) Case $buttonCheckNow StartCheck() Case $buttonAddRule $a = GetSitelist() $b = GUICtrlRead($dropdownSitelist) For $i = 1 To $a[0] If $a[$i] = $b Then _GUICtrlComboBox_SetCurSel($dropdownSiteListAdd, $i - 1) EndIf Next WinSetState("Add Rule", "", @SW_RESTORE) Case $buttonEditRule $a = GetSitelist() $b = GUICtrlRead($dropdownSitelist) For $i = 1 To $a[0] If $a[$i] = $b Then _GUICtrlComboBox_SetCurSel($dropdownSiteListEdit, $i - 1) EndIf Next $sel = _GUICtrlTreeView_GetText($treeviewRuleset, _GUICtrlTreeView_GetSelection($treeviewRuleset)) If IniRead($ini, $sel, "site", "ERROR") = "ERROR" Then MsgBox(0, "Error", "Please select a top-layer item to edit.") Else GUICtrlSetData($inputCategoryEdit, IniRead($ini, $sel, "category", 0)) GUICtrlSetData($inputRuleNameEdit, $sel) GUICtrlSetData($editIncludeEdit, StringReplace(IniRead($ini, $sel, "include", ""), "|", @CRLF)) GUICtrlSetData($editExcludeEdit, StringReplace(IniRead($ini, $sel, "exclude", ""), "|", @CRLF)) EndIf WinSetState("Edit Rule", "", @SW_RESTORE) EndSwitch Case $guiAdd Switch $msg[0] Case $GUI_EVENT_CLOSE WinSetState("Add Rule", "", @SW_HIDE) Case $buttonCancelAdd WinSetState("Add Rule", "", @SW_HIDE) EndSwitch Case $guiEdit Switch $msg[0] Case $GUI_EVENT_CLOSE WinSetState("Edit Rule", "", @SW_HIDE) Case $buttonCancelEdit MsgBox(0, "", "") WinSetState("Edit Rule", "", @SW_HIDE) Case $buttonSaveEdit IniWrite($ini, $sel, "category", GUICtrlRead($inputCategoryEdit)) IniWrite($ini, $sel, "include", StringReplace(GUICtrlRead($editIncludeEdit), @CRLF, "|")) IniWrite($ini, $sel, "exclude", StringReplace(GUICtrlRead($editExcludeEdit), @CRLF, "|")) WinSetState("Edit Rule", "", @SW_HIDE) EndSwitch EndSwitch ...... ...... rest of While loop and other code I have three separate GUI windows in this script, but the buttons on two of them aren't working. I'm using GuiGetMsg(1) and arrays to properly assign different events to the right GUIs, but certain buttons still don't execute anything. All the buttons on the top GUI ($gui) work just fine. $GUI_EVENT_CLOSE works for all three GUIs. $buttonSaveAdd, $buttonSaveEdit, $buttonCancelEdit, and $buttonCancelAdd don't do anything. I put a small MsgBox(0,"","") under $buttonCancelEdit just to see if the code was executing, and it isn't. Can't figure this one out. Link to comment Share on other sites More sharing options...
Steveiwonder Posted March 30, 2010 Share Posted March 30, 2010 Can you post the code which generates the GUI? or just everything, i'm not going to all of that to attempt to run it. They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Sunblood Posted March 30, 2010 Author Share Posted March 30, 2010 I'll attach the script.Put the following in torrents.ini[SITE:AutoIt Example] enabled =1 [Example entry] site = Autoit Example category=7 include=YES exclude=NO [Settings] autocheck=1 timecheck=1 visibleIE=4torrents.au3 Link to comment Share on other sites More sharing options...
BrettF Posted March 31, 2010 Share Posted March 31, 2010 Double post. Please see: http://www.autoitscript.com/forum/index.php?showtopic=112388&st=0&gopid=787547&#entry787547 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
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