How can I see all scripts in stack?

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
jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

How can I see all scripts in stack?

Post by jpottsx1 » Sun Sep 04, 2011 12:11 am

I'm sure this is easy and I've overlooked it somehow, but I need to know how can I see all scripts in stack in one place?

I am hoping that I can see the scripts one after the other without having to click thru to view each script.
Jeff G potts

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: How can I see all scripts in stack?

Post by dunbarx » Sun Sep 04, 2011 4:06 am

There are a few utilities written for this purpose. You will hear about them very shortly.

But just for kicks, can you write a script that cycles through all the objects on all the cards, creating a text file that could be seen at once? Remember to title each script with the name and location of the object that it was associated with.

Craig Newman

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How can I see all scripts in stack?

Post by bn » Sun Sep 04, 2011 7:01 am

Hi Jeff,

have a look here

http://revonline2.runrev.com/stack/282/Script-Reporter
and there is another one based on above script-reporter by D. Glass. Search for script reporter. You can also access revOnline from within Livecode: user samples

Kind regards

Bernd

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: How can I see all scripts in stack?

Post by jpottsx1 » Sun Sep 04, 2011 6:15 pm

Thanks for the link it looks good. But is there a way to also be able see all the scripts, then bulk edit the scripts with search and ?
Jeff G potts

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How can I see all scripts in stack?

Post by bn » Sun Sep 04, 2011 6:43 pm

Hi Jeff,

if you want to do a find/replace then you can do that natively. In the Edit Menu > Find and Replace. Choose Stack, make shure "script" is the only option ticked. Do a search. If there was a hit then enlarge the window by dragging in the bottom-right corner, you will see all occurences of the search term. (You can double-click on the listed object where the object was found to go directly to the script) At the bottom you have the option to replace, enter the new term and it will replace all occurences of your search term in whatever you had chosen, card, stack, all open stacks etc.

BUT please be careful, work on a copy of your stack. The replace function also replaces partial matches. That got me a while ago. Use spaces to mark a word if the search term is a word, etc. Make shure your search term is unambiguous.

A search for mouse and a replace RAT would give you "on RATup". Livecode does not like: on RATup / end RATup

If you want to write/edit whole scripts outside of the script editor you could probably hack the script reporter to set the scripts of the objects to the changed scripts.

Kind regards

Bernd

kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

Re: How can I see all scripts in stack?

Post by kevin11 » Tue Sep 06, 2011 9:09 am

bn wrote:Livecode does not like: on RATup / end RATup
why not ? That's speciesism. And it's not a rat, it's a hamster.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How can I see all scripts in stack?

Post by bn » Tue Sep 06, 2011 9:33 am

Hi Jeff,
And it's not a rat, it's a hamster.
you already have that build-in,

Code: Select all

on hamsterUp
   -- your expletives here
noEnd hamsterUp
is equivalent to

Code: Select all

on mouseUp
   repeat forever
   -- your expletives here
end mouseUp
Wheras

Code: Select all

on RATUp
   -- RATS!
end RATUP
is more specific

recurse and the world curses with you

That's speciesism
Is that a Homo sapiens sapiens speaking? :)

Kind regards

Bernd (Rattus Rattus)

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”