Path: utzoo!attcan!uunet!van-bc!rsoft!mindlink!a347 From: a347@mindlink.UUCP (John Miller) Newsgroups: comp.sys.mac.hypercard Subject: Re: Can buttons be created on the fly? Message-ID: <4413@mindlink.UUCP> Date: 11 Jan 91 13:45:44 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 31 > I'd like to create buttons dynamically within a script, but I > haven't found a way to do this. A new button can be created using the command domenu "New Button" The trick is gaining access to this button so that you can set the name and location. The button is added to the "end of the list." -- Create the button domenu "New Button" -- Figure out the button number put the number of buttons into btnNumb -- Make it look right set the name of button btnNumb to "Bob" set the rect of button btnNumb to 10,40,80,60 set the style of button btnNumb to "shadow" -- Be sure to go back to browse tool after creating -- all the buttons choose browse tool You might want to use "lock screen" and "unlock screen" around these statements so that the user doesn't see the button until the script has finished building it. ---------------------------------------------------------------------- John Miller (604) 433-1795 Symplex Systems AppleLink (rarely) CDA0461 Burnaby, British Columbia Fax: (604) 430-8516 Canada usenet: john_miller@mindlink.uucp ----------------------------------------------------------------------