Looking For Suggestions

andu undo at cloud9.net
Thu Sep 19 10:48:00 EDT 2002


--On Thursday, September 19, 2002 06:51:03 -0700 "Yates, Glen" 
<JAMES.G.YATES at saic.com> wrote:

>> Try this low tech solution:
>>
>> on openstack
>>   open file "C:/program1.txt" for write
>>   if the result is not empty then quit metacard
>> end openstack
>>
>> on closestack
>>   close file "C:/program1.txt"
>> end closestack
>
> Yes, but don't hard code the path like this, or it will fail on about 90%
> of the platforms that Metacard runs on, as that path will not exist.
>
> For windows and mac, I would suggest using the
> specialFolderPath(Temporary) function to get a path to a system specific
> temp directory. Also, this won't pollute the root level of your users
> hard drive - no user likes that (at least I don't).
>
> On unix, I am not aware of an elegant solution, so you may be forced to
> hard code a path, in which case a better path to try would be
> "/var/tmp/yourprogramname.txt"

I use this on Linux:

get shell("ps -C mc")
## "mc" should be changed to app name
if line 2 of it contains "mc" then...
else...

>
> -Glen Yates
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>



Regards, Andu Novac



More information about the metacard mailing list