Search & Replace being a bit unhelpful

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

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 255
Joined: Sun May 27, 2007 8:19 pm

Re: Search & Replace being a bit unhelpful

Post by Martin Koob » Thu Jan 13, 2022 6:26 pm

Hi bernd

using 'put the mouse stack' in the message box is a great idea. Adding that to my tricks

What I do to figure out a name is while the stack is open put 'put the openstacks' in the message box & press return and then look in the resulting list for anything that looks like it is the stack I want.

To confirm I close the stack in question and again put 'put the openstacks' in the message box & press return and see what is different.

Your way is much more efficient.

Martin

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

Re: Search & Replace being a bit unhelpful

Post by bn » Thu Jan 13, 2022 6:31 pm

Hi Martin,

thanks,

along the same line is

Code: Select all

put the mouseControl

Code: Select all

put the name of the mouseControl

Code: Select all

put the long name of the mouseControl
Typed into the message box and after moving the cursor over a control and then hitting the return key.

I find that most useful when "sniffing around"

Kind regards
Bernd

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

Re: Search & Replace being a bit unhelpful

Post by Klaus » Thu Jan 13, 2022 6:56 pm

In my custom palette I have some handy commands using "the mousexxx"
These are fired 2 secs after selecting the menu item.
mouse_x.jpg
mouse_x.jpg (40.16 KiB) Viewed 709 times

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 255
Joined: Sun May 27, 2007 8:19 pm

Re: Search & Replace being a bit unhelpful

Post by Martin Koob » Fri Jan 14, 2022 12:29 am

Hi

Just playing around with some ideas and I thought of putting a script in the front script that would identify the stack the mouse was in.

- created a stack and called it "Main"
- created a sub stack in it and called it "sub"
- created a button "Stack Name Reporter" on the first card of stack "Main" and added the following script to that button

Code: Select all

on mouseEnter
   put the short name of this stack
end mouseEnter

on mouseLeave
   put empty into message box
end mouseLeave
-created a button "insert front script" on the first card of stack "Main" and added the following script

Code: Select all

on mouseUp
   insert the script of button "Stack Name Reporter" into front
end mouseUp
Next
-click the button "insert front script"
Result
- as you move the mouse around the name of the stack that the mouse is currently over is shown in the message box.

I attached the simple stack here.

Martin
Attachments
show Stack Names under mouse.zip
(1.15 KiB) Downloaded 6 times

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

Re: Search & Replace being a bit unhelpful

Post by richmond62 » Fri Jan 14, 2022 9:49 am

I wonder if there wouldn't be a way to move that
into a plugin?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8941
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Search & Replace being a bit unhelpful

Post by FourthWorld » Fri Jan 14, 2022 4:29 pm

richmond62 wrote:
Fri Jan 14, 2022 9:49 am
I wonder if there wouldn't be a way to move that
into a plugin?
A plugin is a stack file placed in the Plugins folder.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 255
Joined: Sun May 27, 2007 8:19 pm

Re: Search & Replace being a bit unhelpful

Post by Martin Koob » Fri Jan 14, 2022 4:31 pm

I don't think there is any reason why not.

If anyone is interested in creating plugins they should buy Andre Garcia's book Development Oriented Developmenthttps://andregarzia.com/books/developme ... pment.htmlto learn how you can do that.

As I was making the simple demo stack I also thought it could report a host of things the object,[group],card,stack,mainstack,filepath
- then I thought maybe they could be in a floating multi line field, not in the message box
- then I thought you could use a key combo to to lock the field in place and click on a line to open the script, the property inspector, reveal stack in finder, etc.
- then I thought I need to get back to my actual work. :(

So If anyone wants to take this further be my guest. It would be a great plugin.

Martin

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”