[IDE] - Add Tool variable = PB_TOOL_IDETAB

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: [IDE] - Add Tool variable = PB_TOOL_IDETAB

Post by skywalk »

Ok, I found some free time to try some more stuff...

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?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply