找回密码
 加入
搜索
查看: 3819|回复: 5

Include “ACN_String.au3” 并编译时提示@Unicode 未定义

[复制链接]
发表于 2008-5-16 19:29:17 | 显示全部楼层 |阅读模式
我在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]
 楼主| 发表于 2008-5-16 19:31:11 | 显示全部楼层
奇怪怎么有些回车不见了...
Waiting...
发表于 2009-3-4 19:20:15 | 显示全部楼层
我也遇到了,顶上去
发表于 2009-3-4 20:28:28 | 显示全部楼层
等待老大解释
发表于 2009-3-4 20:53:40 | 显示全部楼层
@Unicode
新版删除了这个宏。这个东西好像记得试过有的版本有的,后来删了,再后来有个版本又放上去的。反正现在我的3.3.0.0版本没有这个宏了。
发表于 2009-3-5 09:23:59 | 显示全部楼层
@Unicode 注释掉应该可以吧
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-24 00:13 , Processed in 0.088235 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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