Just compile this code and add it as a IDE tool with your specified shortcut (for example Ctrl+Shift+A)
Code:
Procedure GetProcessFromWindow(WindowID.i)
Protected ProcessID.i
If GetWindowThreadProcessId_(WindowID, @ProcessID)
ProcedureReturn OpenProcess_(#PROCESS_ALL_ACCESS, #False, ProcessID)
EndIf
EndProcedure
Procedure SendText(Text.s)
Protected ScintillaID.i = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
Protected ProcessID.i = GetProcessFromWindow(ScintillaID)
Protected Length.i
Protected *MemoryID, *Buffer, Format.i
If ProcessID
Select SendMessage_(ScintillaID, #SCI_GETCODEPAGE, #Null, #Null)
Case 0 : Format = #PB_Ascii
Case 65001 : Format = #PB_UTF8
EndSelect
Length.i = StringByteLength(Text, Format)
*Buffer = AllocateMemory(Length+SizeOf(Character))
If *Buffer
PokeS(*Buffer, Text, #PB_Default, Format)
*MemoryID = VirtualAllocEx_(ProcessID, #Null, Length, #MEM_RESERVE|#MEM_COMMIT, #PAGE_EXECUTE_READWRITE)
If *MemoryID
WriteProcessMemory_(ProcessID, *MemoryID, *Buffer, Length, #Null)
SendMessage_(ScintillaID, #SCI_ADDTEXT, Length, *MemoryID)
VirtualFreeEx_(ProcessID, *MemoryID, Length, #MEM_RELEASE)
EndIf
FreeMemory(*Buffer)
EndIf
CloseHandle_(ProcessID)
EndIf
EndProcedure
SendText("#PB_Any")