Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!rice!uupsi!sunic!sics.se!ollef From: ollef@sics.se (Olle Furberg) Newsgroups: comp.sys.mac.hypercard Subject: Re: fields script Keywords: field, script Message-ID: <1990Oct29.002315.3491@sics.se> Date: 29 Oct 90 00:23:15 GMT References: <485@caslon.cs.arizona.edu> Sender: news@sics.se Organization: Swedish Institute of Computer Science, Kista Lines: 46 In <485@caslon.cs.arizona.edu> musa@cs.arizona.edu (Musa J. Jafar) writes: OK here we go, note that there probably a lot of errors in the scripts below, but the main ideas are (hopefully) right. >Till now I can not find a reason why we need field scripts. >I would like some one to give me an example if possible? A simple, but very common usage of fld scripts: If a user selects/clicks on a word in the field, the script could do something to give some information to the user about that word. In HC 2.0 this hypertext capability is extended by "Hot Text" and "Group text style". In this way you could put the following script into the fld: on mouseup put the clickedtext into TheString end mouseup In HC 1.* you could define clickedtext by a HT-script but it's a bit slow. You could argue for putting this script into the cd script: OK, but then you will end up with a very, very long and ungraspable cd script. >how to make HC load the next word into the next line >while maintaining the values in the previous lines of the put "MyDisk:OneOfMyFolders:YetAnotherFolder:myfile" into filename open file filename put 1 into i repeat for ever read from file filename until space if it is empty then exit repeat put it into line i of fld myfield put i+1 into i end repeat >file to be loaded is not in the HC folder. >I mean that the file is on the drive. open file "MyDisk:OneOfMyFolders:YetAnotherFolder:myfile" >thanks. Y're welcome