Script command to create button
Posted: Sun Feb 22, 2009 7:32 pm
I am converting a hypercard application. Much seems to work very well when I import into Revolution, much better than with SuperCard which I was very disappointed with.
However, I got stuck with one piece of code. It looks like this in Hypetalk:
This code creates a new button, and gives the new buttom a simple script which says
where NNNN gets the value of the global variable markedcard
My code stops at the command:
"send "doMenu New Button" to HyperCard" which creates a new button.
What is the corresponding command in the script language of Revolution?
However, I got stuck with one piece of code. It looks like this in Hypetalk:
Code: Select all
on mouseUp
global lastnewbutton, markedheader, markedcard
send "doMenu New Button" to HyperCard
put "on mouseUp" into line 1 of thescript
put "go to card ID " & markedcard into line 2 of thescript
put "end mouseUp" into line 3 of thescript
set script of button lastnewbutton to thescript
set the name of button lastnewbutton to markedheader
end mouseUp
Code: Select all
on mouseUp
go to card ID NNNN
end mouseup
My code stops at the command:
"send "doMenu New Button" to HyperCard" which creates a new button.
What is the corresponding command in the script language of Revolution?