Hello Fred,
I have a little wish for any future IDEs...
Please, let send "PB_TOOL_Scintilla" enviromentvariable permanent after changing editortabs.
This would support more PlugIn-Ideas.
Thank you.
Best regards
Hroudtwolf
IDE-PlugIns. Better support.
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I don't know about PB_TOOL_Scintilla ...
Are you looking for the active scintilla handle ?
This should work :
Are you looking for the active scintilla handle ?
This should work :
Code: Select all
Global PBIDEHandle.l, PBIDEScintillaHandle.l
;
Procedure FindPBIDEScintillaEnumWindowsCallBack(hwnd.l, lParam.l)
ReturnValue.l = #TRUE
If IsWindow_(hwnd)
WindowText.s = Space(250)
LenWindowText.l = 250
GetClassName_(hwnd, @WindowText, LenWindowText)
If WindowText = "Scintilla" And IsWindowVisible_(hwnd)
PBIDEScintillaHandle = hwnd
ReturnValue = #FALSE
EndIf
EndIf
ProcedureReturn ReturnValue
EndProcedure
;
Procedure FindPBIDEEnumWindowsCallBack(hwnd.l, lParam.l)
ReturnValue.l = #TRUE
If IsWindow_(hwnd)
WindowText.s = Space(250)
LenWindowText.l = 250
GetWindowText_(hwnd, @WindowText, LenWindowText)
If FindString(WindowText, "PureBasic", 1) And FindString(WindowText, "Debugger", 1) = #FALSE
PBIDEScintillaHandle = 0
EnumChildWindows_(hwnd, @FindPBIDEScintillaEnumWindowsCallBack(), 0)
If PBIDEScintillaHandle
ReturnValue = #FALSE
PBIDEHandle = hwnd
EndIf
EndIf
EndIf
ProcedureReturn ReturnValue
EndProcedure
;
Procedure.l GetPBIDEHandle()
PBIDEHandle = 0
EnumWindows_(@FindPBIDEEnumWindowsCallBack(), 0)
ProcedureReturn PBIDEHandle
EndProcedure
;
Procedure.l GetPBIDEScintillaHandle()
PBIDEScintillaHandle = 0
If GetPBIDEHandle()
EnumChildWindows_(PBIDEHandle, @FindPBIDEScintillaEnumWindowsCallBack(), 0)
EndIf
ProcedureReturn PBIDEScintillaHandle
EndProcedure
; get active scintilla editor handle
debug GetPBIDEScintillaHandle()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact: