Editing .livecodescript files

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Editing .livecodescript files

Post by richmond62 » Thu Sep 21, 2023 12:23 pm

Is there a way to open a .livecodescript file inwith the IDE, edit it, and save it?

OK: I have worked out how to do that.

BUT, I'd like to open a .livecodescript file with code using a file path . . .

Klaus
Posts: 13866
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Editing .livecodescript files

Post by Klaus » Thu Sep 21, 2023 1:11 pm

Hi Richmond,

yes, just use the OPEN dialog.
LC will create a "temporary" script window, where you can edit the script(s).

IMPORTANT:
Hit CMD-S (Save) while the script editor window is still open or your changes are lost.


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Editing .livecodescript files

Post by richmond62 » Thu Sep 21, 2023 1:21 pm

Thanks Klaus.

My main difficulty is how to open a .livecodescript along a filepath using code.

Klaus
Posts: 13866
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Editing .livecodescript files

Post by Klaus » Thu Sep 21, 2023 1:32 pm

Hi Richmond,

don't try to "open" or "go" to that stack, just script this:

Code: Select all

edit script of stack "/Users/klaus2/Desktop/broadcaster.livecodescript"
Tested and works.


Best

Klaus

stam
Posts: 2758
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Editing .livecodescript files

Post by stam » Thu Sep 21, 2023 1:33 pm

richmond62 wrote:
Thu Sep 21, 2023 1:21 pm
Thanks Klaus.

My main difficulty is how to open a .livecodescript along a filepath using code.
How about something along the lines of

Code: Select all

edit the script of stack (<path_to_stack>)
— Edit: Klaus clearly on form got there before me lol

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Editing .livecodescript files

Post by richmond62 » Thu Sep 21, 2023 2:30 pm

Thanks, both! 8)

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”