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: Klaus, FourthWorld, heatherlaine, kevinmiller

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

Editing .livecodescript files

Post by richmond62 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Editing .livecodescript files

Post by Klaus »

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: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: Editing .livecodescript files

Post by richmond62 »

Thanks Klaus.

My main difficulty is how to open a .livecodescript along a filepath using code.
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Editing .livecodescript files

Post by Klaus »

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: 3214
Joined: Sun Jun 04, 2006 9:39 pm

Re: Editing .livecodescript files

Post by stam »

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: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: Editing .livecodescript files

Post by richmond62 »

Thanks, both! 8)
Post Reply