|
我在Include “ACN_String.au3” 并编译时出现以下内容,提示ACN_String.au3里的@Unicode 未定义:
H:\Software\Program Design\AutoIt\3.2.11.1.1\UserInclude\ACN_String.au3(25,16) : ERROR: undefined macro.
If @Unicode Then
~~~~~~~~~~~~^
E:\CoolVirus\MyWorks\ProgramDesign\AutoItProject\virtualinput2.au3 - 1 error(s), 0 warning(s)
但是我以前(使用AutoIt新版之前)编译过没问题的(之前的版本忘记了,现在用3.2.11.1.1。
请问哪位高手能为我解答?
附上全文:
[au3]
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=virtualinput2.exe
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <ACN_String.au3>
#include <GUIComboBox.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=e:\coolvirus\myworks\programdesign\autoitproject\form1.kxf
$frmMain = GUICreate("模拟输入", 323, 292, 389, 215)
GUISetOnEvent($GUI_EVENT_CLOSE, "frmMainClose")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "frmMainMinimize")
GUISetOnEvent($GUI_EVENT_RESTORE, "frmMainRestore")
$Edit1 = GUICtrlCreateEdit("", 8, 8, 305, 121)
$btnHide = GUICtrlCreateButton("隐藏(&H)", 240, 239, 73, 21, 0)
GUICtrlSetOnEvent(-1, "btnHideClick")
$btnClose = GUICtrlCreateButton("关闭(&C)", 240, 267, 73, 21, 0)
GUICtrlSetOnEvent(-1, "btnCloseClick")
$Group1 = GUICtrlCreateGroup("替换", 4, 132, 313, 101)
$Input1 = GUICtrlCreateInput("-", 52, 152, 90, 21)
$Input2 = GUICtrlCreateInput("{TAB}", 212, 152, 90, 21)
$Label1 = GUICtrlCreateLabel("转换成:", 152, 156, 52, 17)
$Input4 = GUICtrlCreateInput("{ENTER}", 212, 177, 90, 21)
$Label2 = GUICtrlCreateLabel("转换成:", 152, 181, 52, 17)
$Input3 = GUICtrlCreateInput("", 52, 177, 90, 21)
$Input6 = GUICtrlCreateInput("{TAB}", 212, 203, 90, 21)
$Label3 = GUICtrlCreateLabel("转换成:", 152, 207, 52, 17)
$Input5 = GUICtrlCreateInput("", 52, 203, 90, 21)
$Check1 = GUICtrlCreateCheckbox("", 24, 152, 17, 21)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "Check1Click")
$Check2 = GUICtrlCreateCheckbox("", 24, 176, 17, 21)
GUICtrlSetOnEvent(-1, "Check2Click")
$Check3 = GUICtrlCreateCheckbox("", 24, 202, 17, 21)
GUICtrlSetOnEvent(-1, "Check3Click")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$CboDelay = GUICtrlCreateCombo("50", 144, 265, 49, 25)
GUICtrlSetOnEvent(-1, "CboDelayChange")
$Label4 = GUICtrlCreateLabel("延迟", 112, 269, 28, 17)
$Label5 = GUICtrlCreateLabel("ms", 196, 267, 17, 17)
$chkCHSmode = GUICtrlCreateCheckbox("中文模式", 12, 242, 85, 17)
GUICtrlSetOnEvent(-1, "chkCHSmodeClick")
$ChkRecycle = GUICtrlCreateCheckbox("循环", 115, 242, 45, 17)
GUICtrlSetOnEvent(-1, "CboRecycleClick")
$cboRecycle = GUICtrlCreateCombo("50", 164, 241, 49, 25)
GUICtrlSetOnEvent(-1, "CboDelayChange")
$Label6 = GUICtrlCreateLabel("F9影藏,F10输入", 12, 268, 85, 13)
GUISetState(@SW_SHOW)
#EndRegion ### START Koda GUI section ### Form=e:\coolvirus\myworks\programdesign\autoitproject\form1.kxf
AutoItSetOption("TrayAutoPause", 0)
AutoItSetOption("SendKeyDelay", 50)
HotKeySet("{F10}", "DealText")
HotKeySet("{F9}", "HideAndShow")
$FormShow = True
$Delay = 0
$CHSmode = False
$Recycle = False
$Sending = False
$txt = ""
GUICtrlSetData($CboDelay, "100|200|500|1000|5000")
GUICtrlSetData($cboRecycle, "1|2|5|10|20|50|100|500|1000|Infinite")
While 1
Sleep(100)
WEnd
Func btnHideClick()
HideAndShow()
EndFunc ;==>btnHideClick
Func BtnCloseClick();close button
HotKeySet("{F9}");注销热键
HotKeySet("{F10}")
Exit
EndFunc ;==>BtnCloseClick
Func CboDelayChange()
$Delay = GUICtrlRead($CboDelay)
AutoItSetOption("SendKeyDelay", $Delay)
EndFunc ;==>CboDelayChange
Func Check1Click()
EndFunc ;==>Check1Click
Func Check2Click()
EndFunc ;==>Check2Click
Func Check3Click()
EndFunc ;==>Check3Click
Func chkCHSmodeClick()
$CHSmode = Not $CHSmode
EndFunc ;==>chkCHSmodeClick
Func frmMainClose()
Exit
EndFunc ;==>frmMainClose
Func frmMainMinimize()
GUISetState(@SW_HIDE)
EndFunc ;==>frmMainMinimize
Func frmMainRestore()
EndFunc ;==>frmMainRestore
Func CboRecycleClick()
$Recycle = Not $Recycle
EndFunc ;==>CboRecycleClick
Func HideAndShow()
;GUICtrlSetState($Form1,$GUI_HIDE)
;MsgBox(1,"1","sdfj")
$FormShow = Not $FormShow
If $FormShow Then
GUISetState(@SW_SHOW)
Else
GUISetState(@SW_HIDE)
EndIf
EndFunc ;==>HideAndShow
Func DealText()
If $Sending Then
$Sending = False
Else
$Sending = True
;-----replace text
RplText()
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
;-----------------------Set Sendkey delay time
$Delay = Int(GUICtrlRead($CboDelay))
If $Delay <= 0 Then $Delay = 1
AutoItSetOption("SendKeyDelay", $Delay)
;--------send text
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
$RecycleTimes = 1
$i = 0
If $Recycle Then
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
If GUICtrlRead($cboRecycle) = "Infinite" Then
;$Sending=True
While $Sending
For $i = 1 To 100
SendText()
Sleep(50)
Next
Sleep(1000)
WEnd
Else
$RecycleTimes = Int(GUICtrlRead($cboRecycle))
For $i = 1 To $RecycleTimes
SendText()
Sleep(50)
Next
EndIf
Else
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
SendText()
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
EndIf
$Sending = False
EndIf
EndFunc ;==>DealText
Func RplText()
;-----replace text
$txt = GUICtrlRead($Edit1)
If GUICtrlRead($Check1) = $GUI_CHECKED Then
If GUICtrlRead($Input1) <> "" Or GUICtrlRead($Input2) <> "" Then
$txt = StringReplace(GUICtrlRead($Edit1), GUICtrlRead($Input1), GUICtrlRead($Input2))
EndIf
;MsgBox(1,"1",GUICtrlRead($Input1))
EndIf
If GUICtrlRead($Check2) = $GUI_CHECKED Then
If GUICtrlRead($Input1) <> "" Or GUICtrlRead($Input2) <> "" Then
$txt = StringReplace(GUICtrlRead($Edit1), GUICtrlRead($Input3), GUICtrlRead($Input4))
EndIf
EndIf
If GUICtrlRead($Check3) = $GUI_CHECKED Then
If GUICtrlRead($Input1) <> "" Or GUICtrlRead($Input2) <> "" Then
$txt = StringReplace(GUICtrlRead($Edit1), GUICtrlRead($Input5), GUICtrlRead($Input6))
EndIf
EndIf
EndFunc ;==>RplText
Func SendText()
If $Sending Then
If Not $CHSmode Then
Send($txt)
Else
SendX($txt, 1)
EndIf
; ConsoleWrite( @ScriptLineNumber & @crlf) ;### Debug Console
EndIf
EndFunc ;==>SendText
[/au3] |
|