ScriptED script editor.

Post Reply
User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

ScriptED script editor.

Post by BruceSteers » Wednesday 18th November 2020 1:10am

So here is my ScriptED text editor for scripting (primarily)

Still far from finished but working fairly well now i think.

Features....
  • Lists all script functions in a convenient list you can click the function names and the editor jumps to the function.
  • Uses the Gambas3 TextEditor object that has many handy features that have been far from fully implemented yet.
  • Custom independent colour coding, highlight themes saved individually for each file type mode. (gambas colours can be different to shell)
  • Has a Run button to save and launch the loaded work script in a TerminalView.
  • Open files in new tabs. ()
  • Single instance launching. drag-n-dropping multiple files onto the launcher will open app once with files in tabs.
  • Hand built Keyboard Macro recorder (basic and experimental), record and playback keystrokes (gtk only)
  • Preview html/markdown files.
It's a work in progress this, being created/adapted as i use it for my own needs.
But more than useful in many ways now so you can have it too :)

Todo...
Write some proper documentation.
It's mostly straight forward, to be fair if you're intelligent enough to write executable scripts then you're intelligent enough to figure out how this editor works :) lol

Here it is running a bash script for me...
Run bash script example
Run bash script example
ScriptED_com.png (376.9 KiB) Viewed 105 times
Here it is Running a gambas basic script..
Run gambas script example
Run gambas script example
ScriptED_gbs.png (272.39 KiB) Viewed 105 times
Here it is previewing a markdown doc for me..
Show markdown/html previewer.
Show markdown/html previewer.
ScriptED_md.png (205.18 KiB) Viewed 105 times
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

Re: ScriptED script editor.

Post by BruceSteers » Wednesday 18th November 2020 1:16am

Couldn't attach the project to the above post so here it is ....

Attachment removed, see post below for updated version.
Last edited by BruceSteers on Tuesday 24th November 2020 3:07pm, edited 2 times in total.
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

Re: ScriptED script editor.Compat

Post by BruceSteers » Wednesday 18th November 2020 7:35pm

So I thought it was all working great. then i loaded up Debian lol.

Of course (didn't think at the time) adding the gtk webview component has made it work on only the latest gambas an no other versions , darn it.

So i've made a new branch..
https://gitlab.com/bsteers4/scripted/-/tree/old-gambas

As the title suggests that's a version for older gambas versions.
Have removed the webkit bits and altered the highlight stuff a bit to cater for things like Highlight.Custom do not exist in a gambas <3.15
am going to work on getting the html view working a different way (the old fashioned way)

I also copied the keysymdef.h file to the app/exe so it no longer looks for it in /usr/include/X11 so you do not need any development packages installed for the macro's to work. (it just requires GTK and X11 not wayland)

So if you are not using gambas beta and you found the program didn't work then try this compatible version instead..
https://gitlab.com/bsteers4/scripted/-/tree/old-gambas

NOTE: the text below and the next post are now irrelevant as modified components are built into the application.
PS.
Re. shell highlighting and gambas versions that do not support it..
I have edited and re-compiled 3 gambas controls...
gb.eval.highlight
gb.form.editor
gb.form.terminal.

terminal is recompiled from the 3.15 version and has all the latest official bug-fixes from 3.15.90
the other 2 enable shell highlighting for TextEditor.

I've recompiled on Gambas 3.12.2 / 3.14.3 and 3.15.2-stable
Goto here...
https://gitlab.com/bsteers4/gambas3-shell-highlighting
select the branch relevant to your version and clone the whole dir.
(the whole gambas source files were not really needed but i thought to include them in case anyone wanted to do further modifications)
Repository contains a bash installer to copy the .gambas components or do it yourself.
Last edited by BruceSteers on Tuesday 24th November 2020 3:07am, edited 1 time in total.
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

Re: ScriptED script editor.

Post by BruceSteers » Sunday 22nd November 2020 7:57pm

included in both versions now are a function that detects if you have old eval.highlight and form.editor controls with no shell highlight and offers to download and install for you if you want to. (have not yet added option to disable this feature but will)

It uses curl in a shell to download updated components (detects if you are on 3.12 3.14 or 3.15) and copies to /usr/lib/gambas3/
(Note, if you use daily build or compile gambas latest regularly they will get overwritten each time and you'll have to re-apply)

https://gitlab.com/bsteers4/scripted
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

Re: ScriptED script editor.

Post by BruceSteers » Tuesday 24th November 2020 3:02am

Greeting folks :)

New development on the editor....

I have managed to import the TextEditor/Highlight and TerminalView code into the app itself. :)

What this now means is that you do not need any custom components added to your gambas for all the features as ScriptEd is now using it's own intenal components.

I've modified the highlight code to make it backward compatible so without doing or installing anything the app shows Shell/Bash highlighting on gambas 3.12 at least , will not rewrite text in gambas highlight mode, etc :)

I've also adjusted the TerminalView so in the app ctrl-c/v does copy and paste (experimental, will probably add option to disable it)

I've attached a striped down source archive (removed all binaries so will need loading into gambas and compiling)

All i need to do is figure out how to get the QT html viewer to load into the gtk interface or hope the gtk webview will be addable like the editor and terminal were?.

Getting quite functional now though , was just editing the readme with it (it auto-detected html mode) and it does cool gambas like things like typing <b> types '</b>' for you when you hit > (hehe i loved that, my app has cool features i don't even know about :)) )

All the best :)
Attachments
scripted-oldgambas.zip
(363.75 KiB) Downloaded 1 time
If at first you don't succeed , try it differently.

User avatar
cogier
Site Admin
Posts: 535
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: ScriptED script editor.

Post by cogier » Tuesday 24th November 2020 4:27pm

The enthusiasm for this project is palpable but I still need more help. An example of how and what it does would help.
There are quite a few buttons with no ToolTips. Panel1 needs padding(5). Panel3 is 'squishing' all the buttons, I suggest you remove it. I was playing around with replacing the 'Toolbar' with a Gambas Toolbar gb.form.mdi. If you still have a copy of ScreenShot try right-clicking on the ToolBar or right-click the Gambas IDE ToolBars.

User avatar
BruceSteers
Posts: 210
Joined: Thursday 23rd July 2020 5:20pm

Re: ScriptED script editor.

Post by BruceSteers » Tuesday 24th November 2020 7:25pm

cogier wrote:
Tuesday 24th November 2020 4:27pm
The enthusiasm for this project is palpable but I still need more help. An example of how and what it does would help.
There are quite a few buttons with no ToolTips. Panel1 needs padding(5). Panel3 is 'squishing' all the buttons, I suggest you remove it. I was playing around with replacing the 'Toolbar' with a Gambas Toolbar gb.form.mdi. If you still have a copy of ScreenShot try right-clicking on the ToolBar or right-click the Gambas IDE ToolBars.
Sigh, you're so fussy ;) lol

Right i've added tooltips everywhere
I've covered a fair bit in the readme that's in the dir you know. What it does?, it's a text editor mainly designed for writing/testing bash and gambas scripts. not sure how to elaborate on that. ;)
Pretty sure the readme says it all (in summary at least).
https://gitlab.com/bsteers4/scripted/-/ ... /README.md
It was also copied into the first post here along with 3 screenshot pictures demonstrating it in use.

How much more help do you need?

i've padded panel1 , and removed panel3 at the cost of the border i wanted.
Changes are on gitlab..
https://gitlab.com/bsteers4/scripted

And i might look into mdi, maybe it will help with my issue of getting a qt-window inserted?
Might be a nicer way to handle the tabs as well. cheers
If at first you don't succeed , try it differently.

Post Reply