What's a .livecodescript document?

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

What's a .livecodescript document?

Post by richmond62 »

Cripes . . .

Well . . .

It is a sort of stackless stack . . .

A script-only thingy (there's that useful word again) . . .
A scriptOnly stack will save just the script with a single header line declaring the stack name. Any other objects or properties of the stack will not be written to disk.

The scriptOnly property has been added to enable scripts to detect and set the file format of the stack. Without this property it is not possible to detect the file format the stack is being saved in without examining the file itself.
https://livecode.fandom.com/wiki/ScriptOnly

You can edit a 'livecodescript file in a text editor, or:

https://forums.livecode.com/viewtopic.php?t=38623
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What's a .livecodescript document?

Post by OpenXTalkPaul »

What happened to the rest of this thread?

Well anyway, yeah that's it, a stack-less stack, that's just a normal (UTF8) text file.
There's a script that's in with the Engine repos to 'Scriptify' a binary stack to script-only behaviors.
Plain text format, unlike binary Stack format, are GitHub and other version control systems friendly.
I guess you could use Monte's VCS library with some of those: https://github.com/montegoulding/lcVCS

I've been saying for a long time there should be a similar format or mark-up for GUI layouts to go along with that.
Apparently Monte had the same thoughts when he wrote that VCS library, found this in his repos on Github:
https://github.com/montegoulding/scriptonlyui
FourthWorld
Posts: 442
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: What's a .livecodescript document?

Post by FourthWorld »

OpenXTalkPaul wrote: Sat Aug 24, 2024 1:42 am What happened to the rest of this thread?
When threads disappear without explanation I get wary of infecting time writing.
I've been saying for a long time there should be a similar format or mark-up for GUI layouts to go along with that.
Rebol is very inspiring on that. Bonus that streaming apps was a design goal from the beginning.

The layout engine borrows from the browser concept of avoiding overlapping objects by default, but goes further to be opinionated in ways that favor common app layout patterns. And of course you can add specifiers for size and location along with anything else, but it's very intriguingly different from xTalks in that philosophy, much like R is for charts, where specifying almost nothing still yields a useful result. Makes for some very sparse layout definitions.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What's a .livecodescript document?

Post by tperry2x »

OpenXTalkPaul wrote: Sat Aug 24, 2024 1:42 am What happened to the rest of this thread?
Nothing to do with me. phpBB has lost a couple of posts I've been typing in the past too. I don't know if there's an error with it's parsing of it's DB somewhere.
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What's a .livecodescript document?

Post by richmond62 »

I am not sure that there was 'a rest' to this thread. I wrote the first bit because Skids asked.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What's a .livecodescript document?

Post by OpenXTalkPaul »

richmond62 wrote: Sat Aug 24, 2024 7:26 am I am not sure that there was 'a rest' to this thread. I wrote the first bit because Skids asked.
Ah so you started a new thread to cover the topic of script-only, OK.

It's good in that it caused me to I find Monte's 'Script-Only UI' stack, something else to play around with.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: What's a .livecodescript document?

Post by Skids »

Thanks for your reply to my possibly missing question.

So is the idea that a stackless stack is used for library scripts or as substacks that are Git friendly and build their UI on the fly?

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What's a .livecodescript document?

Post by OpenXTalkPaul »

Skids wrote: Tue Aug 27, 2024 7:10 am So is the idea that a stackless stack is used for library scripts or as substacks that are Git friendly and build their UI on the fly?
Yes that's it, the only thing inaccurate there is 'as substacks', there's not 'substacks' in scriptOnly, there's no object-declaring-syntax or mechanism, so if a scriptOnly stack has a UI it's being created with script 'on the fly'. The Tools palette is an example of a script-only stack that creates its UI when it's opened. ScriptOnly are typically used for script libraries or as behavior scripts that get attached to some UI elements. You can however store binary data in script only file by using Base64 encode/decode to keep them in a plain-text friendly format.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests