Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; http://www.autoitscript.com/forum/topic/154967-simple-example-of-output-to-scite-from-tool/?hl=%2Bscite#entry1135448
- #include <Constants.au3>
- #include <GUIConstantsEx.au3>
- #include <WinAPI.au3>
- #include <WindowsConstants.au3>
- $sString = "teeeessssstttt"
- _SciTE_InsertText($sString)
- Func _SciTE_InsertText($sString)
- Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), "insert:" & $sString)
- EndFunc ;==>_SciTE_InsertText
- Func _SciTE_Send_Command($hHandle, $hSciTE, $sString)
- Local $ilParam, $tData
- If StringStripWS($sString, 8) = "" Then
- Return SetError(2, 0, 0) ; String is blank.
- EndIf
- $sString = ":" & Dec(StringTrimLeft($hHandle, 2)) & ":" & $sString
- ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString = ' & $sString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
- $tData = DllStructCreate("char[" & StringLen($sString) + 1 & "]") ; wchar
- DllStructSetData($tData, 1, $sString)
- $ilParam = DllStructCreate("ptr;dword;ptr") ; ulong_ptr;dword;ptr
- DllStructSetData($ilParam, 1, 1) ; $ilParam, 1, 1
- DllStructSetData($ilParam, 2, DllStructGetSize($tData))
- DllStructSetData($ilParam, 3, DllStructGetPtr($tData))
- _SendMessage($hSciTE, $WM_COPYDATA, $hHandle, DllStructGetPtr($ilParam))
- Return Number(Not @error)
- EndFunc ;==>_SciTE_Send_Command
Advertisement
Add Comment
Please, Sign In to add comment