Re: urling a font file

2002-03-19 Thread Mark Talluto


On Tuesday, March 19, 2002, at 10:27 PM, Scott Rossi wrote:

> Recently, Mark Talluto wrote:
>
>> I am using the put "binfile://path to font" into lFontFile  method.  
>> The
>> problem is that nothing is brought in.  Yet other types of files were
>> successfully brought in.  Can anyone think of a reason why a font file
>> can not be imported?
>>
>> I tried dropping the font file into bbedit and did not show any data
>> either.  Doing this with a mc stack for example showed the data in the
>> file.
>
> I'll guess that your font information is stored in the resource fork of 
> your
> file, which also may contain no data in the data fork.  If so, you'll 
> need
> to copy the resource information from your source file into your
> destinations file, something like "resfile://path to font".
>
> Regards,
>
> Scott Rossi
> Creative Director

Thanks Scott!  That did the trick.  I can see the data in the file now.  
After that I wrote it back out by creating a dummy file that was empty.  
Then writing the resource fork back to the dummy file.  Set the type and 
creator codes finished it up.  Gotta luv MC and the very helpful list 
members.

-Mark Talluto

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: urling a font file

2002-03-19 Thread Scott Rossi

Recently, Mark Talluto wrote:

> I am using the put "binfile://path to font" into lFontFile  method.  The
> problem is that nothing is brought in.  Yet other types of files were
> successfully brought in.  Can anyone think of a reason why a font file
> can not be imported?
> 
> I tried dropping the font file into bbedit and did not show any data
> either.  Doing this with a mc stack for example showed the data in the
> file.

I'll guess that your font information is stored in the resource fork of your
file, which also may contain no data in the data fork.  If so, you'll need
to copy the resource information from your source file into your
destinations file, something like "resfile://path to font".

Regards,

Scott Rossi
Creative Director

Tactile Media, Multimedia & Design
Email: [EMAIL PROTECTED]
Web: www.tactilemedia.com

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Go Stack

2002-03-19 Thread J. Landman Gay

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



urling a font file

2002-03-19 Thread Mark Talluto

Hello out there.  I am creating a simple installer that will copy over 
fonts from a folder to the fonts folder on OS 10.1.3.

I am using the put "binfile://path to font" into lFontFile  method.  The 
problem is that nothing is brought in.  Yet other types of files were 
successfully brought in.  Can anyone think of a reason why a font file 
can not be imported?

I tried dropping the font file into bbedit and did not show any data 
either.  Doing this with a mc stack for example showed the data in the 
file.

Any help on this would be greatly appreciated.

-Mark Talluto

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Go Stack

2002-03-19 Thread Phil Davis

- 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

2002-03-19 Thread J. Landman Gay

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

2002-03-19 Thread andu

"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

2002-03-19 Thread J. Landman Gay

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: Temporary picts

2002-03-19 Thread Ken Ray

Shari,

MetaCard has good graphics handling, however it can be a pain to have to
redo a stack that was already done once.
Keep in mind that creating 100 graphics and MetaCard and manipulating them
is a lot faster than trying to do the same thing in HyperCard.
I understand why you may not want to change this over to MetaCard, however
you may find that later on it will be worthwhile to do so in order to gain
cross-platform support and more capabilities.

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
- Original Message -
From: "Shari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 7:10 AM
Subject: Re: Temporary picts


> >if you are importing custom icons from HC,
> >they will wind up in their own Stack BackGround.
> >
> >Go to Edit BackGrounds and click on "HC Icons" in
> >the Stack Backgrounds window right below the Card
> >Groups window.
>
> No, haven't imported anything.  But I will be updating several
> programs soon that were built in HC, and I need to determine which
> ones I can port to MC without losing any of the goodies, and without
> spending a lot of time with the transition.  Apparently several of
> them will need to remain in HC, as MC cannot easily handle some of
> the things HC does with graphics and sounds.
>
> My programs rely heavily on graphics and sounds.  In one sequence of
> Pork Barrel, I have several soundchannels playing at once, while
> other handlers are running.  And many of my programs play several
> sounds in succession while other handlers are running.  I did this
> with my current MC project, but it's klutzy and the sounds don't
> always play smoothly.  Required a lot of extra coding.  When I get a
> chance, I will upload the code in case anyone knows of a better way.
>
> And of course the program which duplicates an image 50-100 times
> across the screen in an animation... nope, doesn't excite me to
> create 100 objects for one small animation sequence in a program
> that's already done and out there.  Better to leave the project in
> Hypercard and just perform the few minor updates it needs.  Was just
> kinda hoping to move some of them to cross platform and OSX and all
> of them to Metacard... *sigh*
>
> Far as I can tell, very few of my HC programs will port easily and
> smoothly to MC.  The only one being a business program.  Very few
> sounds and graphics there :-)
>
> --
> --Shareware Games for the Mac--
> http://www.gypsyware.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

2002-03-19 Thread J. Landman Gay

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)

2002-03-19 Thread andu

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

2002-03-19 Thread andu

"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

2002-03-19 Thread Terry Judd

>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

2002-03-19 Thread Phil Davis

- 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

2002-03-19 Thread Richard MacLemale

> 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

2002-03-19 Thread J. Landman Gay

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: Temporary picts

2002-03-19 Thread J. Landman Gay

Shari wrote:

> The goal was to play a succession of sounds, while a simple
> information dialog box opened.  This was actually called by a menu
> choice, so it needed to run on every card.  I tried putting a player
> on just one card and calling to it, but it didn't play unless that
> card was open.
> 
> Maybe there's a better way to do this, I surely would love to know
> it!

I'm not sure why you couldn't do it the HyperCard way, as long as your
sounds are in MC-compatible formats (which it sounds like they are --
.wav is fine.) I've had good luck with the ordinary "play" command (no
player object, just regular old "play snd.wav"), using sounds that were
imported into the stack. It works just like in HC. I don't think I've
tried to queue them up though. Was there a problem with the queueing?

If so, you could try using "send in" commands to trigger the handler
repeatedly. The handler could check to see if the sound was "done" and
if so, start the next one.

-- 
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

2002-03-19 Thread J. Landman Gay

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



Sorry!

2002-03-19 Thread Shari

My apologies for the multiple posts!

My internet link is goofy at the moment, and it kept hanging while I 
was trying to send the email, I didn't know it had been sent.

Trying to track down the troubles as they've prevented me from 
uploading web pages and other things this past two weeks.  Sent the 
traceroute to my webhost, who claims it's my internet provider, so I 
sent them the traceroute a while ago.

Apologies again!
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Go stack

2002-03-19 Thread andu

"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: Temporary picts

2002-03-19 Thread Shari

>  > ...which ones I can port to MC without losing
>any
>>  of the goodies, and without
>>  spending a lot of time with the transition.
>>  MC cannot easily handle some of
>>  the things HC does with graphics and sounds...
>
>i thought (hoped) MC was a "super script" of HC
>that did everything faster & better & in color...
>once you got it coded.

To be fair, as far as I know, the things I want to do are doable, but 
require major code changes, a basic rewrite of the whole program.  I 
used addcolor heavily, not just for opencard handlers in HC, as I 
write games, which means graphics and sounds and cutsie stuff.  While 
addcolor was a tack on for HC and had many many limitations, it also 
had strengths which I learned to exploit.  And I got used to being 
able to do things a certain way, the whole concept of temporary 
graphics.  I made that concept work for me.  I turned a weakness into 
a strength.

I'm actually very very happy I invested in Metacard, as it opens up 
new worlds for me, OSX and Windows, native color icons, native color 
period.  I'm really getting to like being able to embed stacks within 
stacks.  There are many things about MC that are tops and I'd 
recommend it highly.

But it does lack a few features that Hypercard had.  It's possible to 
do them, but not nearly as easily, as far as I know.   I don't have 
to learn a whole new language, but it is different enough that my 
code doesn't translate simply.

But it sure beats having to do it in C!

One weakness seems to be playing simultaneous sounds or sounds in 
succession while other scripts are running.  That was so easy in HC.

put "sound1,sound2,sound3" into theSounds

repeat 25
play any item of the sounds
end repeat
doOtherHandlerStuff

And nice and sweet, Hypercard would play 25 sounds in smooth 
succession, while the script went on to do other things, usually 
visual addcolor type things.  You could also do a repeat with x = 1 
to the number of sounds and have them played in order.

First problem in MC, was that I could not get a player to play a 
sound that was embedded, I had to take the sounds out of the stack 
back onto the hard drive.  This irked me.  I did not want the sounds 
as separate files.

The second problem was that either it would play all the sounds, and 
THEN open the dialog.  Or if I put the dialog first, the dialog had 
to be dismissed before a single sound would play.

The goal was to play a succession of sounds, while a simple 
information dialog box opened.  This was actually called by a menu 
choice, so it needed to run on every card.  I tried putting a player 
on just one card and calling to it, but it didn't play unless that 
card was open.  So I had to put a player on every card.  I didn't 
want a player at all, but there didn't seem to be a way to do it 
without one, and have the dialog open.

I ended up using callbacks after every sound, to play the next sound. 
Presumably I could set a series of callbacks, but not sure how the 
rest of the player script would work, startTime etc.  If this is 
doable without a player object, I'd REALLY like to know how to do 
that!

repeat with x = 1 to the number of items of soundList
   play sound (item x of soundList)
end repeat
doOtherHandlerStuff #runs from the very first sound and keeps on running

What I ended up doing was this (compare this to 5 lines of code in 
HC... if anyone can simply this, I would be very grateful, as I do 
this sort of thing a lot):

on giveInfo
put the effective filename of this stack into wit
 set the itemdelimiter to "/"
 put "darn you.wav" into the last item of wit #plays first sound 
and opens the dialog
 set the fileName of player "Music" to wit
 set the callbacks of player "Music" to "531,end1"
 set the startTime of player "Music" to "0"
 set the currentTime of player "Music" to "0"
 start player "Music"
 answer "myInfo"
end giveInfo

on end1 #plays second sound
   put the effective filename of this stack into wit
   set the itemdelimiter to "/"
   put "aaah.wav" into the last item of wit
   set the fileName of player "Music" to wit
   set the startTime of player "Music" to "0"
   set the currentTime of player "Music" to "0"
   set the callbacks of player "Music" to "1020,end2"
   start player "Music" of cd 1
end end1

on end2 #plays third sound
   put the effective filename of this stack into wit
   set the itemdelimiter to "/"
   put "goodie.wav" into the last item of wit
   set the fileName of player "Music" to wit
   set the startTime of player "Music" to "0"
   set the currentTime of player "Music" to "0"
   set the callbacks of player "Music" to "472,end3"
   start player "Music" of cd 1
end end2

on end3 #plays fourth sound
   put the effective filename of this stack into wit
   set the itemdelimiter to "/"
   put "oh yeah.wav" into the last item of wit
   set the fileName of player "Music" to wit
   set the startTime of player "Music" to "0"
   set the currentTime of player "Music" to "

Re: Go stack

2002-03-19 Thread andu

"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

2002-03-19 Thread Phil Davis

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

2002-03-19 Thread J. Landman Gay

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: Temporary picts

2002-03-19 Thread erik hansen

--- Shari <[EMAIL PROTECTED]> wrote:

> ...which ones I can port to MC without losing
any
> of the goodies, and without 
> spending a lot of time with the transition. 
> MC cannot easily handle some of 
> the things HC does with graphics and sounds...

i thought (hoped) MC was a "super script" of HC
that did everything faster & better & in color...
once you got it coded.
 
> When I get a chance, I will upload the
> code in case anyone knows of a better way.

good idea. MC marketing can handle the idea that
you have to do some extra coding, but if sound &
graphics are lacking some people will go for
something like Director or Max first.

i am hoping for a one stop authoring tool.


=
[EMAIL PROTECTED] http://www.erikhansen.org

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Temporary picts

2002-03-19 Thread Shari

>if you are importing custom icons from HC,
>they will wind up in their own Stack BackGround.
>
>Go to Edit BackGrounds and click on "HC Icons" in
>the Stack Backgrounds window right below the Card
>Groups window.

No, haven't imported anything.  But I will be updating several 
programs soon that were built in HC, and I need to determine which 
ones I can port to MC without losing any of the goodies, and without 
spending a lot of time with the transition.  Apparently several of 
them will need to remain in HC, as MC cannot easily handle some of 
the things HC does with graphics and sounds.

My programs rely heavily on graphics and sounds.  In one sequence of 
Pork Barrel, I have several soundchannels playing at once, while 
other handlers are running.  And many of my programs play several 
sounds in succession while other handlers are running.  I did this 
with my current MC project, but it's klutzy and the sounds don't 
always play smoothly.  Required a lot of extra coding.  When I get a 
chance, I will upload the code in case anyone knows of a better way.

And of course the program which duplicates an image 50-100 times 
across the screen in an animation... nope, doesn't excite me to 
create 100 objects for one small animation sequence in a program 
that's already done and out there.  Better to leave the project in 
Hypercard and just perform the few minor updates it needs.  Was just 
kinda hoping to move some of them to cross platform and OSX and all 
of them to Metacard... *sigh*

Far as I can tell, very few of my HC programs will port easily and 
smoothly to MC.  The only one being a business program.  Very few 
sounds and graphics there :-)

-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Formatted text

2002-03-19 Thread Signe Marie Sanne

Hello,

I have lots of Word files saved as .rtf (on my Mac). I then save them 
as .htm-files and import them into a customProperty:

--tPath = "/Signes/MetacardMappe/t4a1b1.htm"
-- kdatafil = "t4a1b1.htm"
  if there is a file tPath then --
 set the htmlText of field 1 to url ("binfile:" & tPath) 
--just a conversion field
 put the htmlText of field 1 into var
 set the kdatafil of this cd to var
   end if

Then:

   set the htmlText of fld "tekst" to the kdatafil of this cd

Now fld "tekst" contains text with italic, bold etc and with nice 
specific Norwegian letters on both Windows and Mac. My question is: 
Is there an easier way to do this - from ordinary Word files into 
formatted text in a field?

My next question: Is there a way to export the same custom properties 
and get back the formatting in a Word file?

Please don't just answer mactoiso/isotomac or base64encode. I need a 
more precise recipe if use of these is the way to go.

Regards
Signe Marie Sanne



-- 

1. amanuensis Signe Marie Sanne  e-mail: [EMAIL PROTECTED]
Romansk Institutttel:  +47 55 58 21 27
Oysteins gt. 1
5007 Bergen  http://www.hf.uib.no/hfolk/mlab/default.html
Norway

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard