MetaCard List Digest Thursday, October 12 2000 Volume 04 : Number 007 ---------------------------------------------------------------------- Date: Tue, 10 Oct 2000 11:14:09 -0400 From: Simon Lord <[EMAIL PROTECTED]> Subject: Intersecting Is there a way to get the point where two vector lines meet? I don't see how since I can only get the end points, but maybe there's some magic I don't know about. - -- Cheers, Simon Graphic Development: http://www.amigo-3.com - -------------------------------------------------- "The great discoveries in science are not punctuated by 'Eureka! I've found it!' but rather "Hmmm,that's funny...." Isaac Asimov ------------------------------ Date: Tue, 10 Oct 2000 10:22:29 -0500 From: Tereza Snyder <[EMAIL PROTECTED]> Subject: Re: tree? on 10/9/00 7:08 AM, David Bovill at [EMAIL PROTECTED] wrote: > I'd be really interested in this, as a lot of my scripting is based around > tree like data structures. > > If you are interested in this area I can send you a library of scripts that > implement a general purpose outliner. I view this as work in progress that > does the job as far as a visual interface goes, but would like to be able to > address such structures natively - in particular to be able to do thing like > search hierarchies/tree structures (ie along their branches rather than > linear searches). I'm currently working on an XML-parsing external for MetaCard with a view to storing user-preference data to exchange with other programs. I'm still groping my way and would love to see what you've done with scripts, and to contribute any insights I've won. Tereza . . ... ..... ACT AGAINST ENTROPY! ..... ... . . ------------------------------ Date: Tue, 10 Oct 2000 09:37:33 -0700 From: "Geoff Canyon" <[EMAIL PROTECTED]> Subject: Re: Post command examples/guidelines? on 10/9/00 3:52 PM, andu at [EMAIL PROTECTED] wrote: > More something like: > > put "http://www.myserver.com/FMPro into tUrl > put "-Lay=main&-format=search_results.htm&marked=Yes" into tPost > post tPost to url tUrl I've successfully used the post command now, but only with pre-built urls. I seem to be doing something wrong in translating the forms to urls. The likely culprit (to me) is the submit button: any ideas how you translate that into a url? Thanks, Geoff ------------------------------ Date: Tue, 10 Oct 2000 18:41:46 +0200 From: Klaus Major <[EMAIL PROTECTED]> Subject: Re: Default Windows System Path? Hi Scott, >... to determine the default path to the main Windows directory? > > And I'm wondering if > "C:/WINDOWS/" might be incorrect for Windows2000. I've gotten a report from > a tester who claims to getting a "file not found" error, apparently from a > script that assumes "C:/WINDOWS/" is the default directory for a file I need > to access. > > Thanks for any suggestions. > > Scott check the entry about "the tempname". You can easily extract the wanted directory from that. Hope this helps. Regards Klaus Major ------------------------------ Date: Tue, 10 Oct 2000 17:54:44 +0100 From: Gary Rathbone <[EMAIL PROTECTED]> Subject: Re: Intersecting I think the method would go something like this: If you can get the endpoints then for line one x1,y1 and x2,y2 for line two x3,y3 and x4,y4 The formula for a line is y=mx+c where m is the gradient and c the point where the line crosses the y axis i) determine the gradient for each of the two lineseg m1=(x1-x2)/(y1-y2) ii) place the value for m in the line equation and set y to 0, solving c iii) you should now have an equation for each line iv) where they intersect x and y are equal, so solve m(line1)x+c(line1)=m(line2)x+c(line2) giving an x value. v) replace the x value in one of the line formulas giving a value for y vi) OPTIONAL - check the x value in iv) in the other line equation which should give the same y result. vii) you should now have an x,y value which is the point of intersection. Gary Rathbone on 10/10/00 16:14, Simon Lord at [EMAIL PROTECTED] wrote: > Is there a way to get the point where two vector lines meet? I don't see > how since I can only get the end points, but maybe there's some magic I > don't know about. > > -- > > Cheers, > Simon > > Graphic Development: http://www.amigo-3.com > > -------------------------------------------------- > "The great discoveries in science are not punctuated by 'Eureka! I've found > it!' but rather "Hmmm,that's funny...." Isaac Asimov > > ------------------------------ Date: Tue, 10 Oct 2000 10:39:33 -0700 From: Scott Rossi <[EMAIL PROTECTED]> Subject: Can't Call a Function from Msg Box? I can't call a function contained in the script of a stack from the msg box ("error in function handler"), but any object within the stack can call the same function without problem. Is this standard behavior for the msg box? Regards, Scott _____________________________________________________________________ Scott Rossi Tactile Media - Multimedia & Design Creative Director Email: [EMAIL PROTECTED] Web: www.tactilemedia.com ------------------------------ Date: Tue, 10 Oct 2000 11:03:18 -0700 From: Phil Davis <[EMAIL PROTECTED]> Subject: Re: Can't Call a Function from Msg Box? Try clicking on the stack containing the function (to make it the default) immediately before using the msg box. I find I have to do that sometimes when I have multiple stacks open. Phil Scott Rossi wrote: > > I can't call a function contained in the script of a stack from the msg box > ("error in function handler"), but any object within the stack can call the > same function without problem. Is this standard behavior for the msg box? > > Regards, > > Scott > > _____________________________________________________________________ > Scott Rossi Tactile Media - Multimedia & Design > Creative Director Email: [EMAIL PROTECTED] > Web: www.tactilemedia.com ------------------------------ Date: Tue, 10 Oct 2000 19:05:32 +0100 From: Peter Reid <[EMAIL PROTECTED]> Subject: Re: Can't Call a Function from Msg Box? >I can't call a function contained in the script of a stack from the msg box >("error in function handler"), but any object within the stack can call the >same function without problem. Is this standard behavior for the msg box? > >Regards, > >Scott It works for me as long as the stack is the active (topLevel) stack and you just type the function call, not put etc. e.g. myFunc(param1,param2) not put myFunc(param1,param2) Does this help? Cheers Peter - -- - -------------------------------------------------------- Peter Reid Reid-IT Limited, Loughborough, Leics., UK Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576 E-mail: [EMAIL PROTECTED] Web: http://www.reidit.co.uk ------------------------------ Date: Tue, 10 Oct 2000 11:28:38 -0700 From: Scott Rossi <[EMAIL PROTECTED]> Subject: Re: Can't Call a Function from Msg Box? Recently, Peter Reid wrote: >> I can't call a function contained in the script of a stack from the msg box >> ("error in function handler"), but any object within the stack can call the >> same function without problem. Is this standard behavior for the msg box? > It works for me as long as the stack is the active (topLevel) stack > and you just type the function call, not put etc. I guess my problem is, you can get basically anything from the msg box using "this stack". I can see how "answer myFunction()" in the msg box might be somewhat ambiguous since it doesn't know you want to reference an open stack. Would it make sense to say something like: answer myFunction() via this stack or answer myFunction() using this stack? Regards, Scott _____________________________________________________________________ Scott Rossi Tactile Media - Multimedia & Design Creative Director Email: [EMAIL PROTECTED] Web: www.tactilemedia.com ------------------------------ Date: Tue, 10 Oct 2000 15:43:38 -0500 From: Tariel Gogoberidze <[EMAIL PROTECTED]> Subject: Re: Post command examples/guidelines? >Does anyone have examples or instructions on how to use the post command in >MetaCard that they'd be willing to share? I'm having trouble figuring out >how to translate a form into a successful post. > > >If I have a simple form like this: > ><FORM ACTION="FMPro" METHOD="post"> ><INPUT TYPE="hidden" NAME="-DB" VALUE="pages"> ><INPUT TYPE="hidden" NAME="-Lay" VALUE="main"> ><INPUT TYPE="hidden" NAME="-format" VALUE="search_results.htm"> ><INPUT TYPE="hidden" NAME=marked VALUE=Yes> ><INPUT TYPE="submit" NAME="-Find" VALUE="Show Marked"> ></FORM> > >would that translate to something like: > >put "http://www.myserver.com/FMPro?-DB=pages&" into theURL >put "-Lay=main&-format=search_results.htm&marked=Yes" after theURL >post "-Find" to url theURL >put it --this is what comes back from the server Try: on mouseUp put "http://www.myserver.com/FMPro" into theURL post "-db=pages&-lay=main&-Format=search_results.htm&Marked=yes&-Search" to theURL if the result is not empty then put the result else put urldecode (it) -- You can also use put command put "http://www.myserver.com/FMPro" into theURL put theURL&"?-db=pages&-lay=main&-Format=search_results.htm&Marked=yes&-Search" into MyVariable -- note: don't forget question mark before -db put url MyVariable into fld 1 --And finally for laod command (here you have most control) put "http://www.myserver.com/FMPro" into theURL put theURL&"?-db=pages&-lay=main&-Format=search_results.htm&Marked=yes&-Search" into MyVariable load MyVariable put the ticks into a send "updateme" && quote & MyVariable & quote to me -- note: with latest MC beta you probably can use wait for messages instead end mouseUp on updateme MyVariable put urlStatus(MyVariable) into stat if stat contains "error" or stat contains "not found" then answer error "Error downloading URL"&cr & stat titled "Download Failure" exit to MetaCard end if if stat contains "cached" then put url MyVariable into fld 1 unload url MyVariable else if the (ticks - a) < 3000 then send "updateme" && quote & MyVariable & quote to me in 200 milliseconds else answer "timed out " end if end if end updateme Best regards Tariel Gogoberidze ------------------------------ Date: Tue, 10 Oct 2000 17:38:28 -0400 (EDT) From: andu <[EMAIL PROTECTED]> Subject: Re: Post command examples/guidelines? > >on 10/9/00 3:52 PM, andu at [EMAIL PROTECTED] wrote: > >> More something like: >> >> put "http://www.myserver.com/FMPro into tUrl >> put "-Lay=main&-format=search_results.htm&marked=Yes" into tPost >> post tPost to url tUrl > >I've successfully used the post command now, but only with pre-built urls. I >seem to be doing something wrong in translating the forms to urls. The >likely culprit (to me) is the submit button: any ideas how you translate >that into a url? It would help you greatly to use at least for test purpose, a mc web serve just so that you can output what the server receives at its end. You can easily convert mchttpd from www.cloud9.net/~undo to do that: the idea is to replace GET with POST in the script and put the result. > >Thanks, > >Geoff > > >. Regards, Andu _______________________ [EMAIL PROTECTED] ------------------------------ Date: Tue, 10 Oct 2000 16:23:46 -0700 From: Scott Rossi <[EMAIL PROTECTED]> Subject: Re: Default Windows System Path? Recently, Klaus Major wrote: >> And I'm wondering if >> "C:/WINDOWS/" might be incorrect for Windows2000. I've gotten a report from >> a tester who claims to getting a "file not found" error, apparently from a >> script that assumes "C:/WINDOWS/" is the default directory for a file I need >> to access. > check the entry about "the tempname". > > You can easily extract the wanted directory from that. Thanks for the above. I think I can use the tempName function to get the active drive, but as far as the main Windows directory, I'll have to assume it's always "C:/WINDOWS". Checking the tempName on Win95 yields this: c:\windows\temp\tmp1 but Windows2000 yields this: c:\docume~1\default\locals~1\temp\tmp1 Perhaps this is expected behavior, but it makes the pain in my head grow even more when having to deal with Windows OS... Regards, Scott _____________________________________________________________________ Scott Rossi Tactile Media - Multimedia & Design Creative Director Email: [EMAIL PROTECTED] Web: www.tactilemedia.com ------------------------------ Date: Wed, 11 Oct 2000 10:47:11 CST From: "Monte Goulding" <[EMAIL PROTECTED]> Subject: Graphing and mouse postition Hi it's me again I'm just wondering if anyone has developed graphing groups like scatterplots, bar, column, pie, line etc. I am thinking of developing standard charting groups that I can just set the properties of but is someone else has already done this then I can't see the point in reinventing the wheel. On that note I would be interested in anyones comments on having an online searchable function/handler database. This kind of tool would be my best friend. There are plenty of companied that we can get free server space from and I think I can do the web. Also has anyone had any experienc recording mousemovements. I am currently recording using the MouseMove handler and getting the long seconds at the time but I would like to be able to specify the exact time to record the mouseLoc. The send handler only adds amount of time to the current time when sending. Could I actually set teh pending messages for actual time. The other thing was are event handlers like mouseMove handled before pending messages even if doing them will mean that the pending message should be sent before the mouseMove handler can complete. Best regards to all Monte Goulding _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. ------------------------------ Date: Tue, 10 Oct 2000 21:19:38 -0400 From: Simon Lord <[EMAIL PROTECTED]> Subject: Moving Here's an ultra simple script: on mouseDown move grc "ball" to the points of grc "theLine" in 30 ticks without waiting if intersect(grc "ball", grc "gAspectPos") then beep exit to metacard end if end mouseDown For whatever reason, even when the two graphics are *obviously* overlapping, the intersection is never detected. Any ideas? - -- Cheers, Simon Graphic Development: http://www.amigo-3.com - -------------------------------------------------- "The great discoveries in science are not punctuated by 'Eureka! I've found it!' but rather "Hmmm,that's funny...." Isaac Asimov ------------------------------ Date: Tue, 10 Oct 2000 19:40:32 -0700 From: Scott Rossi <[EMAIL PROTECTED]> Subject: Re: Moving Recently, Simon Lord wrote: > Here's an ultra simple script: > > on mouseDown > move grc "ball" to the points of grc "theLine" in 30 ticks without waiting > > if intersect(grc "ball", grc "gAspectPos") then > beep > exit to metacard > end if > end mouseDown > > > For whatever reason, even when the two graphics are *obviously* overlapping, > the intersection is never detected. > > Any ideas? Yes -- you're only checking the intersect once in your script. You need to repeatedly check for any intersections. Try the following (tested and works on my end): on mouseUp move grc "ball" to the points of grc "theLine" in 30 ticks without waiting checkIntersect end mouseUp on checkIntersect if intersect(grc "ball", grc "gAspectPos") then beep stop moving grc ball exit to metacard end if send checkIntersect to me in 50 milliseconds end checkIntersect - ----- FWIW, I've been experimenting with a simple but also fairly capable sprite handling system, which allows sprite objects to follow predefined behaviors, all based on repeating "send in" messages. To date I've tested nine asynchronously moving bitmap sprites along with the mouse-controlled sprite, and the results are phenomenal (MacOS). On-screen movement is smooth and virtually jitter-free. Scott Raney & company have really done some great stuff with the move command. In any event, I'll either post the "game" as open source or try to make a somewhat customizable version for folks who want to experiment. Regards, Scott __________________________________________________________________ Scott Rossi Tactile Media - Multimedia & Design Creative Director Email: [EMAIL PROTECTED] Web: www.tactilemedia.com ------------------------------ Date: Wed, 11 Oct 2000 15:15:13 +0900 From: George Wade <[EMAIL PROTECTED]> Subject: Organising flash cards? I'm starting the design of some "flash card" like cards. That is there will be Q & A or prompt and response or idea -> better idea fields. Several families of cards with various templates. Data and calculation cards or fields to help decide how often and when to show the cards, automatically, again for review and updating. I got as far as a card with a Q field; an 'A' field that is hidden on start-up and a button that is labeled 'Show the Answer' that surprised me by doing what it was told to do. Next step: proper visual and template design with all the fields and buttons. Also running through the 'Help' stacks that came with MetaCard. They are getting MindMapped so that they make some sense to me. What properties and concepts are different between having (many) separate stacks for each kind of template and learning / development project - compared to having a few giant bloody stacks with as many 'Backgrounds' or 'Groups' as I feel like. I have a CD-RW that looks ok for giant bloody stacks. Platform - Mac PPC. Some gullible friend in China will be converting stacks to Windows for language studies. I don't have any headache herbs, they do. George, kochi, Japan ------------------------------ Date: Wed, 11 Oct 2000 12:43:47 +0100 From: David Bovill <[EMAIL PROTECTED]> Subject: Re: Organising flash cards? > > What properties and concepts are different between having (many) separate > stacks for each kind of template and learning / development project - > compared to having a few giant bloody stacks with as many 'Backgrounds' or > 'Groups' as I feel like. > Problem with "giant bloody stacks" is that they take a "bloody long time' to load (into memory the first time it is opened). Once opened you should be able to jump around OK, but there are memory problems on the Mac platform due to that platforms memory management (pre OSX). Usual advice is to break projects into manageable chunks, and load them as needed. > I have a CD-RW that looks ok for giant bloody stacks. > > Platform - Mac PPC. Some gullible friend in China will be converting stacks > to Windows for language studies. I don't have any headache herbs, they do. > > George, > kochi, > Japan > ------------------------------ Date: Wed, 11 Oct 2000 12:48:24 +0100 From: David Bovill <[EMAIL PROTECTED]> Subject: Re: Can't Call a Function from Msg Box? I think the message box just isn't scripted as well as it could be. At a guess this could be patched - don't know if anyone has done this but if they have let me know? > From: Scott Rossi <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Tue, 10 Oct 2000 11:28:38 -0700 > To: <[EMAIL PROTECTED]> > Subject: Re: Can't Call a Function from Msg Box? > > Recently, Peter Reid wrote: > >>> I can't call a function contained in the script of a stack from the msg box >>> ("error in function handler"), but any object within the stack can call the >>> same function without problem. Is this standard behavior for the msg box? > >> It works for me as long as the stack is the active (topLevel) stack >> and you just type the function call, not put etc. > > I guess my problem is, you can get basically anything from the msg box using > "this stack". I can see how "answer myFunction()" in the msg box might be > somewhat ambiguous since it doesn't know you want to reference an open > stack. Would it make sense to say something like: > > answer myFunction() via this stack > > or > > answer myFunction() using this stack? > > Regards, > > Scott > > _____________________________________________________________________ > Scott Rossi Tactile Media - Multimedia & Design > Creative Director Email: [EMAIL PROTECTED] > Web: www.tactilemedia.com ------------------------------ Date: Wed, 11 Oct 2000 08:18:28 -0400 From: Simon Lord <[EMAIL PROTECTED]> Subject: Re: Organising flash cards? My CDROM projects usually load the audio and images externally from the stack. That is to say I have an Audio and Images directory at the same directory level as my standalone stack. This way the stack loads quickly with only the needed images to start. It also turned out to be a timesaver doing it this way, the project has since been updated and the interface of the software being demonstrated had changed completely - TWICE! But since all the images were stored externally all I had to do was change the images and the stack continued on its merry way (images were all cropped to match existing ones and although the interface *style* changed the location of buttons etc did not). I'll never store the audio and images *into* a stack again, luckily I did it right the first time and realized how wise that decision was after the fact. You can order a free sample of the CDROM here: (make sure to get the entire link which wraps on two lines.) http://www.discreet.com/SITE/softdown.nsf/Software+Download+Request?OpenForm &sel=graphic - -- Cheers, Simon Graphic Development: http://www.amigo-3.com - -------------------------------------------------- "The great discoveries in science are not punctuated by 'Eureka! I've found it!' but rather "Hmmm,that's funny...." Isaac Asimov > From: David Bovill <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Wed, 11 Oct 2000 12:43:47 +0100 > To: <[EMAIL PROTECTED]> > Subject: Re: Organising flash cards? > >> >> What properties and concepts are different between having (many) separate >> stacks for each kind of template and learning / development project - >> compared to having a few giant bloody stacks with as many 'Backgrounds' or >> 'Groups' as I feel like. >> > > Problem with "giant bloody stacks" is that they take a "bloody long time' to > load (into memory the first time it is opened). Once opened you should be > able to jump around OK, but there are memory problems on the Mac platform > due to that platforms memory management (pre OSX). > > Usual advice is to break projects into manageable chunks, and load them as > needed. > >> I have a CD-RW that looks ok for giant bloody stacks. >> >> Platform - Mac PPC. Some gullible friend in China will be converting stacks >> to Windows for language studies. I don't have any headache herbs, they do. >> >> George, >> kochi, >> Japan >> > ------------------------------ Date: Wed, 11 Oct 2000 13:29:01 +0100 From: David Bovill <[EMAIL PROTECTED]> Subject: XML parsing... Anyone out there who knows anything about this. I have some scripts, but I want to get a general purpose parser the goes through all the tags, and does some processing, and i'm not sure I have got it right... Is there anyone working on this are, who would be interested in using/advising on the creation of a general purpose XML library? ------------------------------ Date: Wed, 11 Oct 2000 09:10:07 -0400 From: Serge Grenier <[EMAIL PROTECTED]> Subject: Re: Organising flash cards? David Bovill wrote: > > > What properties and concepts are different between having (many) separate > > stacks for each kind of template and learning / development project - > > compared to having a few giant bloody stacks with as many 'Backgrounds' or > > 'Groups' as I feel like. > > Problem with "giant bloody stacks" is that they take a "bloody long time' to > load (into memory the first time it is opened). Once opened you should be > able to jump around OK, but there are memory problems on the Mac platform > due to that platforms memory management (pre OSX). Big stacks also take a lot of time to save. This doesn't matter if it is a stack that the user can't change (like a game or tutorial), but it becomes annoying when it is a stack where the user enters new data all the time, like business software... Serge Grenier ------------------------------ Date: Wed, 11 Oct 2000 09:23:51 -0400 From: Serge Grenier <[EMAIL PROTECTED]> Subject: Re: Can't Call a Function from Msg Box? David Bovill wrote: > > I think the message box just isn't scripted as well as it could be. At a > guess this could be patched - don't know if anyone has done this but if they > have let me know? It sometimes looks as if the message box had climbed higher in the message path than the opened stacks instead of staying at the bottom of the pile. Then, when you hit return, the opened stacks never get a chance to intercept your message and Metacard doesn't know what to do with them so it is simply ignored... Serge Grenier ------------------------------ Date: Wed, 11 Oct 2000 11:04:00 -0500 From: Tereza Snyder <[EMAIL PROTECTED]> Subject: test - ignore please +++++ Tereza Snyder +++++ Software Developer +++++ Attainment Company, Inc. +++++ <www.attainmentcompany.com> +++++ 608.845.7880 ------------------------------ End of MetaCard List Digest V4 #7 *********************************
