The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
MixamAO beta5prereleaseGui.au3
Posted by: MixamAO beta5prereleaseGui.au3 | March 12, 2008 @ 4:09pm
AutoIT Code
[
Download
]
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.0 (beta) Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> Global $thisprogram = "MixamAO Gui" Global $fullredvexpath, $redvexpath, $redvexname #Region ### START Koda GUI section ### Form=E:\Desktop\MixamAO Gui\MixamAO.kxf $MixamAO_Gui = GUICreate("MixamAO", 469, 569, 246, 123) $MixamAO = GUICtrlCreateTab(8, 8, 449, 521) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("MixamAO.ini") $Group1 = GUICtrlCreateGroup("Options", 28, 49, 145, 97) $CBRefreshTray = GUICtrlCreateCheckbox("Refresh Tray", 44, 73, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($thisprogram & ".ini", "Settings", "RefreshTray", 1))) GUICtrlSetTip(-1, "Check for on unchecked for of") $CBrd = GUICtrlCreateCheckbox("R/D Prevention", 44, 97, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($thisprogram & ".ini", "Settings", "RDprevention", 1))) GUICtrlSetTip(-1, "Check for on unchecked for of") $CBLogs = GUICtrlCreateCheckbox("Manage Logs", 44, 120, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($thisprogram & ".ini", "Settings", "ManageLogs", 1))) GUICtrlSetTip(-1, "Check for on unchecked for of") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Settings", 28, 169, 249, 121) $LabelMaxGameLength = GUICtrlCreateLabel("MaxGameLength", 36, 201, 85, 17) GUICtrlSetTip(-1, "If a game is not made in this long, restart redvex") $InputMaxGameMin = GUICtrlCreateInput(Int(IniRead($thisprogram & ".ini", "Settings", "MaxGameLength", 600)/60), 132, 193, 56, 21) $UDMaxGameMinutes = GUICtrlCreateUpdown($InputMaxGameMin) GUICtrlSetLimit(-1, 60, 2) GUICtrlSetTip(-1, "Minutes") $InputMaxGameSec = GUICtrlCreateInput(mod(IniRead($thisprogram & ".ini", "Settings", "MaxGameLength", 600), 60), 200, 193, 56, 21) $UDMaxGameSeconds = GUICtrlCreateUpdown($InputMaxGameSec) GUICtrlSetLimit(-1, 59, 0) GUICtrlSetTip(-1, "Seconds") $LabelSleepTime = GUICtrlCreateLabel("Sleep Time", 36, 225, 57, 17) GUICtrlSetTip(-1, "How often to check for crash (in ms)") $InputSleep = GUICtrlCreateInput("" & IniRead($thisprogram & ".ini", "Settings", "Sleep", 1000) & "", 132, 217, 123, 21) $UDSleepTime = GUICtrlCreateUpdown($InputSleep) GUICtrlSetLimit(-1, 30000, 0) GUICtrlSetTip(-1, "Milliseconds") $LabelBanWaitTime = GUICtrlCreateLabel("BanWaitTime", 36, 249, 68, 17) GUICtrlSetTip(-1, "How long to wait before restarting after a ban") $InputBanWaitHour = GUICtrlCreateInput(Int(IniRead($thisprogram & ".ini", "Settings", "BanWaitTime", 3605)/60), 132, 241, 56, 21) $UDWaitTimeHour = GUICtrlCreateUpdown($InputBanWaitHour) GUICtrlSetLimit(-1, 24, 0) GUICtrlSetTip(-1, "Hours") $InputBanWaitMin = GUICtrlCreateInput(mod(IniRead($thisprogram & ".ini", "Settings", "BanWaitTime", 3605), 60), 199, 241, 56, 21) $UDWaitTimeMin = GUICtrlCreateUpdown($InputBanWaitMin) GUICtrlSetLimit(-1, 59, 0) GUICtrlSetTip(-1, "Minutes") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group3 = GUICtrlCreateGroup("RedVex Files", 28, 321, 385, 113) $LabelRedvexBrowse = GUICtrlCreateLabel("Locate your Redvex.exe file", 44, 349, 136, 17) $ButtonBrowse = GUICtrlCreateButton("Browse", 184, 344, 75, 25, 0) $LabelRedvexFolder = GUICtrlCreateLabel("Redvex Folder:", 44, 376, 76, 17) $InputRedvexFolder = GUICtrlCreateInput(IniRead($thisprogram & ".ini", "Settings", "RedVexDir", """RedvexFolder"""), 123, 372, 280, 21) $LabelRedvexName = GUICtrlCreateLabel("Redvex Name:", 44, 400, 75, 17) $InputRedvexName = GUICtrlCreateInput(IniRead($thisprogram & ".ini", "Settings", "RedVex", """Redvex"""), 123, 395, 280, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet2 = GUICtrlCreateTabItem("Awesom-O.ini") $Label5 = GUICtrlCreateLabel("Not yet added in Beta5", 162, 223, 113, 17) $TabSheet3 = GUICtrlCreateTabItem("Bot.ini") $Label6 = GUICtrlCreateLabel("Not yet added in Beta5", 162, 223, 113, 17) $TabSheet4 = GUICtrlCreateTabItem("About") $Label9 = GUICtrlCreateLabel("This is MixamAO Beta5 and this tab is also under construction", 76, 223, 294, 17) GUICtrlCreateTabItem("") $ButtonOK = GUICtrlCreateButton("OK", 200, 536, 75, 25, 0) $ButtonApply = GUICtrlCreateButton("Apply", 280, 536, 75, 25, 0) $ButtonCancel = GUICtrlCreateButton("Cancel", 360, 536, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $ButtonBrowse $fullredvexpath = FileOpenDialog("Locate your Redvex.exe file:", @DesktopDir & "\", "Executable (*.exe)", 1 + 2, "RedVex 3.exe") If @error Then MsgBox(4096,"","No File(s) chosen") Else $redvexname = StringTrimLeft($fullredvexpath, StringInStr($fullredvexpath, "\", 0, -1)) $redvexname = StringTrimRight($redvexname, 4) GUICtrlSetData($InputRedvexName, $redvexname) $redvexpath = StringTrimRight($fullredvexpath, StringLen($fullredvexpath) - StringInStr($fullredvexpath, "\", 0, -1)) GUICtrlSetData($InputRedvexFolder, $redvexpath) EndIf Case $ButtonCancel Exit Case $ButtonApply _SaveChanges() Case $ButtonOK _SaveChanges() Exit Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _SaveChanges() Local $refreshTray, $rdPrevention, $manageLogs $refreshTray = GUICtrlRead ($CBRefreshTray) $rdPrevention = GUICtrlRead ($CBrd) $manageLogs = GUICtrlRead ($CBLogs) If $refreshTray = $GUI_CHECKED Then IniWrite($thisprogram & ".ini", "Settings", "RefreshTray", 1) Else IniWrite($thisprogram & ".ini", "Settings", "RefreshTray", 0) EndIf If $rdPrevention = $GUI_CHECKED Then IniWrite($thisprogram & ".ini", "Settings", "RDprevention", 1) Else IniWrite($thisprogram & ".ini", "Settings", "RDprevention", 0) EndIf If $manageLogs = $GUI_CHECKED Then IniWrite($thisprogram & ".ini", "Settings", "ManageLogs", 1) Else IniWrite($thisprogram & ".ini", "Settings", "ManageLogs", 0) EndIf IniWrite($thisprogram & ".ini", "Settings", "Sleep", GUICtrlRead($InputSleep)) IniWrite($thisprogram & ".ini", "Settings", "MaxGameLength", GUICtrlRead($InputMaxGameMin)*60 + GUICtrlRead($InputMaxGameSec)) IniWrite($thisprogram & ".ini", "Settings", "BanWaitTime", GUICtrlRead($InputBanWaitHour)*60 + GUICtrlRead($InputBanWaitMin)) IniWrite($thisprogram & ".ini", "Settings", "RedVex", '""' & GUICtrlRead($InputRedvexName) & '""') IniWrite($thisprogram & ".ini", "Settings", "RedVexDir", '""' & GUICtrlRead($InputRedvexFolder) & '""') EndFunc Func _IniToGui($a) If $a = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.51 / 8
144 Votes
http://codebin.yi.org/137
page generated in 0.00 seconds