测试帖子
dddddddd
sss 测试高亮代码测试问号问题 高亮与问号
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $hBrush1, $hBrush2
; 创建 GUI
GUICreate("GDI+ UDF 示例", 400, 300)
$g_idMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; 创建画刷
_GDIPlus_Startup()
$hBrush1 = _GDIPlus_BrushCreateSolid()
$hBrush2 = _GDIPlus_BrushClone($hBrush1)
; 显示画刷信息
MemoWrite("画刷 1 句柄 : 0x" & Hex($hBrush1))
MemoWrite("画刷 1 类型 ..: " & _GDIPlus_BrushGetType($hBrush1))
MemoWrite("画刷 2 句柄 : 0x" & Hex($hBrush2))
MemoWrite("画刷 2 类型 ..: " & _GDIPlus_BrushGetType($hBrush2))
; 清理资源
_GDIPlus_BrushDispose($hBrush2)
_GDIPlus_BrushDispose($hBrush1)
_GDIPlus_Shutdown()
; 循环到用户退出.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
; 写脚本运行消息到备忘录
Func MemoWrite($sMessage = '')
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite
复制的代码有问号。。。。 #include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $hBrush1, $hBrush2
; 创建 GUI
GUICreate("GDI+ UDF 示例", 400, 300)
$g_idMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; 创建画刷
_GDIPlus_Startup()
$hBrush1 = _GDIPlus_BrushCreateSolid()
$hBrush2 = _GDIPlus_BrushClone($hBrush1)
; 显示画刷信息
MemoWrite("画刷 1 句柄 : 0x" & Hex($hBrush1))
MemoWrite("画刷 1 类型 ..: " & _GDIPlus_BrushGetType($hBrush1))
MemoWrite("画刷 2 句柄 : 0x" & Hex($hBrush2))
MemoWrite("画刷 2 类型 ..: " & _GDIPlus_BrushGetType($hBrush2))
; 清理资源
_GDIPlus_BrushDispose($hBrush2)
_GDIPlus_BrushDispose($hBrush1)
_GDIPlus_Shutdown()
; 循环到用户退出.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
; 写脚本运行消息到备忘录
Func MemoWrite($sMessage = '')
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite
#include <GDIPlus.au3>#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $hBrush1, $hBrush2
; 创建 GUI
GUICreate("GDI+ UDF 示例", 400, 300)
$g_idMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; 创建画刷
_GDIPlus_Startup()
$hBrush1 = _GDIPlus_BrushCreateSolid()
$hBrush2 = _GDIPlus_BrushClone($hBrush1)
; 显示画刷信息
MemoWrite("画刷 1 句柄 : 0x" & Hex($hBrush1))
MemoWrite("画刷 1 类型 ..: " & _GDIPlus_BrushGetType($hBrush1))
MemoWrite("画刷 2 句柄 : 0x" & Hex($hBrush2))
MemoWrite("画刷 2 类型 ..: " & _GDIPlus_BrushGetType($hBrush2))
; 清理资源
_GDIPlus_BrushDispose($hBrush2)
_GDIPlus_BrushDispose($hBrush1)
_GDIPlus_Shutdown()
; 循环到用户退出.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
; 写脚本运行消息到备忘录
Func MemoWrite($sMessage = '')
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite
msgbox
本帖最后由 yuantian 于 2018-8-19 22:24 编辑
Func IEEvent_NewWindow($ppDisp, $Cancel)
Local $o_Shell = ObjCreate("Shell.Application")
Local $o_ShellWindows = $o_Shell.Windows(); collection of all ShellWindows (IE and File Explorer)
For $i = $o_ShellWindows.Count - 1 To 0 Step -1
If $o_ShellWindows.item($i).LocationURL == $ppDisp Then
$o_ShellWindows.item($i).quit()
EndIf
Next
$oIE.Navigate($ppDisp)
EndFunc ;==>IEEvent_NewWindow
彩色的是什么格式 看看颜色 本帖最后由 志艺风云 于 2018-8-20 12:03 编辑
Func __MyErrFunc($oError)
Local $ErrArray = [$oError.number, $oError.source, $oError.description, StringStripWS($oError.windescription, 3), $oError.scriptline]
GUICtrlSetData($Input3, "错误:0x" & Hex($ErrArray, 8) & "," & $ErrArray)
ConsoleWrite("行号(" & $ErrArray & ") : **********截获了对象运行错误!**********" & @CRLF & _
"返回代码:" & $ErrArray & @TAB & _
"错误代码:0x" & Hex($ErrArray, 8) & @TAB & _
"错误来源:" & $ErrArray & @CRLF & _
"对象错误描述:" & $ErrArray & @TAB & _
"系统错误描述:" & StringStripWS($ErrArray, 3) & @CRLF)
;$i__ObjectError = $ErrArray ;对象发现错误时设置全局的对象错误变量
EndFunc ;==>__MyErrFunc
Func __MyErrFunc($oError)
Local $ErrArray = [$oError.number, $oError.source, $oError.description, StringStripWS($oError.windescription, 3), $oError.scriptline]
GUICtrlSetData($Input3, "错误:0x" & Hex($ErrArray, 8) & "," & $ErrArray)
ConsoleWrite("行号(" & $ErrArray & ") : **********截获了对象运行错误!**********" & @CRLF & _
"返回代码:" & $ErrArray & @TAB & _
"错误代码:0x" & Hex($ErrArray, 8) & @TAB & _
"错误来源:" & $ErrArray & @CRLF & _
"对象错误描述:" & $ErrArray & @TAB & _
"系统错误描述:" & StringStripWS($ErrArray, 3) & @CRLF)
;$i__ObjectError = $ErrArray ;对象发现错误时设置全局的对象错误变量
EndFunc ;==>__MyErrFunc
还是有差距
测试代码显示 msgbox(4096,"测试","又是5分")
嘻嘻{:face (197):} msgbox(0,0,0)
stringinstr('$233','$')