2009-01-20

Remembering to update include settings for AutoIT when upgrading versions

When I updated AutoIT it wiped my include path settings. So here is the script I used to show and update them (I used the great Koda gui builder tool):

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=O:\Automation\Include\AutoitIncludeSettings.kxf
$Form2 = GUICreate("Dialog", 329, 238, 347, 263)
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("", 8, 1, 297, 193)
$Label1 = GUICtrlCreateLabel("Registry key for AutoIt searching for include files. (seperate with ;)", 24, 20, 230, 30)

$Edit1 = GUICtrlCreateEdit(RegRead( "HKEY_CURRENT_USER\Software\AutoIt v3\AutoIt","Include"), 16, 48, 281, 137)
;GUICtrlSetData(-1, "AEdit1")

GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
$DoAction = False
Exit
Case $Button1
$DoAction = True
ExitLoop
Case $Button2
$DoAction = False
ExitLoop
EndSwitch
WEnd

If $DoAction Then
RegWrite("HKEY_CURRENT_USER\Software\AutoIt v3\AutoIt","Include", "REG_SZ", GUICtrlRead($Edit1))
EndIf

No comments: