More 'non-fun'...
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
More 'non-fun'...
More 'non-fun' things in the xTalk "Fun and Games" section, but not really sure where else this would live. It's an example stack like the others that we've been posting recently, so...
(it seems I don't really do 'fun' ) - well, other than that Shufflepuck idea, but I can't take the credit for that. It was xAction's creation.
Anyway, back on topic:
What we have here is continuing from my original script editor colours example.
Why? Well, normally you'd dispatch a message to the seutilites stack inside the IDE, and it'd colourise your script for you. Lovely.
However, this doesn't work if you are in a standalone.
It also doesn't work if you'd opened your stack (like me), in an IDE you were creating, that doesn't even have a seutilities stack.... so what to do?
Well, this stack demonstrates both methods. The built in seutilities method, which then passes to an internal command inside the engine.
The second method is me externalising this command in xTalk, and extending it somewhat with customisable colour sets. You can set the textColor of each field using the inspector, and save this scheme. It'll colourise your script even if you made a standalone from it.
Why is this useful? Well, apart from showing coloured xTalk in a standalone - not very at first glance, however it does pave the way for me to work on an alternative script editor for my purposes, and it also allows someone (probably me if I continue my current thinking), to build an xTalk-aware text editor with xTalk syntax coloring.
Each field with colours set, the field names are the names of each function that is normally hidden inside the engine. I just grabbed these names and stored them as fields. This was also the most efficient way I could think of also setting colours on them. I could've done this in an array, but I prefer the visual approach as it's easier to follow. I've done this for consistency, but it may also be possible to weave our script-autocomplete functions easier with all the functions and keywords laid out in this way?
To do:
Sort out the indents - normally indented of course by 3 spaces, inside each function, handler, etc... and indented further in repeat loops and if/else statements.
Edit: make the stack immune to "light mode" setting, after feedback below. [done]
Note: you'll need to have a screen resolution of at least 1200px wide to see this stack properly.
(it seems I don't really do 'fun' ) - well, other than that Shufflepuck idea, but I can't take the credit for that. It was xAction's creation.
Anyway, back on topic:
What we have here is continuing from my original script editor colours example.
Why? Well, normally you'd dispatch a message to the seutilites stack inside the IDE, and it'd colourise your script for you. Lovely.
However, this doesn't work if you are in a standalone.
It also doesn't work if you'd opened your stack (like me), in an IDE you were creating, that doesn't even have a seutilities stack.... so what to do?
Well, this stack demonstrates both methods. The built in seutilities method, which then passes to an internal command inside the engine.
The second method is me externalising this command in xTalk, and extending it somewhat with customisable colour sets. You can set the textColor of each field using the inspector, and save this scheme. It'll colourise your script even if you made a standalone from it.
Why is this useful? Well, apart from showing coloured xTalk in a standalone - not very at first glance, however it does pave the way for me to work on an alternative script editor for my purposes, and it also allows someone (probably me if I continue my current thinking), to build an xTalk-aware text editor with xTalk syntax coloring.
Each field with colours set, the field names are the names of each function that is normally hidden inside the engine. I just grabbed these names and stored them as fields. This was also the most efficient way I could think of also setting colours on them. I could've done this in an array, but I prefer the visual approach as it's easier to follow. I've done this for consistency, but it may also be possible to weave our script-autocomplete functions easier with all the functions and keywords laid out in this way?
To do:
Sort out the indents - normally indented of course by 3 spaces, inside each function, handler, etc... and indented further in repeat loops and if/else statements.
Edit: make the stack immune to "light mode" setting, after feedback below. [done]
Note: you'll need to have a screen resolution of at least 1200px wide to see this stack properly.
- richmond62
- Posts: 4242
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: More 'non-fun'...
This looks very odd indeed (MacOS 12.7.4): especially the field in the top-left hand corner:
-
-
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Righto, yeah - forgot 'light mode'.
It all makes sense if you were to set the background colour of that stack to a dark colour!
if you are in light mode, set the background colour of that "odd" looking field on the left to white. Adjust your colours as needed to create your own preset.
(Save the current scheme to a file, modify it in a text editor, load your modified scheme).
If in dark mode, use dark colours for the stack. (I'll make it do that in future).
Now I know why people don't publish their work as 'works in progress' (sigh)
It all makes sense if you were to set the background colour of that stack to a dark colour!
if you are in light mode, set the background colour of that "odd" looking field on the left to white. Adjust your colours as needed to create your own preset.
(Save the current scheme to a file, modify it in a text editor, load your modified scheme).
If in dark mode, use dark colours for the stack. (I'll make it do that in future).
Now I know why people don't publish their work as 'works in progress' (sigh)
-
- Posts: 285
- Joined: Thu Sep 16, 2021 1:40 pm
- Contact:
Re: More 'non-fun'...
Posting works in progress are good for finding the things you overlooked. Just update your top post when you update.
I spent...oh hours...setting up syntax coloring for xTalk and it was AWFUL, ugliest thing ever.
But then I tried to read Animation Engine documentation with zero syntax hilighting and my eyes gave up and my brain completely checked out for the tenth time of trying that. So I started writing my own instruction stack using syntax hilighting from the script editor and that was like 3 hours for the first AE lesson, yikes. Anyway here's how that worked:
1. Hold mouse over script window
2. Hit return in message box with the command "ScriptToField" in place
Sure would be great if that could be automated, like "Rip all the scripts of all the stacks in a folder to syntax hilighted text" Especially if it was a format that could be dumped on github or a blog or something.on ScriptToField
put the long name of the mouseControl into tScriptWindow
set the htmlText of field "TheScript" to the htmlText of tScriptWindow
end ScriptToField
So good to see you on this path.
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Most definately not.
Feature Support Level Explanation
Direct CSS Styling No GitHub Markdown prioritizes security and sanitizes most CSS to prevent malicious code.
Inline Styles (within HTML tags) Limited Some basic inline styles might work (e.g., <p style="color: red;">), but complexity is often stripped.
External CSS Files No GitHub Markdown won’t reference external stylesheets.
How people have the patience to produce beautiful documentation and examples in there is beyond me.
Apparently you can jam your css and html into an svg file? Jeezlouise.
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Um... I didn't write the above!?
Plus my original post is gone.
Anyway, I was going to say, it would be easy to automate inline span tags, but it'd slow down the creation of the html pages. Even automated, be prepared for a long progress bar.
Either that, or don't use GitHub
Plus my original post is gone.
Anyway, I was going to say, it would be easy to automate inline span tags, but it'd slow down the creation of the html pages. Even automated, be prepared for a long progress bar.
Either that, or don't use GitHub
-
- Posts: 285
- Joined: Thu Sep 16, 2021 1:40 pm
- Contact:
Re: More 'non-fun'...
Wow that's so weird, it used your account and quoted me when I was quoting you.
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: More 'non-fun'...
I think I gave some of you guys full moderation privileges a while back. When you have that, It's an easy mistake to click the edit button instead of the quote button. I've made that mistake and wrecked people's post before (but not this one).tperry2x wrote: ↑Sat Mar 16, 2024 9:41 pm Um... I didn't write the above!?
Plus my original post is gone.
Anyway, I was going to say, it would be easy to automate inline span tags, but it'd slow down the creation of the html pages. Even automated, be prepared for a long progress bar.
Either that, or don't use GitHub
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
It was probably my fault in all honesty. I was trying to post via a slow phone, and probably hit a link that jumped around as the page loaded.
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Now with added colour-selector goodness (first detailed here)
Script Colour Test #4
https://mega.nz/folder/NPt2lJib#-L_Le0Z3TFcllPPhVB5AeQ
Script Colour Test #4
https://mega.nz/folder/NPt2lJib#-L_Le0Z3TFcllPPhVB5AeQ
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Version 5:
(link is in here, by the way)
Now it does indents, comments and bold / italic styles too:
(On the way to making my own script editor, which does not rely on the "revSEUtilities" stack) - that's the point of this (one day, anyway). By the way, if anyone is running MacOS Sonoma - please download this and click the 'Run Script' at the bottom left.
I'd be interested to know how it returns the date formats (I suspect they are wrong).
(link is in here, by the way)
Now it does indents, comments and bold / italic styles too:
(On the way to making my own script editor, which does not rely on the "revSEUtilities" stack) - that's the point of this (one day, anyway). By the way, if anyone is running MacOS Sonoma - please download this and click the 'Run Script' at the bottom left.
I'd be interested to know how it returns the date formats (I suspect they are wrong).
- richmond62
- Posts: 4242
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: More 'non-fun'...
I won't be running MacOS Snowman until Monday lunchtime . . .
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
No problem. I'd appreciate it, but there's no huge rush of course.richmond62 wrote: ↑Sat Apr 06, 2024 4:01 pm I won't be running MacOS Snowman until Monday lunchtime . . .
It will just confirm to me if the date-getting syntax needs fixing on Sonoma. (I think that's at the point it broke, but could be earlier - Like MacOS 11 possibly).
Just because I have to tweak (it would seem).
Here's version 6 (link).
Now with the ability to max / min the window size, so that it resizes to show more of the script editor: Yeah, I know - I'm just putting off the next step (the auto-script suggestion). It's not going to be easy, but I guess that's coming up in v7... (somehow) - probably not using any AI (or at least not any online algorithm).
- richmond62
- Posts: 4242
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: More 'non-fun'...
So: let me at least give this a whirl on MacOS 12:
- -
1. What is that file on the far left?
2. Nice to see you use GIMP.
- -
1. What is that file on the far left?
2. Nice to see you use GIMP.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
You want to download the whole folder ideally.
The file on the left is the default colour scheme the stack tries to load. You can create and save your own script colourisation themes. This is the format it saves them as. (Glorified text file).
Yes, I do use Gimp on Linux (well, PhotoGimp to be precise).
The file on the left is the default colour scheme the stack tries to load. You can create and save your own script colourisation themes. This is the format it saves them as. (Glorified text file).
Yes, I do use Gimp on Linux (well, PhotoGimp to be precise).
- richmond62
- Posts: 4242
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: More 'non-fun'...
So: I am starting with a very "sexy" picture from my Devawriter Pro stack:
- -
Now I'll click on this and see what happens:
- -
- -
Now I'll click on this and see what happens:
- -
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Um... Why?richmond62 wrote: ↑Sat Apr 06, 2024 6:30 pm So: I am starting with a very "sexy" picture from my Devawriter Pro stack...
........ I don't follow.
It only changes the field in that stack. It doesn't do any others.
- richmond62
- Posts: 4242
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: More 'non-fun'...
Well, isn't the point of your stack to recolourise scripts?
Aha: a bit slow off the mark there: ONLY in its own stack????
Obviously as it did NOT recolourise my script in Devawriter Pro.
YES: it does recolourise the script in your field in that stack . . . with OXT Lite 1.03 on MacOS 12.
Presumably . . . though . . . it should be extended to affect everything open in the IDE.
Aha: a bit slow off the mark there: ONLY in its own stack????
Obviously as it did NOT recolourise my script in Devawriter Pro.
YES: it does recolourise the script in your field in that stack . . . with OXT Lite 1.03 on MacOS 12.
Presumably . . . though . . . it should be extended to affect everything open in the IDE.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2785
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: More 'non-fun'...
Yes, that is indeed the end goal - eventually.richmond62 wrote: ↑Sat Apr 06, 2024 6:35 pm Presumably . . . though . . . it should be extended to affect everything open in the IDE.
You'll notice I don't use any features of the "revSEutilites" stack. That's not by accident - it's so it will work in versions of an xTalk engine that doesn't have a "rev[anything]" stack.
- OpenXTalkPaul
- Posts: 2393
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: More 'non-fun'...
I changed the name of this sub-forum to reflect that there may be non-fun demo things posted in here.
if the stack or script is intended to possibly become a community IDE change(s) or addition(s) then I'd prefer for those to go in the "Workshop" forum.
if the stack or script is intended to possibly become a community IDE change(s) or addition(s) then I'd prefer for those to go in the "Workshop" forum.
Who is online
Users browsing this forum: No registered users and 0 guests