Jump to content
Sign in to follow this  
veagles

Dos Command's Standard output -> Traytip

Recommended Posts

veagles

I have written a script to dial a modem using rasdial. When i am not able to connect, i run rasdial in command prompt to see what the error is.

Is it possible to redirect the output of rasdial command in the script to a traytip?

Share this post


Link to post
Share on other sites
Andreik

I have written a script to dial a modem using rasdial. When i am not able to connect, i run rasdial in command prompt to see what the error is.

Is it possible to redirect the output of rasdial command in the script to a traytip?

Try this:

_RunDOS("rasdial >" & @TempDir & "\DOS_OUTPUT.DAT")
$FILE = FileOpen(@TempDir & "\DOS_OUTPUT.DAT",0)
$DATA = FileRead($FILE)
FileClose($FILE)
TrayTip("RASDIAL",$DATA,5)
Sleep(5000)

Func _RunDOS($sCommand)
    Local $nResult = RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE)
    Return SetError(@error, @extended, $nResult)
EndFunc  ;==>_RunDOS

When the words fail... music speaks

Share this post


Link to post
Share on other sites
veagles

Thanks Andreik..

That was exactly what i needed..

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.