Jump to content

Recommended Posts

Posted

You can check the PID whether it still exists after x seconds/minutes/hours.

The Run command returns the PID.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

You can check the PID whether it still exists after x seconds/minutes/hours.

Not really..I have noticed that the PID will ALWAYS remain even if the exe hangs. I tried it soemtime last week...

Posted

$pid = run (myapp.exe)
$time = @sec
if $time > 20 then
processclose($pid)
endif

above is something that might be close but determining how long each app installs is a bit complicated since i have soo many applications..

Posted (edited)

Here an simple example which starts Calc.exe and closes it after 10 seconds.

$pid = Run("calc.exe", "", @SW_HIDE)
$timer = TimerInit()
$wait = 1000 * 10 ;10 seconds
While TimerDiff($timer) < $wait
    Sleep(50)
WEnd
ProcessClose($pid)
Exit

You can use an array for saving the pids and its timeout values.

Each second you can check whether pid still exits and if it is running more than timeout value close the app.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...