Jump to content



Photo

SciTE Clone - AutoIt SciTE impostor


  • Please log in to reply
10 replies to this topic

#1 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 01 July 2012 - 05:43 PM

AutoIt and Scintilla based Text Editor a.k.a ASciTE
Based off of ReaperXs, Loksters and ISI360s text editors! Click their names to see their projects!


Posted Image Posted Image

Posted Image Posted Image

Tested only on Win XP 32bit.
This will not work on 64bit systems!

ASciTE script source => Attached File  ASciTE.rar   49.69K   70 downloads
Previous Downloads: 44


ASciTE Script Source => Attached File  ASciTE.rar   52.16K   228 downloads
Previous Downloads: 10

ChangeLog
Spoiler

Details
Spoiler

Other Files
Here are some extractions from the script of thing that took conciderable time, I've taken out what I would assume some people would probably want, such as the arrow for the tab switching (Which stopped working in the latest version) and the IPC (inter process communication) through windows messages that was created for this script from code by wolf9228 in this example.

Tab re-ordering indicator (little red arrow) => Attached File  Tab Reposition.au3   17.12K   110 downloads
IPC Script Communication => Attached File  Simple IPC.au3   7.72K   115 downloads


Feature details
Spoiler

*Portable mode is activated when the "AutoIt3" directory is found in the same directory as the script, but if an installed version is detected, it will default to using that one.

** There is a bug present that I could not figure out where double clicking on the title bar to maximize the window will cause the script to forget its initial size causing the script to stay full screen when re-sized in this manner :(


Other information
Spoiler

Edited by ApudAngelorum, 14 July 2012 - 09:00 PM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.





#2 ldub

ldub

    Wayfarer

  • Active Members
  • Pip
  • 57 posts

Posted 01 July 2012 - 08:13 PM

I am amazed ! It is so fast.
Sometimes, I confuse the clone from the original.
Some details : I have not been able to launch Tidy (error arguments) and I have been obliged to change the color of the backgoung (to white).
Thanks for sharing.

#3 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 01 July 2012 - 08:38 PM

I am amazed ! It is so fast.
Sometimes, I confuse the clone from the original.
Some details : I have not been able to launch Tidy (error arguments) and I have been obliged to change the color of the backgoung (to white).
Thanks for sharing.


Thnaks for the tip, I remember reading through the autoit3wrapper and noticing it had options to run tidy, I changed the way it is run now and it should work :)

#4 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 997 posts

Posted 02 July 2012 - 02:38 PM

The problem with reading SciTEUser.properties.

#5 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 02 July 2012 - 04:55 PM

The problem with reading SciTEUser.properties.


Thanks, I was looking for something like that earlier, it looks better than what I am currently doing for retrieving the color properties.
I will attempt to implement it in the project soon.

I've also uploaded an updated version which supports errlist error highlighting, the debug scintilla console now looks and acts more like SciTEs scintilla debug console, aside from the fact that you cannot run dos commands from it.

I've also added language options for AutoIt and text atm, I am planing on adding html next. HTML added.

Edited by ApudAngelorum, 02 July 2012 - 09:23 PM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#6 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 02 July 2012 - 08:56 PM

Very good project.

There is bug with search feature.
When searching up, the search begins from the last found string, not from the current position.
Can be fixed by replacing:
$startPosition = SendMessage($Tabs[$ActiveTab][1], $SCI_GETTARGETSTART, 0, 0)

with:
$startPosition -= $lenFind

  • CaptainClucks likes this
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#7 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 02 July 2012 - 09:13 PM

Very good project.

There is bug with search feature.
When searching up, the search begins from the last found string, not from the current position.
Can be fixed by replacing:

$startPosition = SendMessage($Tabs[$ActiveTab][1], $SCI_GETTARGETSTART, 0, 0)
with:
$startPosition -= $lenFind

Appreciate it, added the change you specified and also added support for highlighting HTML and typical properties files suchs as those used by SciTE and conf or ini files.
Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#8 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 997 posts

Posted 02 July 2012 - 10:48 PM

work is partially
$Var = '' $Config = FileRead(@UserProfileDir & "SciTEUser.properties") _GetProperty($Var, $Config, "style.au3.0", "fore") MsgBox(0, 'Сообщение', $Var) Func _GetProperty(ByRef $Var, $Config, $Property, $Which = 0, $Rev = 0)     Local $Test = StringRegExp($Config, 'Q' & $Property & 'E=([^v]+)', 1)     If @error Then Return     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 Return     If $Rev Then $Test[0] = _Rev($Test[0])     $Var = $Test[0]     Return EndFunc   ;==>_GetProperty
Global settings are not perceived

Themes for SciTE

# All files style.*.32=fore:#999999,back:#3F3F3F,$(font.base) style.*.33=fore:#8A8A8A,back:#0C0C0C,$(font.base) style.*.34=fore:#0080FF,back:#000000 style.*.35=fore:#71AE71,italics,back:#3F3F3F #style.*.36=fore:#ff0000,back:#0000ff - ??? style.*.37=fore:#8A8A8A,back:#0C0C0C

Edited by AZJIO, 02 July 2012 - 11:09 PM.

  • CaptainClucks likes this

#9 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 02 July 2012 - 11:32 PM

Awesome, I just replaced the function entirely with yours and it apparently worked flawlessly, my regexp experience is limited.

I also made a few changes to the script in order to make it look a little more like scite, for instance, the script margin colors (where the line numbers are at) now use the color scheme from the SciTE config.

Now what's left to do it make the script also fetch the bold and italics style that belong to the specific styles.
Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#10 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 03 July 2012 - 12:07 AM

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:

AutoIt         
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 :whistle:.
  • CaptainClucks likes this
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#11 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 03 July 2012 - 12:40 AM

Thanks again, I wasn't expecting some peoples session files to be void of those properties, leads me to believe there may be more things that have been over looked now.

Upload now has latest changes as provided by you.

Lately I've had too much spare time on my hands, and this script is a byproduct of that :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users