0

I'd like to know how to have a program wait for another program to finish a task. I'm not sure what I'd look for for that...

Also, I'm using a mac.

I'd like to use Python or perhaps even applescript (I could just osascript python if the solution if for applescript anyway)

Basically this program "MPEGstreamclip" converts videos, and it opens what appears to be 2 new windows while it's converting. One window is a conversion progress bar, and the other window is a preview of the conversion. (Not sure if these actually count as windows)

(Also, MPEGstreamclip does not have an applescript dictionary, so as far as I know, it can't listen for certain window names existence)

But basically I want my program to listen for when MPEGstreamclip is done, and then run its tasks.

If it helps, when the conversion is done, the mpegstreamclip icon in the dock bounces once. I'm not sure what that means but I'd think you could use that to trigger something couldn't you?

Thanks!

user1159454
  • 3,267
  • 3
  • 19
  • 25

2 Answers2

1

I realized GUI applescript was the answer in this scenario. With it I could tell the PROCESS to get every window, and that worked. However, I'm leaving this up because I'd like to know other ways. I'm sure this GUI workaround won't work for everything.

user1159454
  • 3,267
  • 3
  • 19
  • 25
1

If the MPEGstreamclip actually ends when it is done, you could wrap the whole thing up in a python script using various techniques already discussed in another post. Just be sure to wait for the external process to end before continuing with your other steps.

Community
  • 1
  • 1
ThatAintWorking
  • 1,330
  • 20
  • 32