Re: Go Stack
Phil Davis wrote: > > It looks like every reference to an object has to be a long reference. I > > was incorrectly using short references before. > > You might be able to set "the defaultStack" to the target stack and then use short >references - but I don't know for sure. Whaddya know. You can. :) -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go Stack
- Original Message - From: "J. Landman Gay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 9:15 PM Subject: Re: Go Stack > I wrote: > > > > I think I went astray > > because I've done the stack-on-the-web thing in HC and I was looking for > > similar behavior in MC, but I guess it isn't going to work. > > Whoa. I accidentally did it -- it does work. :) Very cool. I didn't have > all the pieces together exactly right at any given time before. > > It looks like every reference to an object has to be a long reference. I > was incorrectly using short references before. You might be able to set "the defaultStack" to the target stack and then use short references - but I don't know for sure. Phil > Anyway, I ended up with this: > > on startup > put $QUERY_STRING into theTerm > put "" into buffer > if theTerm = "" then > put "No query submitted." after buffer > else > start using "mystack.mc" > repeat with x = 1 to the number of cds of stack "mystack" > get fld "title" of cd x of stack "mystack" > if it contains theTerm > then put it &" - " & fld "author" of cd x \ > of stack "mystack" & cr after buffer > end repeat > stop using "mystack.mc" > end if > if buffer = "" then put "No titles found." into buffer > put "Content-Type: text/plain" & cr > put "Content-Length:" && the length of buffer & cr & cr > put buffer > end startup > > So you have to loop through everything, checking each field and card, > one at a time. The stack is fairly small so it doesn't take too long. > Now I have to add in looping through all the fields, but now that the > foundation is there that shouldn't be too hard. > > Thanks guys. > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard > ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go Stack
I wrote: > > I think I went astray > because I've done the stack-on-the-web thing in HC and I was looking for > similar behavior in MC, but I guess it isn't going to work. Whoa. I accidentally did it -- it does work. :) Very cool. I didn't have all the pieces together exactly right at any given time before. It looks like every reference to an object has to be a long reference. I was incorrectly using short references before. Anyway, I ended up with this: on startup put $QUERY_STRING into theTerm put "" into buffer if theTerm = "" then put "No query submitted." after buffer else start using "mystack.mc" repeat with x = 1 to the number of cds of stack "mystack" get fld "title" of cd x of stack "mystack" if it contains theTerm then put it &" - " & fld "author" of cd x \ of stack "mystack" & cr after buffer end repeat stop using "mystack.mc" end if if buffer = "" then put "No titles found." into buffer put "Content-Type: text/plain" & cr put "Content-Length:" && the length of buffer & cr & cr put buffer end startup So you have to loop through everything, checking each field and card, one at a time. The stack is fairly small so it doesn't take too long. Now I have to add in looping through all the fields, but now that the foundation is there that shouldn't be too hard. Thanks guys. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go Stack
"J. Landman Gay" wrote: > > Richard MacLemale wrote: > > > > > But I still can't get a stack to search its own fields. Are field > > > searches a GUI thing that is impossible in an mt script? > > > > I think that IS the case. So you probably have to work around that by using > > offset or something else. > > It would probably be too hard to search a stack's fields using offset, > since there is no way to easily tell where a field begins and ends in > the raw data file. That kind of shoots my idea of putting a stack up on > the web the way you can with HC cgis, I guess. I think I went astray > because I've done the stack-on-the-web thing in HC and I was looking for > similar behavior in MC, but I guess it isn't going to work. It isn't going to work that way, but you're flexible (aren't you;-). You can most likely achieve the same thing using text files: have the cgi read/write text files. On the other hand if you prefer the HC/appleEvent approach you can do that in MC too exactly the same. > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard -- Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go Stack
Richard MacLemale wrote: > > > But I still can't get a stack to search its own fields. Are field > > searches a GUI thing that is impossible in an mt script? > > I think that IS the case. So you probably have to work around that by using > offset or something else. It would probably be too hard to search a stack's fields using offset, since there is no way to easily tell where a field begins and ends in the raw data file. That kind of shoots my idea of putting a stack up on the web the way you can with HC cgis, I guess. I think I went astray because I've done the stack-on-the-web thing in HC and I was looking for similar behavior in MC, but I guess it isn't going to work. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
Phil Davis wrote: > I'm guessing you can get the content of any container. I know you can get the >content of fields and the values of properties (custom or otherwise) that reside >anywhere in the target stack. I haven't been able to get the content of fields. All I get is an error. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
text editor(was: Go stack)
In case this might interest anyone, I'm using on Linux a text editor called Nedit (nedit.org) which also runs on OSX (might need to be compiled tho) which I found particularly good for mt scripts since you can configure it to execute a script after editing it without having to open the terminal. It can also be configured for colorizing the script, line number and many others. -- Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
"J. Landman Gay" wrote: > > andu wrote: > > > > "J. Landman Gay" wrote: > > > > > But I still can't get a stack to search its own fields. Are field > > > searches a GUI thing that is impossible in an mt script? > > > > yes. > > I see. I would have thought that MC would recognize where the fields > were and their text, even if it wasn't bothering with the UI. It would > be nice to be able to put a stack on a server and work with its > contents. It sounds like any stack on the server would be nothing more > than a script repository, right? The content of the stack itself is inaccessible? You can probably use custom properties and besides, benefit from the debugger while creating the scripts. I'm sure there are other benefits but although I used cgi scripts a lot lately I didn't have time to experiment with stacks too much. > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard -- Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
>andu wrote: >> >> "J. Landman Gay" wrote: >> >> > But I still can't get a stack to search its own fields. Are field >> > searches a GUI thing that is impossible in an mt script? >> >> yes. > >I see. I would have thought that MC would recognize where the fields >were and their text, even if it wasn't bothering with the UI. It would >be nice to be able to put a stack on a server and work with its >contents. It sounds like any stack on the server would be nothing more >than a script repository, right? The content of the stack itself is >inaccessible? What about custom properties? > >-- >Jacqueline Landman Gay | [EMAIL PROTECTED] >HyperActive Software | http://www.hyperactivesw.com >___ >metacard mailing list >[EMAIL PROTECTED] >http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
- Original Message - From: "J. Landman Gay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 6:29 PM Subject: Re: Go stack > Phil Davis wrote: > > > BUT: a script CAN "use" a stack! It can also get stuff from a stack that has not >been opened. > > Thanks. What kind of stuff can it get? I'm guessing you can get the content of any container. I know you can get the content of fields and the values of properties (custom or otherwise) that reside anywhere in the target stack. Haven't tried much else. Phil > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go Stack
> But I still can't get a stack to search its own fields. Are field > searches a GUI thing that is impossible in an mt script? I think that IS the case. So you probably have to work around that by using offset or something else. One other thing that doesn't apply to your problem right now but you may run into... when darwin mc runs, it runs as whoever calls it. So if you call it from a web browser, it's run as the user "www" (I think.) This can cause serious problems if you want mc to, for example, write to directories that you DON'T want anyone else to write to. There is a way to set a metacard script (.mt file) to run AS root. It's chmod a+s myscript.mt (when logged in as root.) Then anytime the script runs, it runs with root permissions so it can do pretty much anything. This is, of course, a security hole, but it's probably better than making "www" the owner of a bunch of folders... :) Richard MacLemale Instructional Technology Specialist James W. Mitchell High School http://mitchellonline.pasco.k12.fl.us ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
Phil Davis wrote: > BUT: a script CAN "use" a stack! It can also get stuff from a stack that has not >been opened. Thanks. What kind of stuff can it get? -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
andu wrote: > > "J. Landman Gay" wrote: > > > But I still can't get a stack to search its own fields. Are field > > searches a GUI thing that is impossible in an mt script? > > yes. I see. I would have thought that MC would recognize where the fields were and their text, even if it wasn't bothering with the UI. It would be nice to be able to put a stack on a server and work with its contents. It sounds like any stack on the server would be nothing more than a script repository, right? The content of the stack itself is inaccessible? -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
"J. Landman Gay" wrote: > > andu wrote: > > > > Someting like this works: > > Whoops, I got it to work. Sorry. I found a typo. > > But I still can't get a stack to search its own fields. Are field > searches a GUI thing that is impossible in an mt script? yes. > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard -- Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
"J. Landman Gay" wrote: > > I have successfully installed darwin mc in OS X and have the echo.mt > script working. Now I'm trying to get an mt script to go to a stack and > find some information in it. The script fails at the "go" command. If I > change the script to say "there is a stack 'mystack.mc'" it returns > "true", so it knows the stack is there. But "go stack 'mystack.mc'" > doesn't work. Is it possible to use "go" in an mt script? > > Also, are there any other rules that one should keep in mind when > accessing stacks from a MetaCard cgi? Anything else that fails or needs > to be done differently? Someting like this works: on startup put 1 into z put 2 into f start using "data" getData z,f put the result into tResult stop using "data" put tResult end startup Stack "data" (data.mc same directory with the script) script: on getData x,y return x+1 && y+2 end getData > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard -- Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Go stack
Hi Jacque, I think you might be running into the "no-GUI-for-scripts" issue. As I understand it from my reverse-engineered point of view (subject to change), MC knows that a script isn't a stack, so it doesn't 'activate' GUI support when running one. So if a script tries to invoke MC GUI support (aka "open a stack"), MC doesn't comply. In other words, a script apparently can't open a stack because the stack has GUI aspects that aren't supported by MC during script execution. (Try checking 'the result' after the script's "go" command - there may be an error msg from MC.) BUT: a script CAN "use" a stack! It can also get stuff from a stack that has not been opened. And if I remember correctly, the scripts in a non-opened, non-libraried stack can also be run by an outside MC entity. You just send whatever message to the [control or card in the] target stack. The stack gets loaded into memory but never opened. So maybe if you rethink your approach slightly, you can still get to where you want to go - without "going" there. :o) Phil - Original Message - From: "J. Landman Gay" <[EMAIL PROTECTED]> To: "metacard list" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 3:15 PM Subject: Go stack > I have successfully installed darwin mc in OS X and have the echo.mt > script working. Now I'm trying to get an mt script to go to a stack and > find some information in it. The script fails at the "go" command. If I > change the script to say "there is a stack 'mystack.mc'" it returns > "true", so it knows the stack is there. But "go stack 'mystack.mc'" > doesn't work. Is it possible to use "go" in an mt script? > > Also, are there any other rules that one should keep in mind when > accessing stacks from a MetaCard cgi? Anything else that fails or needs > to be done differently? > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Go stack
I have successfully installed darwin mc in OS X and have the echo.mt script working. Now I'm trying to get an mt script to go to a stack and find some information in it. The script fails at the "go" command. If I change the script to say "there is a stack 'mystack.mc'" it returns "true", so it knows the stack is there. But "go stack 'mystack.mc'" doesn't work. Is it possible to use "go" in an mt script? Also, are there any other rules that one should keep in mind when accessing stacks from a MetaCard cgi? Anything else that fails or needs to be done differently? -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: open or go Stack with visual effect ?
Rolf Kocherhans wrote: > > 1st. Is it possible to open or go to a Stack with a visual effect ? > How do I have to script it ? visual dissolve go card X > > 2nd. Are visual effects displayed the same on Mac's (with QuickTime) > and Windows (without QuickTime). Not the ones that require QT though I'm not an expert on this. > > Cheers > Rolf > Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
open or go Stack with visual effect ?
1st. Is it possible to open or go to a Stack with a visual effect ? How do I have to script it ? 2nd. Are visual effects displayed the same on Mac's (with QuickTime) and Windows (without QuickTime). Cheers Rolf Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: go stack
>wrote an autorun.inf file with the lines: > [autorun] > "OPEN=autostart.exe" > >using SimpleText. I place the .inf file at the root of the WinDoz side of >the CD and the autostart.exe standalone at the root level as well. >It doesn't work. Hi, Try it without the " " Just : [autorun] OPEN=autostart.exe >When I open the inf file on the widows the file >consists of a single line > >[autorun] "OPEN=autostart.exe" > >with black square blocks between the [autorun] and the >"OPEN=autostart.exe" and >immediately following the "OPEN=autostart.exe". If you can test your app on a PC, simply prepare your .inf file on it. with notepad for example, it is more secure than with simple text on mac. --- Beruvin Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: go stack
> >Actually I have two questions and, of course, two requests for help. :) >I have a "go stack it" line in a standalone. "It" refers to another >standalone. It doesn't go to the second standalone. If the "it variable" points >to a stack which hasn't been converted to a standalone it works. Is this normal? A standalone is an application not a stack anymore, try launching it. >Second, I'm trying to create an autostart hybrid CD using Toast on a Mac. I >wrote an autorun.inf file with the lines: >[autorun] >"OPEN=autostart.exe" > >using SimpleText. I place the .inf file at the root of the WinDoz side of the CD >and the autostart.exe standalone at the root level as well. It doesn't work. When >I double-click the autostart.exe standalone from within My Computer the >standalone runs just fine. When I open the inf file on the widows the file >consists of a single line > >[autorun] "OPEN=autostart.exe" > >with black square blocks between the [autorun] and the "OPEN=autostart.exe" and >immediately following the "OPEN=autostart.exe". I assume the blocks are in fact >return characters and so the OS must interpret the file as having two lines. Can >I write the inf file on the Mac using Simpletext or does it have to be written on >the windows side? Is the command "OPEN=autostart.exe" case sensitive? > >::: > >:: PLAN!! I'd rather be surprised. >:: F.A. (Rick) Rice, Instructor [EMAIL PROTECTED] >:: Div. of Sciences and Health Sciences Phone: (250) 828-5424 >:: The University College of the Cariboo Fax: (250) 828-5450 >:: 900 McGill Road >:: Box 3010 >:: Kamloops, BC >:: V2C 5N3 >::: > > > > >Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ >Info: http://www.xworlds.com/metacard/mailinglist.htm >Please send bug reports to <[EMAIL PROTECTED]>, not this list. > >. Regards, Andu __ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
go stack
Actually I have two questions and, of course, two requests for help. :) I have a "go stack it" line in a standalone. "It" refers to another standalone. It doesn't go to the second standalone. If the "it variable" points to a stack which hasn't been converted to a standalone it works. Is this normal? Second, I'm trying to create an autostart hybrid CD using Toast on a Mac. I wrote an autorun.inf file with the lines: [autorun] "OPEN=autostart.exe" using SimpleText. I place the .inf file at the root of the WinDoz side of the CD and the autostart.exe standalone at the root level as well. It doesn't work. When I double-click the autostart.exe standalone from within My Computer the standalone runs just fine. When I open the inf file on the widows the file consists of a single line [autorun] "OPEN=autostart.exe" with black square blocks between the [autorun] and the "OPEN=autostart.exe" and immediately following the "OPEN=autostart.exe". I assume the blocks are in fact return characters and so the OS must interpret the file as having two lines. Can I write the inf file on the Mac using Simpletext or does it have to be written on the windows side? Is the command "OPEN=autostart.exe" case sensitive? ::: :: PLAN!! I'd rather be surprised. :: F.A. (Rick) Rice, Instructor [EMAIL PROTECTED] :: Div. of Sciences and Health Sciences Phone: (250) 828-5424 :: The University College of the Cariboo Fax: (250) 828-5450 :: 900 McGill Road :: Box 3010 :: Kamloops, BC :: V2C 5N3 ::: Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.