MAS Posted August 30, 2011 Share Posted August 30, 2011 -------------------------------------------------------------- -------------------------------------------------------------- hello all i have ascript to output ip of hostname into text file but i want to include some other static text with it the script : -------------------------------------------------------------- TCPStartup() $ip = TCPNameToIP("google.com") $txtfile = Fileopen ( "ip.txt" ,2) FileWrite($txtfile, $ip) -------------------------------------------------------------- i wish to include some text before , after and in the same line of the ip like that : -------------------------------------------------------------- text line 1 text line 2 ip is (ip of google goes here) text line 4 text line 5 -------------------------------------------------------------- any help appreciated thanks all Link to comment Share on other sites More sharing options...
Shaggi Posted August 31, 2011 Share Posted August 31, 2011 $ip = TCPNameToIP("google.com") $txtfile = Fileopen ( "ip.txt" ,2) $Text = "" & _ "text line 1" & @CR & _ "text line 2" & @CR & _ $ip & @CR & _ "text line 4" & @CR & _ "text line 5" FileWrite($txtfile, $Text) Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG Link to comment Share on other sites More sharing options...
MAS Posted August 31, 2011 Author Share Posted August 31, 2011 ok Shaggi thanks alot but do you know how to include some text before the $ipto output"ip is xx.xx.xx.xx"sorry but I'm very beginner Link to comment Share on other sites More sharing options...
MAS Posted August 31, 2011 Author Share Posted August 31, 2011 the code TCPStartup() $ip = TCPNameToIP("google.com") $txtfile = Fileopen ( "ip.txt" ,2) $Text = "" & _ "text line 1" & @CR & _ "text line 2" & @CR & _ "ip is " & $ip & @CR & _ "text line 4" & @CR & _ "text line 5" FileWrite($txtfile, $Text) Link to comment Share on other sites More sharing options...
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