Intiatiate Script from Button

I'm new to the Apple world and feel a bit stupid asking this question.


I've searched everywhere and cannot find a way to add a button to a Numbers spreadsheet so I can initiate an AppleScript. Can't see anything in Inspector or menus which allows one to insert button into spreadsheet. 😕

Posted on Sep 7, 2011 10:16 AM

Reply
10 replies

Sep 8, 2011 5:46 AM in response to TedN007

TedN007 wrote:


I'm new to the Apple world and feel a bit stupid asking this question.

I agree with this advice.



Wow! Of all the answers I never expected that one. Inserting buttons is a pretty basic feature. I'm really surprised (and disappointed) at Apple for not including it.


Given the reactions of users when I offer an Applescript to answer their question, it's not surprising.

It seems that less than 20% of the users accept to use this kind of object.

So buttons allowing the triggering of scripts is a 'basic feature for less than these (less than 20%).

Given that, not surprising that Apple apply the good old rule :



++-+-+-+-+-+-+-+-++


Apple Human Interface Guidelines:

Apply the 80 Percent Solution

During the design process, if you discover problems with your product design, you might consider applying the 80 percent solution‚ that is, designing your software to meet the needs of at least 80 percent of your users. This type of design typically favors simpler, more elegant approaches to problems.

If you try to design for the 20 percent of your target audience who are power users, your design may not be usable by the other 80 percent of users. Even though that smaller group of power users is likely to have good ideas for features, the majority of your user base may not think in the same way. Involving a broad range of users in your design process can help you find the 80 percent solution.


+-+-+-+-+-+-+-+-+



So, is it possible to trigger a script by clicking on a cell. I'll prepare myself for a negative reply.



So you will not be surprised to read that given what I explained above, this feature is unavailable.


Yvan KOENIG (VALLAURIS, France) jeudi 8 septembre 2011 14:46:22

iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0

My iDisk is : <http://public.me.com/koenigyvan>

Please : Search for questions similar to your own before submitting them to the community

Sep 8, 2011 5:50 AM in response to fruhulda

fruhulda wrote:


How come something is basic or simple when they don't exist in an application? What kind of function are you expecting for the button?

The asker wrote :


I've searched everywhere and cannot find a way to add a button to a Numbers spreadsheet so I can initiate an AppleScript.


and :


So, is it possible to trigger a script by clicking on a cell.


This time the question gave all what was needed to get an accurate answer. 😉

Yvan KOENIG (VALLAURIS, France) jeudi 8 septembre 2011 14:48:54

iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0

My iDisk is : <http://public.me.com/koenigyvan>

Please : Search for questions similar to your own before submitting them to the community

Sep 7, 2011 6:03 PM in response to TedN007

More specific answer:

Inserting buttons in Pages (or Numbers) into the Toolbar is done through Customize Toolbar..., the last item in the View menu. A button to trigger a script is not available.


Buttons cannot be inserted into a table cell in either application. The closest thing to a button available is a checkbox, which toggles between TRUE and FALSE when clicked. Not much help with respect to scripts, though, as there's no function available that could be placed in a formula to trigger a script.


Provide (application) Feedback is available in both applications.


Regards,

Barry

Sep 8, 2011 6:18 AM in response to fruhulda

As it's a feature which I know well because I used it for years in AppleWorks under mac OS 9, I know it.


It's the ability to insert buttons in the tool bar able to run an Applescript dedicated to this or that task.

In the same AppleWorks but the feature is also available under OS X, we may insert formulas calling scripts so, it was a neat way to mimic buttons to trigger these scripts.

Insert a checkbox in cell K10 for instance

Disable the Autocalc Feature

Insert in L10 a formula like :

IF(K10=TRUE,formula triggering a script,"")

Check the box

trigger the menu item "Recalculate Now"

This will execute the script.

In my iDisk you may find scripts which I wrote to be embedded in AppleWorks cells.

JUst download :

Scripts_for_AppleWorks:pour MACRO.zip


Yvan KOENIG (VALLAURIS, France) jeudi 8 septembre 2011 15:17:42

iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0

My iDisk is : <http://public.me.com/koenigyvan>

Please : Search for questions similar to your own before submitting them to the community

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Intiatiate Script from Button

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.