launch theFile with theProgram

Ken Ray kray at sonsothunder.com
Thu Mar 28 12:50:01 EST 2002


Shari,

To launch a text file on Windows, you can use shell():

To open Notepad with a blank text document:

  set the hideConsoleWindows to true
  get shell("notepad.exe")

To open Notepad with a text document that already exists and you know the
path to it:

  set the hideConsoleWindows to true
  get shell("C:\myFolder\myfile.txt")

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


----- Original Message -----
From: "Shari" <gogypsy at bellsouth.net>
To: <metacard at lists.runrev.com>
Sent: Thursday, March 28, 2002 8:20 AM
Subject: launch theFile with theProgram


> The objective:
>
> To launch a text file with a text program (Simpletext on Mac, ? on
Windows)
>
> The problem:
>
> How to get the filepath of the program?  "launch Simpletext" produces
> "error -43" on my computer.  So if there is some default location
> built into Metacard, it doesn't always work.  I moved Simpletext to
> the toplevel of my HD and it still produced the error.  (It's
> currently in my Applications folder.)
>
> Everyone doesn't have the same setup, things get moved around to suit
> people's tastes.  How to find out where Simpletext is?  And what
> would the equivalent be on Windows?
>
> The only workaround I found was to put a copy of Simpletext with my
> program, to launch from.  Not a desireable option.  (Especially if
> they know they have the program already and trash mine.)  And it
> wouldn't help me for what to do to launch a text file on Windows.
>
> Anybody?
>
> --
> --Shareware Games for the Mac--
> http://www.gypsyware.com
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list