You can create an "invisible" button that sits on top of the image. Assign the relevant script to each of the oval-shaped buttons that you've already created (make sure that each button is set to "Change to hand cursor over button"), then set the Fill on each oval button to be "transparent" (click the Fill pattern palette and select the top left icon, the one with two small interlocking squares), then set the Line attribute of each button to "None". The oval buttons should now be "invisible".
Get(ActiveLayoutObjectName) has nothing to do with what you're trying to achieve.
I'm a bit perplexed, however, by "all perform the same script with only their name changing". If each tooth button is performing the same script, then why do you need separate buttons for each tooth?
Using same script and assigning different script parameter to each makes sense. Many times we want a script to run based upon the button selected, such as letters of the alphabet or days on a calendar.
So attach script to every button as sunmoonstar_13 suggests and, as you attach same script to each button, change their script parameter to the the tooth name, Upper first molar, Upper second molar and so forth.
Yessss, you perfectly understood my problem, LaRetta, but I must confess that I don't know how to use parameters with a script (shame on me!)
In button setup, when you click Specify... to select a script to be performed by the button, you'll see a box for specifying a parameter in the bottom of the dialog. You can click the Edit button to bring up Filemaker's Specify Calculation dialog if you want to calculate a value to be passed to the script. In your case, it seems just entering text in the parameter box that names the tooth should do the job.
In your script, you can access the data passed to it as a parameter with the Get ( ScriptParameter ) function.
Great, it works just fine, just the way I wanted it. Thank you to all of you who helped me!!!
PS I don't know how to show on this forum that this topic has found its solution, but for me, it certainly has
You could certainly click the button that accepts LaRetta's answer as the "best answer". That will flag the thread as being "answered" at least.
Thanks to you too, PhilModjunk