Sign in to follow this  
Followers 0
ReDFlaG

interrupt a third party software

6 posts in this topic

hello,

i launch a third party software via a button in a form

$pid = Run(@ScriptDir &'\stuff.exe, '', @SW_HIDE, $STDERR_CHILD )
     While 1
        $temp &= StderrRead($pid)
        If @error Then ExitLoop
     Wend
oÝ÷ ÚØb²è+-jH§Ê&zئzÊ"¦ëZaz¶î¶Ú'{h¶¢¹¬¢ØZ¶'é­ë,yØ­²Ú)²Ø^¦º ëb¶ÇÉè¶Ú0¢¹yÆ®±ç¯zx޲ȭÛzk-«b«Þm¶ªºajwjºb¶¼vÚ%£«¶©®*+ܨ~Ø^¦ºz˺Ú"µÍØÙÜÔÙ][Ü]H
    ][ÝÜÝY^I][ÝËJB

but it's not working.

Can someone help?

Thanks. ;)

Share this post


Link to post
Share on other sites



My bad, it was bad copy/past. :lmao:

But the issue is still the same: how to kill the processe (via a button in the GUI) while the process is still running and you are executing the loop? (it seems that i can't do anything while the prog is reading the stderr).

By the way, your loop is nicer than the one i was using, i'll use yours now, thanks! ;)

Share this post


Link to post
Share on other sites

Spawn it using /AutoIt3ExecuteScript, keep track of the PID, and if it doesn't do what you want when you want, you can kill it in your GUI as you choose.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

As SmOke_N suggests or use the peek flag of StderrRead.

If StderrRead is called with a third argument other than zero, StderrRead will "peek at" the stream rather than actually reading from it, and return the characters that could be read from the stream. When run as a "peek" StderrRead always returns immediately. Note that any characters are still present on the stream after a peek and will be returned on the next read operation.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0