Sign in to follow this  
Followers 0
pcjunki

variable into txt file

5 posts in this topic

I'm trying to figure out how to get my wan ip into a txt file.

this is the first for me using variables and writing to a file.

this is what I have, trying to keep it simple

 #include <Inet.au3> #include 
<MsgBoxConstants.au3> #include 
<FileConstants.au3> #include <file.au3>

Local $sPublicIP = _GetIP()
FileWrite("c:\users\droid\ip.txt", "$sPublicIP")

Share this post


Link to post
Share on other sites



when I open the txt file, this is what is in it.

$sPublicIP

it doesn't actually show my wan ip

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Remove the quotes:

FileWrite("c:\users\droid\ip.txt", $sPublicIP)
Edited by water
1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-02-03 - Version 1.4.7.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-03 - Version 1.2.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

 

Remove the quotes:

FileWrite("c:\users\droid\ip.txt", $sPublicIP)

It worked!! thanks!!

:)

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