RE: Looking For Suggestions
Hi Chipp The code below is all I ever use DDE for. It just means that if the user opens an app in which I'm using a custom file type they are able to then double-click on a file anywhere in the system and it will open in the already open app rather than start a new process. Unfortunatly Tuviah seems to no longer be maintaining the EXT.dll external. If the old xworlds site is still up it may be there Monte Monte and/or Ken.. I know DDE allows for intra communication between apps. But, how do you do it? And can you give an example of why you'd do it? thanks! -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Monte Goulding Sent: Wednesday, September 18, 2002 9:58 PM To: [EMAIL PROTECTED] Subject: RE: Looking For Suggestions Yes the name is hard coded to EXT. From what I can tell that seems to be the problem with having more than one app use the DDE. I do this at startup: get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\, [fileOpen(%1)]) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\app lication\ , EXT) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\topic\, System) and this at shutdown: get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\, ) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\app lication\ , ) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\top ic\, ) Please excuse the wrapping. PS: change iCoachRowing with your app name. Cheers Monte -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ken Ray Sent: Wednesday, 18 September 2002 4:49 PM To: [EMAIL PROTECTED] Subject: Re: Looking For Suggestions Monte, How do you 'set the DDE registry entries on startup'? I'm using DDE also, but had the problem with the name being hard-coded as EXT, so I'm very interested... Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: Monte Goulding [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 1:57 AM Subject: RE: Looking For Suggestions Just for iterest: What is it about EXT.dll that makes you app unstable? I use it all the time for just this purpose (along with opening custom file types in currently running apps). I found that it works very well. The only problem I've found is that it doesn't work if you have two apps registered to use it on the same system. All I do to workaround this problem is set the DDE registry entries on startup and delete them on shutdown. Anyway, I'm interested in any problems you have found. PS: It'd be nice if Scott added DDE to the engine because it's is now the only thing I use EXT.dll for! Cheers Monte ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard ___ 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: Looking For Suggestions
On 9/19/02 3:55 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: To prevent multiple instances, I have in the past simply written a file to disk to check against on launch and a simple warning message for the user. This allows user-over-ride in the case of a crash and thus a spurious file; most times it's enough to advise the program is already running and/or bring it to the front. Low tech solution. 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 -- hth /H _ Hugh Senior The Flexible Learning Company Consultant Programming Software Solutions Fax/Voice: +44 (0)1483.27 87 27 Email: A HREF=mailto:[EMAIL PROTECTED];mailto:[EMAIL PROTECTED]/A Web: A HREF=http://www.flexiblelearning.com/;www.flexibleLearning.com/A ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
RE: Looking For Suggestions
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 -Glen Yates ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
RE: Looking For Suggestions
--On Thursday, September 19, 2002 06:51:03 -0700 Yates, Glen [EMAIL PROTECTED] 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 [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: Looking For Suggestions
Actually, it doesn't, unfortunately (at least in Win XP). The only programs it shows are things like IO, MOUSE, MSDOS, and REDIR (not Acrobat, Outlook Express,etc.). You might want to check out the SysInternals site; they have a bunch of command-line utilities you can sue. Here's a link to a command-line utility called 'handle' that you can probably run through shell(): For Windows NT/200/ME: http://www.sysinternals.com/ntw2k/freeware/handle.shtml And here looks like one for 95/98/ME: http://www.sysinternals.com/ntw2k/freeware/handle.shtml For Windows developers, the SysInternals site has a bunch of good stuff... Scott, if you get this to work well, let us know how you did it... :-) Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: Chipp Walters [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 11:15 PM Subject: RE: Looking For Suggestions Scott, Don't know if this helps but executing mem /p from a dos window will return all running programs. So, you might be able to run a batch file which prints out the running programs and check it from there.. -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Rossi Sent: Tuesday, September 17, 2002 6:36 PM To: [EMAIL PROTECTED] Subject: Looking For Suggestions I've got a standalone that needs to run on Windows as a single instance (no multiple instances of the same app). I'm looking for suggestions on how to prevent duplicate launches of the same app (the app may also be installed in more than one location on the same machine). I'm familiar with the open apps function of the EXT DLL, but I'm trying to avoid use of this since it makes my apps unstable. I've also toyed with the idea of writing an app busy message to the registry or a temp file on the drive, but I can't figure out how to determine if the app that created the message is running As far as I know, MC has no built-in way to get a list of open processes other than those it has already launched. Searching the Web, I came across this document -- might there be some way to use the code here via the shell or shell(start...) function? http://www.mvps.org/access/api/api0007.htm Thanks for any suggestions. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.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 ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
RE: Looking For Suggestions
Just for iterest: What is it about EXT.dll that makes you app unstable? I use it all the time for just this purpose (along with opening custom file types in currently running apps). I found that it works very well. The only problem I've found is that it doesn't work if you have two apps registered to use it on the same system. All I do to workaround this problem is set the DDE registry entries on startup and delete them on shutdown. Anyway, I'm interested in any problems you have found. PS: It'd be nice if Scott added DDE to the engine because it's is now the only thing I use EXT.dll for! Cheers Monte ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
RE: Looking For Suggestions
Yes the name is hard coded to EXT. From what I can tell that seems to be the problem with having more than one app use the DDE. I do this at startup: get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\, [fileOpen(%1)]) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\application\ , EXT) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\topic\, System) and this at shutdown: get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\, ) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\application\ , ) get setRegistry(HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\topic\, ) Please excuse the wrapping. PS: change iCoachRowing with your app name. Cheers Monte -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ken Ray Sent: Wednesday, 18 September 2002 4:49 PM To: [EMAIL PROTECTED] Subject: Re: Looking For Suggestions Monte, How do you 'set the DDE registry entries on startup'? I'm using DDE also, but had the problem with the name being hard-coded as EXT, so I'm very interested... Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: Monte Goulding [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 1:57 AM Subject: RE: Looking For Suggestions Just for iterest: What is it about EXT.dll that makes you app unstable? I use it all the time for just this purpose (along with opening custom file types in currently running apps). I found that it works very well. The only problem I've found is that it doesn't work if you have two apps registered to use it on the same system. All I do to workaround this problem is set the DDE registry entries on startup and delete them on shutdown. Anyway, I'm interested in any problems you have found. PS: It'd be nice if Scott added DDE to the engine because it's is now the only thing I use EXT.dll for! Cheers Monte ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard ___ 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: Looking For Suggestions
- Original Message - From: Scott Rossi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 8:36 PM Subject: Looking For Suggestions I've got a standalone that needs to run on Windows as a single instance (no multiple instances of the same app). I'm looking for suggestions on how to prevent duplicate launches of the same app (the app may also be installed in more than one location on the same machine). I'm familiar with the open apps function of the EXT DLL, but I'm trying to avoid use of this since it makes my apps unstable. I've also toyed with the idea of writing an app busy message to the registry or a temp file on the drive, but I can't figure out how to determine if the app that created the message is running I'm new to this MetaCard stuff, but it seems to me to be an easy exercise in logic - if the busy message is there to be read, then another instance of the program is running, and the running instance will clean up after itself by removing the message before it exits? So if you find the temp variable, shut down. -- Robert ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Looking For Suggestions
I've got a standalone that needs to run on Windows as a single instance (no multiple instances of the same app). I'm looking for suggestions on how to prevent duplicate launches of the same app (the app may also be installed in more than one location on the same machine). I'm familiar with the open apps function of the EXT DLL, but I'm trying to avoid use of this since it makes my apps unstable. I've also toyed with the idea of writing an app busy message to the registry or a temp file on the drive, but I can't figure out how to determine if the app that created the message is running I'm new to this MetaCard stuff, but it seems to me to be an easy exercise in logic - if the busy message is there to be read, then another instance of the program is running, and the running instance will clean up after itself by removing the message before it exits? So if you find the temp variable, shut down. Thanks for the suggestion. However, it doesn't take into account a situation where the app is unable to clean up after itself, such as after a system crash. Then the system would be stuck with an app busy message and be unable to launch the app at all. If there was a way to identify the app busy message with, for example, an addressable ID of the running app, your solution could work, but right now I can't see how this is possible. This problem is a little more complicated than it seems. :-) Regards, Scott Rossi Creative Director, Tactile Media ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Looking For Suggestions
There may be something more elegant, but how about a time-stamped file? Could your app just stamp the current time into the file once per minute? A second app could then check if the file is "alive" by checking the time contained within. One other trick that might work: what if the main app opens up a socket or other means of IAC? Then the secondary app could attempt to "ping" it locally. Brian
Re: Looking For Suggestions
Works for me. -- Robert - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 10:50 PM Subject: Re: Looking For Suggestions There may be something more elegant, but how about a time-stamped file? Could your app just stamp the current time into the file once per minute? A second app could then check if the file is alive by checking the time contained within. ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Looking For Suggestions
--On Tuesday, September 17, 2002 16:36:09 -0700 Scott Rossi [EMAIL PROTECTED] wrote: I've got a standalone that needs to run on Windows as a single instance (no multiple instances of the same app). I'm looking for suggestions on how to prevent duplicate launches of the same app (the app may also be installed in more than one location on the same machine). I'm familiar with the open apps function of the EXT DLL, but I'm trying to avoid use of this since it makes my apps unstable. I've also toyed with the idea of writing an app busy message to the registry or a temp file on the drive, but I can't figure out how to determine if the app that created the message is running I find it hard to believe that windows doesn't keep a list of all running processes like NIX does that your app could check before opening. I did a quick look and found taskmgr.exe, see if you can do something with that. As far as I know, MC has no built-in way to get a list of open processes other than those it has already launched. Searching the Web, I came across this document -- might there be some way to use the code here via the shell or shell(start...) function? http://www.mvps.org/access/api/api0007.htm Thanks for any suggestions. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.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: Looking For Suggestions
Scott, Don't know if this helps but executing mem /p from a dos window will return all running programs. So, you might be able to run a batch file which prints out the running programs and check it from there.. -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Rossi Sent: Tuesday, September 17, 2002 6:36 PM To: [EMAIL PROTECTED] Subject: Looking For Suggestions I've got a standalone that needs to run on Windows as a single instance (no multiple instances of the same app). I'm looking for suggestions on how to prevent duplicate launches of the same app (the app may also be installed in more than one location on the same machine). I'm familiar with the open apps function of the EXT DLL, but I'm trying to avoid use of this since it makes my apps unstable. I've also toyed with the idea of writing an app busy message to the registry or a temp file on the drive, but I can't figure out how to determine if the app that created the message is running As far as I know, MC has no built-in way to get a list of open processes other than those it has already launched. Searching the Web, I came across this document -- might there be some way to use the code here via the shell or shell(start...) function? http://www.mvps.org/access/api/api0007.htm Thanks for any suggestions. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.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