Code: Select all
; non-working Code snippet...
Protected.i hSci = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
Protected.s exe$ = GetEnvironmentVariable("PB_TOOL_IDE")
Case "FINDDEF" ; Shorcut = [Ctrl+2], Jump to best guess at keyword(kw) definition/instantiation:
; #kw, Global kw, Structure kw, Procedure kw, Protected kw, Dim kw, NewList|NewMap kw, Define kw, kw.datatype
Protected fw.SCI_WORDINFO
ct_sci_FindDef(hSci,fw) ;<-- OK when searching within current TAB.
RunProgram(exe$, "c:\myfiles\somefile.pbi /L 1", "c:\myfiles") ;<-- Now force IDE to jump to another TAB.
Delay(10) ;<-- OK, IDE cursor is on 1st line of new TAB.
fw\use = 1 ;<-- Fill my 'find word' structure
fw\s$ = "some$" ;<-- to use in the next cmd.
ct_sci_Hilite(hSci, fw) ;<-- FAIL here. It hilites the word in the previously opened TAB.
;**<< How can I get the IDE to give me an updated handle to the new scintilla TAB? **>>
One way I can think of is to exit this Tool but store some data to a temp file.
Then somehow trigger another call to this Tool which will now read the temp file data to continue.
But how do I trigger a Tool to exit and run another Tool?