回复 3# gogo023 #include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 322, 197, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Input1 = GUICtrlCreateInput("Input1", 72, 40, 121, 21)
$Label1 = GUICtrlCreateLabel("输入机器代码", 72, 16, 76, 17)
$Input2 = GUICtrlCreateInput("Input2", 120, 104, 89, 21)
$Label2 = GUICtrlCreateLabel("分辨率", 72, 104, 40, 17)
$Button = GUICtrlCreateButton("测试按钮", 200, 38)
GUICtrlSetOnEvent(-1, "Software_Sum")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
func Form1Close()
Exit
EndFunc
func Software_Sum()
Local $Data = GUICtrlRead ( $Input1 )
If $Data <= 67 Then
GUICtrlSetData ( $Input2, IniRead ( @ScriptDir & "\FBConfig.ini", "分辨率设置", "2", "" ) )
ElseIf $Data >= 68 Then
GUICtrlSetData ( $Input2, IniRead ( @ScriptDir & "\FBConfig.ini", "分辨率设置", "1", "" ) )
EndIf
EndFunc
|