'exit script from pause' sounds more like start some other script.
1. Get System.Diagnostics.Process instance of photoshop process
2. Make a callback that will be executed on Exited event
3. Subscribe this callback to this event using dotNet.addEventHandler
(
calcs = (dotNetClass "system.diagnostics.process").getprocessesbyname "calc"
if calcs.Count == 0 do
(
format "No running calcs found...\n"
format "Lets start one...\n"
ShellLaunch "calc" ""
calcs = (dotNetClass "system.diagnostics.process").getprocessesbyname "calc"
)
fn StartThisAfterCalcClosed =
(
format "Finished...\n"
)
fn OnCalculatorProcessClosed sender ev =
(
format "Calc just closed...\n"
StartThisAfterCalcClosed()
)
calcs[1].EnableRaisingEvents = true
dotNet.addEventHandler calcs[1] "Exited" OnCalculatorProcessClosed
dotNet.setLifetimeControl calcs[1] #dotNet
format "Waiting for calc to close...\n"
)
Comments (1)
Comment policy
.
'exit script from pause' sounds more like start some other script.
1. Get System.Diagnostics.Process instance of photoshop process
2. Make a callback that will be executed on Exited event
3. Subscribe this callback to this event using dotNet.addEventHandler