Economy-x-Talk - Sample Scripts
ART HyperText Trick
This version was copied from the Developer Stack 1.1
DOUBLE CLICK on any word in this field for an example
This trick lets the user double click on a word to activate a hypertext link.
The 'on mousewithin' script goes into the target field.
Look at the script of the 'syntax' fields on the XCMD or XFCN card for a
varation of this method.
on mousewithin
--
--hypertext technique by Steve Drazga, ART Incorporated
--if you use this in your scripts please include these 2 lines.
--
if "Comment" is in the target then
if the locktext of the target is true then
set locktext of target to false --unlock the field if it is locked
end if
if selection is not empty then --something was selected
put selection into SelectedWord
if space is in SelectedWord then --the user selected more than 1 word
click at loc of target --so we will clear the selection
exit mousewithin --and exit to wait for another selection
end if
--
--this is the section where you do something with the selection
--You can bring up a pop up note or you can go to another card.
--
put the selection
end if
end if
end mousewithin
-- handlers below for demo purposes only
on openCard
put "This version was copied from the Developer Stack 1.1" & ¬
return & return & ¬
"DOUBLE CLICK on any word in this field for an example" & ¬
return & return & ¬
"This trick lets the user double click on a word to" && ¬
"activate a hypertext link." & return & ¬
"The 'on mousewithin' script goes into the target field." & return & ¬
"Look at the script of the 'syntax' fields on the" && ¬
"XCMD or XFCN card for a" & return & ¬
"varation of this method." into fld "Comment"
end openCard
on closeCard
if the icon of bg btn id 38 is "12920" then
repeat with x = 1 to number of flds
set the lockText of fld x to true
end repeat
end if
end closeCard
Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
| Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars. | This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you. |
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.