Sign in to follow this  
Followers 0
veagles

Dos Command's Standard output -> Traytip

3 posts in this topic

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



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

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  
Followers 0