А эта функция возваращает состояние чебокса?
эта функция возваращает состояние чебокса? »
А проверить не судьба? И в справке что написано?
#include <GUIConstants.au3>
$icon = @ScriptDir & '\icon_Avtobot.ico'
$Form1_1 = GUICreate("Settings", 301, 234, 532, 397)
GUISetIcon("C:\Users\Lexa\Desktop\heroic_autobots.ico")
GUISetFont(8, 800, 0, "Palatino Linotype")
GUISetBkColor(0xFFFBF0)
$Checkbox1 = GUICtrlCreateCheckbox("Выводить общюю статистику", 8, 160, 289, 25)
GUICtrlSetFont(-1, 10, 800, 0, "Palatino Linotype")
$Label1 = GUICtrlCreateLabel(" AvToB0T Settings", 0, 0, 300, 25)
GUICtrlSetFont(-1, 12, 800, 0, "FreeSetBlackCTT")
GUICtrlSetBkColor(-1, 0xA6CAF0)
$Label3 = GUICtrlCreateLabel("Количество аккаунтов:", 8, 40, 155, 22)
GUICtrlSetFont(-1, 10, 800, 0, "Palatino Linotype")
$Input2 = GUICtrlCreateInput("Input2", 8, 64, 209, 24)
$Button2 = GUICtrlCreateButton("Сохранить", 8, 192, 97, 25, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Palatino Linotype")
$Button1 = GUICtrlCreateButton("Отмена", 120, 192, 97, 25, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Palatino Linotype")
$Label4 = GUICtrlCreateLabel("By ToSTeP", 240, 208, 52, 18)
GUICtrlSetFont(-1, 7, 800, 0, "Palatino Linotype")
$Input3 = GUICtrlCreateInput("Input2", 8, 128, 209, 24)
$Label5 = GUICtrlCreateLabel("Путь к UDOBot.exe (только папка):", 8, 104, 229, 22)
GUICtrlSetFont(-1, 10, 800, 0, "Palatino Linotype")
GUISetState(@SW_SHOW)
$Dir = @ScriptDir & '\AvToB0T.ini'
While 1
$x = GUICtrlRead($Chebox1)
If $x = $GUI_CHECKED Then $x = 1
Else $x = 0
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
Case $Button2
IniWrite($Dir,'Section','Statistic',$x)
Exit
EndSwitch
WEnd
помогите!У меня при нажатии на $button2 вылазиет MsgBox с тесктом, который был в другом скрипте, и реакция идет не сразу, + не закрывается!почему???
madmasles
18-12-2010, 23:23
LexaSF,
Вы бы код тегами обрамляли.
;...
While (http://www.autoitscript.com/autoit3/docs/keywords.htm#While) 1
$nMsg = GUIGetMsg (http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm)()
Switch (http://www.autoitscript.com/autoit3/docs/keywords.htm#Switch) $nMsg
Case (http://www.autoitscript.com/autoit3/docs/keywords.htm#Case) $GUI_EVENT_CLOSE, $Button1
Exit (http://www.autoitscript.com/autoit3/docs/keywords.htm#Exit)
Case (http://www.autoitscript.com/autoit3/docs/keywords.htm#Case) $Button2
$x = GUICtrlRead (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlRead.htm)($Checkbox1)
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $x = $GUI_CHECKED Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$x = 1
Else (http://www.autoitscript.com/autoit3/docs/keywords.htm#Else)
$x = 0
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
IniWrite (http://www.autoitscript.com/autoit3/docs/functions/IniWrite.htm)($Dir, 'Section', 'Statistic', $x)
Exit (http://www.autoitscript.com/autoit3/docs/keywords.htm#Exit)
EndSwitch (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndSwitch)
WEnd (http://www.autoitscript.com/autoit3/docs/keywords.htm#WEnd)
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.
Available in ZeroNet 1osznRoVratMCN3bFoFpR2pSV5c9z6sTC