找回密码
 加入
搜索
查看: 3390|回复: 1

[AU3基础] 我这段代码里的的进入如何用到键盘的Enter?请高手请点

[复制链接]
发表于 2014-5-8 18:05:07 | 显示全部楼层 |阅读模式
本帖最后由 kelvinso 于 2014-5-8 19:53 编辑

#NoTrayIcon
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\A-DATA\ICO\1_Q9UE2_setup.ico
#AutoIt3Wrapper_outfile=kelvinso.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Description=CitiNET PXE Boot Tools
#AutoIt3Wrapper_Res_Fileversion=2.0.8.0
#AutoIt3Wrapper_Res_LegalCopyright=Kelvin So
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_Language=1028
#AutoIt3Wrapper_Res_Field=ProductName|CitiNET PXE Boot Tools
#AutoIt3Wrapper_Res_Field=CompanyName|城市網絡電腦系統
#AutoIt3Wrapper_Res_Field=網址|http://www.citinet.com.hk
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseAnsi=y
#Region ;**** 參數創建於 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseAnsi=y
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#include <File.au3>

;

;

#include <EditConstants.au3>



;

;

Global $String, $Drive, $Dir, $File, $Ext


Local $pass = "so20208"


Func RunProgram()
        $String = "GHOST32.EXE -noide -nousb -no1394 -z5"
        _PathSplit($String, $Drive, $Dir, $File, $Ext)
        Run($String,"", @SW_SHOW)
        ;MsgBox(0, "", $Drive & StringTrimRight($Dir, 1))
        Exit
       
EndFunc   ;==>RunProgram


If FileExists(@WindowsDir & "\system32\ccscl.dll") And FileExists(@WindowsDir & "\System32\web.dll") Then

        If InputBox('提示', '        先学做人,后学技术。        ' & @LF & _
                '        人品第一,技术第二。        ' & @LF & @LF & _
                '        请输入密码:', '', '*M', -1, 150) = $pass Then
       
                FileInstall("citinet.bmp", @WindowsDir & "\temp\", 1)
                $Form1 = GUICreate("CitiNET Computer System Co., LTD.", 357, 261, -1, -1)
                $Pic1 = GUICtrlCreatePic(@WindowsDir & "\temp\citinet.bmp", 0, 0, 357, 145)
                $Button1 = GUICtrlCreateButton("运行", 56, 200, 73, 25)
                $Button2 = GUICtrlCreateButton("退出", 208, 200, 81, 25)
                ;$Label1 = GUICtrlCreateLabel("公司網址 公司郵箱", 0, 245, 103, 17)
                $Label2 = GUICtrlCreateLabel("Powered By : Kelvin So", 225, 245)
                GUISetState(@SW_SHOW)
                #NoTrayIcon
                GUISetState(@SW_SHOW)

                ;将string改为你需要的数值
                While 1
                        $nMsg = GUIGetMsg()
                        Switch $nMsg
                                Case $GUI_EVENT_CLOSE
                                        Exit
                                Case $Button1
                                        RunProgaram()
                                Case $Button2
                                        Exit
                        EndSwitch
                WEnd

        EndIf
EndIf




                $Button1 = GUICtrlCreateButton("运行", 56, 200, 73, 25)  如何用到键盘里面 "Enter" 进入
                $Button2 = GUICtrlCreateButton("退出", 208, 200, 81, 25) 如何可以用到键盘里面的 "Esc" 键退出?
发表于 2014-5-9 01:34:48 | 显示全部楼层
GUISetAccelerators ( 快捷键 [, 窗口句柄] )
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 06:29 , Processed in 0.077751 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表