Josh Dye wrote: > > Thank you, that worked. > > Now, once again, another problem... I want it to also add the text of > fld "OpenFile" into the MouseUp command script. So, what I want it to do is > add this line of scripting into the MouseUp command... > > ext_openfile "C:/WINDOWS/Desktop/ProgrammingV1.1/chat test.txt" > > The "C:/WINDOWS/Desktop/ProgrammingV1.1/chat test.txt" is actually in a fld > when I create a New Button. So, what I want it to do is something like... > > Add script "Ext_Openfile" & the text of fld "OpenFile" into btn text of fld > "NewBtn" The easy way is to (after you set the script of btn X to <whatever>): put cr & "ext_openfile" && quote & fld "OpenFile" & quote after line y of (the script of btn X)
Basically you can manipulate a script of an object any way you want *before* or *after* the script is executed. Andu > > Would that work? Got any ideas? > > - Josh Dye > > ----- Original Message ----- > From: "andu" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, October 27, 2001 8:59 PM > Subject: Re: Adding Script Problems... > > > > 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
