ScriptED script editor.

So you have written that new, must have program. Let us see it here.
Post Reply
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

ScriptED script editor.

Post by BruceSteers »

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...
ScriptED_com.png
Here it is Running a gambas basic script..
ScriptED_gbs.png
Here it is previewing a markdown doc for me..
ScriptED_md.png
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

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 doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.Compat

Post by BruceSteers »

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 doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

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 doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

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 :)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: ScriptED script editor.

Post by cogier »

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: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

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 doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

New development..
I may have just fixed the problem with running macros and QT.
The problem was with using F3 to search for text.
On GTK the F3 search keypress would happen at the correct time during play but on QT for some reason it would only do the F3 search at the end of playing the macro :(
I've fixed it by making the macro player detect if it needs to do F3 and if so in does not send the F3 key now but manually runs the search function so it has to happen at that time :)

So now i've re-enabled macro recording/playback in QT mode.

Also if macro recording works well enough now on qt i could make it a QT only app instead of GTK to enable the built in webviewer i'm having issues with as the one i tried was the new gtk one and it's too new for many to have.

https://gitlab.com/bsteers4/scripted/-/tree/old-gambas

It's also going through a bit of a re-write as i've made a custom MyEditor class that inherits TextEditor but contains all the various connected variables related to the document.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: ScriptED script editor.

Post by BruceSteers »

ScriptEd is in the process of getting a complete re-write and is almost ready.

Like my Desktop-ish program it has been pretty much re-written from scratch as my gambas knowledge is better these days.

New interface, using expandable panels.

Multiple Terminals.

External tools feature. re-built.

Keystroke Macro-recorder works very different to last time.
It does not bother with symdef key codes or have potential qt/gtk/wayland differences because in no longer tries using x11.SendKey
I have duplicated the Texteditor_KeyPress event to work with pseudo Key events. It records the keypress events as MKey codes (pseudo Key class) then playback just sends the MKey event list to the copy of the KeyPress event. potentially working exactly like real keypress events on ALL systems.
It needs much testing though to find any issues.

I have yet to write proper documentation.

Showing running a script.
ScriptED_com.png
ScriptED_com.png (351.06 KiB) Viewed 4594 times
Showing terminal panel and Function lister
ScriptEd2-1.png
ScriptEd2-1.png (335.85 KiB) Viewed 4594 times
Showing External tools editor and Keystroke recorder.
ScriptEd2-2.png
ScriptEd2-2.png (318.54 KiB) Viewed 4594 times

Note: still in beta. I'm using and it seems to be working okay. but i've been so busy re-writing this and Desktop-ish that i have not had time to thoroughly use either programs to find any bugs.
  • Still Todo.....
  • Make the theme editor so different modes will show different colours if wanted. (gotta get my head around the new TextEditor.Theme method not the previously used TextEditor.Style)
  • Documentation.
  • Use the crap out of it to find any quirks.
Enjoy :)
scripted-2.0.tar.gz
(158.09 KiB) Downloaded 164 times
If at first you don't succeed , try doing something differently.
BruceS
Post Reply