[Asm] 纯文本查看 复制代码
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=12345.ico
#AutoIt3Wrapper_Outfile=WIFIgongxiang.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("WIFI共享器-QQ582573319", 267, 251, 224, 229)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\桌面\9885883_195801812000_1.jpg", 0, 0, 265, 89)
$Button1 = GUICtrlCreateButton("打开WIFI", 24, 136, 97, 41)
$Button2 = GUICtrlCreateButton("关闭WIFI", 152, 136, 97, 41)
$Label1 = GUICtrlCreateLabel("SSID:", 8, 104, 38, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 48, 103, 81, 21)
$Label2 = GUICtrlCreateLabel("密码:", 142, 104, 40, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$input2=GUICtrlCreateInput("", 182, 103, 81, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$Label3 = GUICtrlCreateLabel("", 10, 184, 4, 4)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
$Label4 = GUICtrlCreateLabel("欢迎使用WIFI共享器!!", 16, 192, 135, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$sid=GUICtrlRead($Input1)
$key=GUICtrlRead($Input2)
RunWait(@ComSpec & ' /C netsh wlan set hostednetwork mode=allow ssid="' & $sid &'" key="' & $key &'" ',"", @SW_HIDE )
RunWait(@ComSpec & ' /C netsh wlan start hostednetwork',"", @SW_HIDE)
GUICtrlSetState($Button1, $GUI_DISABLE)
$Label4 = GUICtrlCreateLabel("你的账号为"&$sid &@LF&"你的密码为"&$key&@LF&"成功开启你的无线网络", 16, 192, 135, 100)
Case $Button2
RunWait(@ComSpec & ' /C netsh wlan stop hostednetwork',"", @SW_HIDE)
GUICtrlSetState($Button1, $GUI_ENABLE)
$Label4 = GUICtrlCreateLabel("已经成功关闭你的无线网络", 16, 192, 135, 100)
EndSwitch
WEnd