themax90 Posted February 11, 2005 Posted February 11, 2005 (edited) Hello I am working on an updater for my mchat project thats universal, in a way. And I want to make list views, with checkboxs. - MChat Updates/Plugins -Updates [CHECKBOX] Some update -Plugins [CHECKBOX] Some Plugin ______________________________ Can someone help? Heres the script: expandcollapse popupFileDelete(@ScriptDir & "\update.ini") SplashTextOn( "Loading....", "Loading Update Information. Please be patient as our updater organizes this data.", 300, 45) Dim $GUI_EVENT_CLOSE = -3, $TVS_HASBUTTONS = 0x0001, $TVS_HASLINES = 0x0002, $TVS_LINESATROOT = 0x0004, $TVS_DISABLEDRAGDROP = 0x0010, $TVS_SHOWSELALWAYS = 0x0020, $TVS_CHECKBOXES = 0x0100, $WS_EX_CLIENTEDGE = 0x00000200, $GUI_SHOW = 16, $GUI_HIDE = 32 $updater = GUICreate("Realm-Max Updater", 410, 335, (@DesktopWidth - 428) / 2, (@DesktopHeight - 351) / 2);, -1, -1, $parent ) $update_view = GUICtrlCreateTreeView(5, 80, 400, 250, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) $update_button = GUICtrlCreateButton("Download and Install", 265, 10, 140, 30) $info1 = GUICtrlCreateLabel("View the MChat Website", 267.5, 50, 135, 20) $info2 = GUICtrlCreateLabel("Welcome to the MChat Updater. Please look over the updates and plugins and check the ones you wish. When finished, hit download and install.", 10, 15, 245, 45) $main_view = GUICtrlCreateTreeViewitem("MChat Updates/Plugins", $update_view) $updates = GUICtrlCreateTreeViewitem("Updates", $main_view) $plugins = GUICtrlCreateTreeViewitem("Plugins", $main_view) GUICtrlSetColor($info1, 0x0000ff) GUICtrlSetFont($info1, 9, 400, 4) GUICtrlSetTip($info1, "http://www.realm-max.net/mchat/") InetGet( "http://www.realm-max.net/mchat/update.ini", @ScriptDir & "\update.ini", 1, 1) Do Sleep(100) Until FileExists(@ScriptDir & "\update.ini") $update_check = IniRead(@ScriptDir & "\update.ini", "Update Info", "Updates", "-1") If $update_check = -1 Then MsgBox(0, "Failure", "We are sorry, the update server is down.") ElseIf $update_check <> - 1 Then Do $uinfoa = GUICtrlCreateTreeViewitem(IniRead(@ScriptDir & "\update.ini", "Updates", "Update" & $update_check & "A", ""), $updates) $update_check = $update_check - 1 Until $update_check = 0 ;Do the list stuff EndIf $plugin_check = IniRead(@ScriptDir & "\update.ini", "Update Info", "Plugins", "-1") If $plugin_check = -1 Then MsgBox(0, "Failure", "We are sorry, the update server is down.") ElseIf $plugin_check <> - 1 Then Do $pinfoa = GUICtrlCreateTreeViewitem(IniRead(@ScriptDir & "\update.ini", "Plugins", "Plugin" & $plugin_check & "A", ""), $plugins) $plugin_check = $plugin_check - 1 Until $plugin_check = 0 ;Do the list stuff EndIf SplashOff() GUISetState() While 1 $msg = GUIGetMsg(1) $msg_event = $msg[0] $msg_win = $msg[1] If $msg_event = $GUI_EVENT_CLOSE And $msg_win = $updater Then FileDelete(@ScriptDir & "\update.ini") Exit EndIf If $msg_event = $info1 Then OpenSite("http://www.realm-max.net/mchat/") EndIf Wend Exit Func OpenSite($SitePath) If @OSTYPE = 'WIN32_NT' Then $Str = @ComSpec & ' /c start "" ' Else $Str = @ComSpec & ' /c start ' EndIf SplashTextOn( "Opening", "Website " & $SitePath & " opening.", 400, 25) Run($Str & $SitePath, '', @SW_HIDE) Sleep(1500) SplashOff() EndFunc ;==>OpenSite Please help if you can. If you notice, I Dimmed all the values so I dont have to include THE INTIRE GuiConstant file. Edited February 12, 2005 by AutoIt Smith
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