#Region
#AutoIt3Wrapper_Res_File_Add=Still Time Cyr.ttf, TTF, Century_Schoolbook
#AutoIt3Wrapper_Res_File_Add=Still Time Cyr.ttf, TTF, Modern_No_20
#AutoIt3Wrapper_Res_File_Add=Still Time Cyr.ttf, TTF, Ravie
#EndRegion
#Region
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_After=Utilities\ResHacker.exe -add %out%, %out%, CENSCBK.ttf, TTF, Century_Schoolbook,
#AutoIt3Wrapper_Run_After=Utilities\Upx.exe %out% --best --no-backup --overlay=copy --compress-exports=1 --compress-resources=0 --strip-relocs=1
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_After=Utilities\ResHacker.exe -add %out%, %out%, MOD20.ttf, TTF, Modern_No_20,
#AutoIt3Wrapper_Run_After=Utilities\Upx.exe %out% --best --no-backup --overlay=copy --compress-exports=1 --compress-resources=0 --strip-relocs=1
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_After=Utilities\ResHacker.exe -add %out%, %out%, ravie.ttf, TTF, Ravie,
#AutoIt3Wrapper_Run_After=Utilities\Upx.exe %out% --best --no-backup --overlay=copy --compress-exports=1 --compress-resources=0 --strip-relocs=1
#EndRegion
#Region ### START Koda GUI section ### Form=D:\Files\AutoIt3\TSO\MainFrame.kxf
$MainFrame = GUICreate("The Settlers Online SR Bot", 615, 416, 192, 148)
$hInstance = _WinAPI_GetModuleHandle(0)
_LoadResourceFont($hInstance, "TTF", "Ravie")
GUISetFont(8, 400, 0, "Ravie")
$TSOSRLabel = GUICtrlCreateLabel("The Settlers Online SR Bot", 0, 0, 618, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE,$WS_BORDER))
GUICtrlSetFont(-1, 16, 400, 0, "Ravie")
$Tab = GUICtrlCreateTab(0, 56, 618, 369, -1, $TCS_EX_FLATSEPARATORS)
$TabSheet1 = GUICtrlCreateTabItem("Main")
$GGInfo = GUICtrlCreateButton("Сбор данных", 12, 89, 89, 41)
$hInstance = _WinAPI_GetModuleHandle(0)
_LoadResourceFont($hInstance, "TTF", "Modern_No_20")
GUICtrlSetFont(-1, 8, 800, 0, "Modern No. 20")
$TabSheet2 = GUICtrlCreateTabItem("Buffs")
GUICtrlSetState(-1,$GUI_SHOW)
$Group1 = GUICtrlCreateGroup("Бафлист", 13, 93, 129, 313)
$hInstance = _WinAPI_GetModuleHandle(0)
_LoadResourceFont($hInstance, "TTF", "Century_Schoolbook")
GUICtrlSetFont(-1, 10, 400, 2, "Century Schoolbook")
$S1BuffList = GUICtrlCreateButton("Сектор 1", 21, 117, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S2BuffList = GUICtrlCreateButton("Сектор 2", 21, 149, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S3BuffList = GUICtrlCreateButton("Сектор 3", 21, 181, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S4BuffList = GUICtrlCreateButton("Сектор 4", 21, 213, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S5BuffList = GUICtrlCreateButton("Сектор 5", 21, 245, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S6BuffList = GUICtrlCreateButton("Сектор 6", 21, 277, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S7BuffList = GUICtrlCreateButton("Сектор 7", 21, 309, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S8BuffList = GUICtrlCreateButton("Сектор 8", 21, 341, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
$S9BuffList = GUICtrlCreateButton("Сектор 9", 21, 373, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Modern No. 20")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StartAutoBuff = GUICtrlCreateButton("Автобаф", 397, 341, 193, 57)
GUICtrlSetFont(-1, 14, 800, 0, "Modern No. 20")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Func _LoadResourceFont($hInstance, $sResType, $sResName, $iResLanguage = 0)
Local $hInfo, $hData, $pData, $iSize, $hFont
If $iResLanguage Then
$hInfo = _WinAPI_FindResourceEx($hInstance, $sResType, $sResName, $iResLanguage)
Else
$hInfo = _WinAPI_FindResource($hInstance, $sResType, $sResName)
EndIf
$hData = _WinAPI_LoadResource($hInstance, $hInfo)
$iSize = _WinAPI_SizeOfResource($hInstance, $hInfo)
$pData = _WinAPI_LockResource($hData)
If @error Then
Return SetError(1, 0, 0)
EndIf
$hFont = _WinAPI_AddFontMemResourceEx($pData, $iSize)
If @error Then
Return SetError(1, 0, 0)
EndIf
Return $hFont
EndFunc