There is one more small bug. I have not position properties in my scite session file, so the gui shown only with the title visible . You should add “default” for GetProperty function: Func _GetProperty(ByRef $Var, $Config, $Property, $Which = 0, $Rev = 0, $Default = '')
If $Default = '' Then $Default = $Var
Local $Test = StringRegExp($Config, 'Q' & $Property & 'E=([^v]+)', 1)
If @error Then
$Var = $Default
Return SetError(1)
EndIf
Switch StringLower($Which)
Case "fore", "back" ; Foreground, Background color
$Test = StringRegExp($Test[0], '(?i)'&$Which&':#([[:xdigit:]]+)', 1)
Case "#" ; just the color
$Test = StringRegExp($Test[0], '#([[:xdigit:]]+)', 1)
EndSwitch
If @error Then
$Var = $Default
Return SetError(2)
EndIf
If $Rev Then $Test[0] = _Rev($Test[0])
$Var = $Test[0]
Return
EndFunc and then get the position vars like this: If FileExists($SciTE_Session) Then
$Properties = FileRead($SciTE_Session)
$SciteConfig = $Properties & @CRLF
_GetProperty($UI_LEFT, $SciteConfig, "position.left", 0, 0, -1)
_GetProperty($UI_RIGHT, $SciteConfig, "position.top", 0, 0, -1)
_GetProperty($UI_WIDTH, $SciteConfig, "position.width", 0, 0, 700)
_GetProperty($UI_HEIGHT, $SciteConfig, "position.height", 0, 0, 350)
_GetProperty($Maximize, $SciteConfig, "position.maximize", 0, 0, 0)
Else
$UI_LEFT = -1
$UI_RIGHT = -1
$UI_WIDTH = 700
$UI_HEIGHT = 350
$Maximize = 0
EndIf BTW, as you can see, i changed a little bit the hight to height, it's just spelling mistake .