#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=00.ico
#AutoIt3Wrapper_outfile=121.exe
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
Opt("GUICloseOnESC", 0)
Dim $aRecords, $S = 1
If Not _FileReadToArray(@ScriptDir & "\资料.txt", $aRecords) Then
MsgBox(0, "错误", "请检查身份信息文件是否存在!")
Exit
EndIf
$Form2 = GUICreate("博吧专用", 319, 120)
$Button1 = GUICtrlCreateButton("刷新", 232, 24, 75, 20, 0)
$Button2 = GUICtrlCreateButton("填写", 232, 72, 75, 20, 0)
$Label1 = GUICtrlCreateLabel("姓 名", 16, 28, 40, 17)
$Label2 = GUICtrlCreateLabel("身份证", 16, 76, 40, 17)
$Input1 = GUICtrlCreateInput("", 64, 24, 121, 21, $ES_AUTOHSCROLL)
$Input2 = GUICtrlCreateInput("", 64, 72, 121, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Input1, "")
GUICtrlSetData($Input2, "")
If $S > $aRecords[0] Then $S = 1
If $aRecords[$S] <> "" Then
$aRecords[$S] = StringStripWS($aRecords[$S], 8)
$Len = StringLen($aRecords[$S])
For $I = 1 To $Len
$sfz = StringTrimLeft($aRecords[$S], $I)
$Int = StringIsInt($sfz)
If $Int = 1 Then
$xm = StringLeft($aRecords[$S], $I)
GUICtrlSetData($Input1, $xm)
GUICtrlSetData($Input2, $sfz)
$I = $Len
EndIf
Next
$S = $S + 1
EndIf
Case $Button2
$Exists = WinExists("常用操作", "")
If $Exists = 1 Then
WinActivate("常用操作", "")
WinWaitActive ("", "")
ControlSetText("", "", "ThunderRT6TextBox157", GUICtrlRead($Input1))
ControlSetText("", "", "ThunderRT6TextBox156", GUICtrlRead($Input2))
Else
MsgBox(0, "错误", "请先打开开卡页面")
EndIf
EndSwitch
WEnd
我需要加入点击最小化和关闭按钮都最小化到托盘的功能,在论坛搜索到了相关代码