veagles Posted October 4, 2008 Posted October 4, 2008 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?
Andreik Posted October 4, 2008 Posted October 4, 2008 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
veagles Posted October 4, 2008 Author Posted October 4, 2008 Thanks Andreik.. That was exactly what i needed..
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now