argumentum Posted October 9, 2023 Posted October 9, 2023 I guess @Jos should know. But anyone knowing is welcomed to answer. using _SendSciTE_Command($SciTE_My_Hwnd, $SciTE_hwnd, "extender:dostring print(' "c:\here\there" ') don't work well. Bunch of error. Can you tell me how to go about sending a string to $SciTE_hwnd = WinGetHandle("DirectorExtension") TIA ...since I'm here, I read somewhere that Mailslots are gonna be removed from Win11 at some point. Claiming that is unsafe. ( as if the rest of UDP was any "safer" ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted October 9, 2023 Developers Posted October 9, 2023 Where should the text go? At the current cursor pos to be insterted? 1 hour ago, argumentum said: since I'm here, I read somewhere that Mailslots are gonna be removed from Win11 at some point. That's a bummer as it is used by Autoit3wrapper currently to talk between processes. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
argumentum Posted October 9, 2023 Author Posted October 9, 2023 1 hour ago, Jos said: Where should the text go? I want it to go to the bottom most as a log while running the script(s) outside SciTE. That part I've got from the Autoit3wrapper. The part that don't work, so to say, is certain characters that may need escaping but even the escaping I can't find. I as thinking that maybe there's a way to send binary instead of text ( in the sense that don't need escaping and will show verbatim. I'm sending text either way ) 1 hour ago, Jos said: That's a bummer as it is used by Autoit3wrapper currently to talk between processes. ...I know. That's why I added that part. I use it for everything but I'll have to .... no clue. There's no good reason for them to remove it. Just claim in best practices to no use it but c'mon, just leave it there !. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Solution Jos Posted October 9, 2023 Developers Solution Posted October 9, 2023 (edited) Something like this: #include <WindowsConstants.au3> Global $SciTE_hwnd = WinGetHandle("DirectorExtension") ; Func _SendSciTE_Command($My_Hwnd, $SciTE_hwnd, $sCmd) Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']') DllStructSetData($CmdStruct, 1, $sCmd) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr') DllStructSetData($COPYDATA, 1, 1) DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1) DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct)) DllCall('User32.dll', 'None', 'SendMessageA', 'HWnd', $SciTE_hwnd, _ 'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) ;ConsoleWrite('-->' & $sCmd & @CRLF) EndFunc ;==>_SendSciTE_Command ; Append to Editor _SendSciTE_Command(0, $SciTE_hwnd, "extender:dostring editor:AppendText(';""c:\here\there""')") ; Append to Outputpane _SendSciTE_Command(0, $SciTE_hwnd, "extender:dostring output:AppendText('""c:\here\there""\\n')") Edited October 9, 2023 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
argumentum Posted October 10, 2023 Author Posted October 10, 2023 (edited) yes, but I get: ; Append to Editor = ;"c:here here" ; Append to Outputpane = "c:here here" and the "\" is nowhere to be found Any way that I'm doing/have something wrong on my side ? Edit: I have to escape more than I thought: ( the \\n gave me the idea ) ; Append to Outputpane = ;"c:\here\there" _SendSciTE_Command(0, $SciTE_hwnd, "extender:dostring editor:AppendText(';""c:\\\\here\\\\there""')") ; Append to Outputpane = "c:\here\there" _SendSciTE_Command(0, $SciTE_hwnd, "extender:dostring output:AppendText('""c:\\\\here\\\\there""\\n')") Thanks Edited October 10, 2023 by argumentum got it =) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now