> Josh Dye wrote:
> 
> Hey everyone,
>     I am sitting here, being stumped and stupid pretending to be
> programming, but... I'm not making any progress! (Go figure...)
> 
> OK, here is my problem... I have a button that will make a new button
> with a certian name... Here is the button's script for making a new
> button...
> 
> 
> on mouseup
>   answer file "Select the file you wish to create a shortcut for..."
>   put it into fld "OpenFile"
>   ask "What do you wish the New Buttons Name to be?"
>   put it into fld "Newbtn"
>   create button the text of fld "Newbtn" 
create btn (fld "Newbtn") # should be enough here

get the script of btn X (or get fld X)
set the script of btn (fld "Newbtn") to it

> end mouseup

Also, if you don't *need* to put the stuff in a field use a local
variable as in:

ask "What do you wish the New Buttons Name to be?"
put it into tBtn
create btn tBtn

> 
> 
> OK, what I want it to ALSO do is copy the script of either a button or
> the text of a field into that new button. What is the best and easiest
> way to do that with using the least amout of scripting lines? (I am a
> still chillin' out with the Starting Kit...)
> 
> 
> - Josh Dye

Hope this helps

Andu

Reply via email to