在编写Robot GUI脚本时,发现SQABasic里不支持AddressOf运算符
不知道大侠们知不知道这个问题如何解决呢?看来大家没有用到这个东东
龙哥,今天MSN没法登录,在这里给你问个好 :)其实不止AddressOf用不了
VB里的常量也用不了,如 vbNullString大家给个解决的办法吧 对于addressof我还没有找到好的方法解决
对于常量的使用,你把下边的封装成sbh直接使用就可以了
Global Const vbBack As String = "\b"
Global Const vbCr As String = "\r"
Global Const vbCrLf As String = "\n\r"
Global Const vbFormFeed As String = "\f"
Global Const vbLf As String = "\n"
Global Const vbNewLine As String = "\n"
Global Const vbNullChar As String = "\0"
Global Const vbNullString As String = ""
Global Const vbTab As String = "\t"
Global Const vbVerticalTabAs String = "\v"
Global Const vbObjectError = -2147221504
Global Const vbAlias = 64
Global Const vbArchive = 32
Global Const vbDirectory = 16
Global Const vbHidden = 2
Global Const vbNormal = 0
Global Const vbReadOnly = 1
Global Const vbSystem = 4
Global Const vbVolume = 8
Global Const vbBinaryCompare = 0
Global Const vbDatabaseCompare= 2
Global Const vbTextCompare = 1
Global Const vbHide = 0
Global Const vbMaximizedFocus = 3
Global Const vbMinimizedFocus = 2
Global Const vbMinimizedNoFocus = 6
Global Const vbNormalFocus = 1
Global Const vbNormalNoFocus = 4
Global Const vbAbort = 3
Global Const vbCancel = 2
Global Const vbIgnore = 5
Global Const vbNo = 7
Global Const vbOK = 1
Global Const vbRetry = 4
Global Const vbYes = 6
Global Const vbAbortRetryIgnore = 2
Global Const vbApplicationModal = 0
Global Const vbCritical = 16
Global Const vbDefaultButton1 = 0
Global Const vbDefaultButton2 = 256
Global Const vbDefaultButton3 = 512
Global Const vbDefaultButton4 = 768
Global Const vbDot = 46
Global Const vbExclamation = 48
Global Const vbInformation = 64
Global Const vbMsgBoxHelpButton = 16384
Global Const vbMsgBoxRight = 524288
Global Const vbMsgBoxRtlReading = 1048576
Global Const vbMsgBoxSetForeground= 65536
Global Const vbOKCancel = 1
Global Const vbOKOnly = 0
Global Const vbQuestion = 32
Global Const vbRetryCancel = 5
Global Const vbSystemModal = 4096
Global Const vbYesNo = 4
Global Const vbYesNoCancel = 3
Global Const ForAppending = 8
Global Const ForReading = 1
Global Const ForWriting = 2
Global Const vbFalse = 0
Global Const vbTrue = -1
Global Const vbUseDefault = -2
Global Const vbArray = 8192
Global Const vbBoolean = 11
Global Const vbByte = 17
Global Const vbCurrency = 6
Global Const vbDataObject = 13
Global Const vbDate = 7
Global Const vbDecimal = 14
Global Const vbDouble = 5
Global Const vbEmpty = 0
Global Const vbError = 10
Global Const vbInteger = 2
Global Const vbLong = 3
Global Const vbNull = 1
Global Const vbObject = 9
Global Const vbSingle = 4
Global Const vbString = 8
Global Const vbUserDefinedType = 36
Global Const vbVariant = 12
Global Const vbMenuBar = &H80000004& 'Menu Bar
Global Const vbMenuText = &H80000007& 'Menu Text
Global Const vbScrollBars = &H80000000& 'Scroll Bars
Global Const vbWindowBackground = &H80000005& 'Window Background
Global Const vbWindowFrame = &H80000006& 'Window Frame
Global Const vbWindowText = &H80000008& 'Window Text
Global Const vbActiveBorder = &H8000000A& 'Active Border
Global Const vbActiveTitleBar = &H80000002& 'Active Title Bar
Global Const vbTitleBarText = &H80000009& 'Active Title Bar Text
Global Const vbApplicationWorkspace = &H8000000C& 'Application Workspace
Global Const vbButtonFace = &H8000000F& 'Button Face
Global Const vb3DHighlight = &H80000014& 'Button Highlight
Global Const vb3DDKShadow = &H80000010& 'Button Shadow
Global Const vbButtonText = &H80000012& 'Button Text
Global Const vbDesktop = &H80000001& 'Desktop
Global Const vbGrayText = &H80000011& 'Disabled Text
Global Const vbHighlight = &H8000000D& 'Highlight
Global Const vbHighlightText = &H8000000E& 'Highlighted Text
Global Const vbInactiveBorder = &H8000000B& 'Inactive Border
Global Const vbInactiveTitleBar = &H80000003& 'Inactive Title Bar
Global Const vbInactiveCaptionText= &H80000013& 'Inactive Title Bar Text
龙哥,vbNullString你从哪儿得到的?
龙哥,vbNullString你从哪儿得到的?我觉得肯定不是 "" ,因为 "" 是empty string(占有6个字节的空字符串)
而 vbNullString 应该是 null String(等同于C里面的NULL,也就是0)
两者有区别的,并且我在使用时的确发现它们的区别了
所以说 在使用时不知道用什么来代替 vbNullString,用 "" 没有语法的错误,但得不到需要的结果,用 0 语法上就通不过 告诉你以上const得到的方法:
跟踪调试
Dim i As Integer
i = vbArray
i = 8192
对于vuNullString我明白你的意思
不过这里我们是利用它传递参数,就没有必要研究它的真实含义! 不会所有的都是你通过 “跟踪调试” 得到的吧??
其实MSDN上都有,我只是关心你是如何得到 vbNullString 的。
MSDN上的解释是:
vbNullString 值为 0 的字符串 与零长度字符串 ("") 不同;用于调用外部过程
呵呵,我也不想研究它的真正含义,但我要用一个准确的值来定义这个常量呀:s 上边的常量我是在网上找到的!
对于提到的跟踪调试的方法,只是想告诉大家这些值如何得到,如果碰到上面没有的一些常量,可以如何得到。
对于VBNULLSTRING,还需要在探讨!
公司把MSN封了
公司把MSN封了郁闷~~
MSN:
用通通通,应该还是可以上的。呵呵。
页:
[1]