Denied Posted July 13, 2006 Share Posted July 13, 2006 For some reason or another this isn't working, and its driving me nuts, maybe one of you guys can shed some light on it for me. ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> ; Options Opt("MouseCoordMode",2) Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("TrayIconDebug",1) Opt("GUIOnEventMode", 1) Opt("PixelCoordMode", 2) ; Check To See If Macros Is Already Running $g_szVersion = "Stuff" If WinExists($g_szVersion) Then Exit AutoItWinSetTitle($g_szVersion) ; Start GUI GuiCreate("Stuff", 665, 125,(@DesktopWidth-665)/2, (@DesktopHeight)/(@DesktopHeight) , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseButton") GUISetState(@SW_SHOW) ; Start Button $Start = GuiCtrlCreateButton(" Start", 290, 55, 75, 35) GUICtrlSetOnEvent($Start, "StartButton") $LI1 = "0000" ; Read Saved Last Config $LastBob = IniRead("Config.ini", "Info", "$Bob", "") ; Stuff $Stuff = GuiCtrlCreateTreeView(500, 40, 150, 80, $TVS_CHECKBOXES) $BobData = GuiCtrlCreateTreeViewItem("Bob", $Stuff) If $LastBob = 1 Then GuiCtrlSetState($BobData, $GUI_CHECKED) While 1 Sleep(100) WEnd Func CloseButton() Exit EndFunc Func StartButton() ; Saving Current Info $Bob = GUICtrlRead($BobData) If $Bob = $GUI_CHECKED Then IniWrite("Config.ini", "Info", "$LastBob", 1) If $Bob = $GUI_CHECKED Then $LI1 = "1111" EndFunc It doesn't save a "1" to the Config.ini when the box is checked and start is pressed. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 13, 2006 Share Posted July 13, 2006 Try: expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> ; Options Opt("MouseCoordMode", 2) Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("TrayIconDebug", 1) Opt("GUIOnEventMode", 1) Opt("PixelCoordMode", 2) ; Check To See If Macros Is Already Running $g_szVersion = "Stuff" If WinExists($g_szVersion) Then Exit AutoItWinSetTitle($g_szVersion) ; Start GUI GUICreate("Stuff", 665, 125, (@DesktopWidth - 665) / 2, (@DesktopHeight) / (@DesktopHeight), $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseButton") GUISetState(@SW_SHOW) ; Start Button $Start = GUICtrlCreateButton(" Start", 290, 55, 75, 35) GUICtrlSetOnEvent($Start, "StartButton") $LI1 = "0000" ; Read Saved Last Config $LastBob = IniRead(@ScriptDir & "\Config.ini", "Info", "Bob", 0) ; Stuff $Stuff = GUICtrlCreateTreeView(500, 40, 150, 80, $TVS_CHECKBOXES) $BobData = GUICtrlCreateTreeViewItem("Bob", $Stuff) If $LastBob = 1 Then GUICtrlSetState($BobData, $GUI_CHECKED) While 1 Sleep(100) WEnd Func CloseButton() Exit EndFunc ;==>CloseButton Func StartButton() ; Saving Current Info $LastBob = BitAND(GUICtrlRead($BobData),$GUI_CHECKED) IniWrite(@ScriptDir & "\Config.ini", "Info", "Bob", $LastBob) If $LastBob Then $LI1 = "1111" Else $LI1 = "0000" EndIf EndFunc ;==>StartButton SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Denied Posted July 13, 2006 Author Share Posted July 13, 2006 TYVM. That works fine now, I spent like 3 hours trying to figure that one out. Link to comment Share on other sites More sharing options...
Neoborn Posted July 14, 2006 Share Posted July 14, 2006 Would it be too much to ask that you highlight the changes so others can learn withouth having to go through line by line? Justwondering ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT Link to comment Share on other sites More sharing options...
GaryFrost Posted July 14, 2006 Share Posted July 14, 2006 Would it be too much to ask that you highlight the changes so others can learn withouth having to go through line by line? Justwondering Just follow $BobData and $LastBob SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MHz Posted July 14, 2006 Share Posted July 14, 2006 Would it be too much to ask that you highlight the changes so others can learn withouth having to go through line by line? Justwondering A differencing tool may help to see changes if not easy to see.http://winmerge.sourceforge.net/Marking is a good idea, but Gary already does add good effort to helping. Any help is good help. 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