| SciTE Helper - ActiveX Control for SciTE

### Description

Freeware ActiveX component for the interaction between SciTE text editor and any scripts and applications supporting COM interface.

### Install, Initialisation and Remove

For registration SciTE Helper on your system please run `Setup.vbs` (it will execute the OS command regsvr32 SciTE.dll)

For job with SciTE Helper it is necessary to make initialization of object in your script:

On Error Resume Next
Set SciTE = CreateObject("SciTE.Helper")
If Err.Number <> 0 Then
WScript.Echo "Please install SciTE Helper before!"
WScript.Quit 1
End If
On Error GoTo 0

For unregistration SciTE Helper on your system please run `Setup.vbs` once again (it will execute the OS command regsvr32 /U SciTE.dll)

In SciTE-Ru registration and unregistration SciTE Helper occurs automatically at a choice of item of the menu 'Tools' - 'Windows Integration'

### Properties

Left() As Long [read only] Top() As Long [read only] Width() As Long [read only] Height() As Long [read only] | Returns sizes and position of a SciTE window. These properties are equivalent to SciTE properties position.left, position.top, position.width, position.height Example: WScript.Echo "position.left = " & SciTE.Left WScript.Echo "position.top = " & SciTE.Top WScript.Echo "position.width = " & SciTE.Width WScript.Echo "position.height = " & SciTE.Height
Get GetText() As String [read only] | Get all text with active buffer SciTE. This property works similarly to method of lua editor:GetText() Example: WScript.Echo SciTE.GetText
GetSelText() As String [read only] | Get only selected text with active buffer SciTE. This property works similarly to SciTE variable $(CurrentSelection) Example: WScript.Echo SciTE.GetSelText
Props(ByVal Key As String) As String [read] Props(ByVal Key As String, RHS As String) [write] | Get and set the value of a any SciTE property. This property works similarly to directive of lua props["property.name"] Example: SciTE.Props("my.key") = WScript.Name WScript.Echo SciTE.Props("my.key")
WindowID() As Long [read] WindowID(RHS As Long) [write] | Returns WindowID SciTE from which the given script or the program has been started. Allows to establish (at presence of several SciTE Windows) one with which will be an exchange through `SciTE Director Interface`. Example: SciTEWindowID = SciTE.WindowID WScript.Echo SciTEWindowID

### Methods

Send(ByVal Data As String) As String | Carries out sending in SciTE with the argument set sequence of commands `SciTE Director Interface`. Return in causing script or the program the received value. The list of all accessible commands see in a file SciTEDirector.html Example: WScript.Echo SciTE.Send("askproperty:character.set")
LUA(ByVal Command As String) As String | Allows to execute in SciTE with the argument lua commands. Return in causing script or the program the received value. Example: WScript.Echo SciTE.LUA("editor.CurrentPos")
ReplaceSel (ByVal ReplaceText As String) | Replace selected text with argument text. This works similarly to method of lua editor:ReplaceSel(string). Returned value is absent. Example: SciTE.ReplaceSel "<http://scite.net.ru/>"
MenuCommand (ByVal IDM_Command As String) | Run specifed SciTE menu command. Returned value is absent. The list of all accessible commands see in a file CommandValues.html Example: SciTE.MenuCommand 902
Trace (ByVal Data As String) | Writes s to the SciTE output pane (no prefix, no newlines). This works similarly to directive trace(string). Returned value is absent. Example: SciTE.Trace "First line" & "\r\n" & "Second line" & "\r\n"
OnTop (ByVal WindowName As String, ByVal OnTop As Boolean) | Establishes for a window of the application a mode "OnTop of all windows". Returned value is absent. Example: SciTE.OnTop document.title, True
Focus () | Set focus of input in SciTE window. Returned value is absent. (It is useful, when the script or the program abducts focus from SciTE) Example: SciTE.Focus
About () | Shows the message "About". Returned value is absent. Example: SciTE.About

### Download

Current version SciTE Helper: 1.4

SciTE.dll (include documentations and sample scripts)
Source code

### Remarks

`SciTE Helper` is written on Visual Basic 5.0 and require run-time library `msvbvm50.dll`, which is present in all Windows versions, up to Windows XP SP1 inclusive. In later versions `msvbvm50.dll` library is absent therefore it is necessary to download independently.
One of salvations of this problem is on Issue 62

`SciTE Helper` now does not catch SciTE events. Realization of such opportunity is planned.

Design this page is borrowed from the Scintilla project. Thanks.