external Windows program running?

Lynch, Jonathan bnz2 at cdc.gov
Tue Aug 30 09:30:03 EDT 2005


You can also use ports to communcate between applications.

I have done it, so I know it works - but it will be a bit of work to
figure out the details.

Basically, the app that was not opened by Rev needs to send a message to
rev (through a port) when it is done doing what it needs to do. The
message should contain its process name.

Then, when rev gets that name, it kills the process.

Do you have control over the programming in either of the two non-rev
programs?

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Revolution
Sent: Tuesday, August 30, 2005 9:00 AM
To: How to use Revolution
Subject: Re: external Windows program running?

Thanks to all who have made suggestions for solving my problem but I
don't
see a solution yet.

The actual problem is hiding the windows taskbar while a nonrev program
is
running. Rev handles the taskbar hiding quite well with the command
"hide
taskbar" which functions as long as rev is running. As soon as rev shuts
down (or the standalone shuts down) the taskbar reappears. This means
that
rev must be running while the nonrev app is running in order to keep the
taskbar hidden. When the nonrev program quits, I need to have rev quit.
Both
rev and the nonrev program are capable of launching apps, which leads to
2
approaches.

1. Use rev to launch the nonrev app and when the nonrev app completes,
shut
down rev.

2. Use the nonrev app to launch rev at the point where the taskbar needs
to
be hidden and shut rev down beyond that point.

Solution 1.
And now the complications start. The nonrev app has its own launcher
which
must be used. This launcher shuts down after it has the nonrev app
started.
The OpenProcess command won't work because the process that rev launched
(the launcher) has shut down. So what I need is a method for rev to
check if
an app is running that it didn't start. Then I could periodically check
to
see if the app is running and when it quits, I could shut down my rev
app.
Further complication: This is all running from a CD on unknown systems
which
may have unknown protection schemes, so the neat trick of writing to a
file
and checking that file isn't going to work because my app may not have
permission to write to a drive on the user's system.
In summary: This method requires that rev have some method of checking
if an
app that it didn't start, is still running.

Solution 2.
I am not sure that this method is an improvement on Solution 1 because
now I
have the nonrev app somewhat more in control and if it was more
sophisticated, this problem wouldn't exist. This certainly works well,
when
rev is called it hides the taskbar but when the nonrev app finishes I
need
to shut down rev or the users taskbar stays hidden.

Thanks once again for your past help.

Doug



----- Original Message ----- 
From: "Lynch, Jonathan" <bnz2 at cdc.gov>
To: <x at monsieurx.com>; "How to use Revolution"
<use-revolution at lists.runrev.com>
Sent: Monday, August 29, 2005 2:15 PM
Subject: RE: external Windows program running?


You can also just check every now and then to see if the application is
among the openprocesses.

And Xavier, you can launch an app via shell command without it locking
up - at least, Chipp's method so far has not locked up the Rev app for
me. I would be happy to send it to you, if you wish.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of MisterX
Sent: Monday, August 29, 2005 2:08 PM
To: 'How to use Revolution'
Subject: RE: external Windows program running?

Doug,

if you launch your pc application via shell,
then when the user closes that application,
rev just has to continue working...
meanwhile while your app runs, rev is "blocked..."

I find the behavior hideous but at least it
does have ONE use...

The other way is to check every now and then if the
application quit via a shell("pstools! not exact syntax") from pstools
or
the like. you can find pstools at

http://www.sysinternals.com

then
on Checkmyappisrunning
  if "myapp.exe" is not in getappsrunning() then
    -- do mything
    quit
  end if
  send "checkmyappisrunning" to me in 2 seconds
end Checkmyappisrunning

function getappsrunning
  return shell("plist" )
end getappsrunning

cheers
Xav
http://monsieurx.com

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Revolution
> Sent: Monday, August 29, 2005 19:37
> To: How to use Revolution
> Subject: Re: external Windows program running?
>
> Launching isn't the problem. I need to know when the nonrev
> program terminates.
>

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Revolution
> Sent: Monday, August 29, 2005 11:36 AM
> To: use-revolution at lists.runrev.com
> Subject: external Windows program running?
>
> In general:
> I am using revolution to launch a nonrevolution program. I
> need to know
> when
> the user shuts down the nonrev program so that I can shut down rev. Is
> there
> a method of doing this?
>
> Details:
> The nonrev program does not properly hide the Windows taskbar. I need
> rev to
> be running to keep the taskbar hidden, but I need to
> automatically shut
> rev
> down when the user closes the nonrev program.
>
> The nonrev program is useless at sending and receiving messages but it
> can
> launch another program. I tried launching my rev windows taskbar hider
> and
> having the rev program close but as soon as rev closes, rev
> "tidies" up
> and
> the taskbar reappears.
>
> Open to suggestions and thankful for them.
>
> Doug
>

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list