Import "ShanHai.lua"
Call GetNetIP()
Function GetNetIP()
Dim i, IP接口, IP
'安卓获取外网IP地址
GetNetIP = ""
IP接口 = "
http://whois.pconline.com.cn/ipJson.jsp|"
IP接口 = Split(IP接口, "|")
For i = 0 To UBOUND(IP接口)
IP = ShanHai.RegexFind(Url.Get(IP接口(i)), "%d+%.%d+%.%d+%.%d+")
If UBOUND(IP) >= 0 Then
GetNetIP = IP(0)
Exit For
End If
Next
End Function
Delay 500
TracePrint "当前IP:"&GetNetIP()
Delay 100
ShowMessage"当前IP:"&GetNetIP(),1000,0,0
Delay 1000
File.WriteLine("/sdcard/Pictures/ip.txt",i+1,GetNetIP())