layer Posted February 27, 2005 Share Posted February 27, 2005 hey, i was just wondering... what is the dealio with this below portion of code? ProgressOn ("Getting IP...", "Getting the public IP address needed...") InetGet("http://www.whatismyip.org", "publicIP.tmp") ProgressSet (25) $publicIP = FileReadLine("publicIP.tmp") ProgressSet(50) GUICtrlSetData($Input_2, $publicIP) ProgressSet(75) FileDelete("publicip.tmp") ProgressSet (100) ProgressOff () it should show a progress, get the publicIP from whatismyip.org, delete it, set the gui controls data with the ip from whatismyip.org and delete the .tmp and turn the progress off... lol, for some reason it returns 12.345.678.9XXX.12.345.678 thats just a fake ip, duh, but i know its not that long! i went to the site just to double check, and opened the .tmp file to check too, no luck... any ideas? and the GUI is barely built yet... just a basic if $get=-3 then exit loop... why would it do this?! FootbaG Link to comment Share on other sites More sharing options...
therks Posted February 27, 2005 Share Posted February 27, 2005 Works fine for me, even though I had to build my own GUI and I'm super lazy so I almost didn't. Try posting your whole script, it must be something else causing the problem. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
layer Posted February 27, 2005 Author Share Posted February 27, 2005 lol... sorry, as u can see, i just started it...its name is even still MyGUIexpandcollapse popup; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 455, 280,(@DesktopWidth-455)/2, (@DesktopHeight-280)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Label_1 = GuiCtrlCreateLabel("Your IP: ", 20, 170, 40, 20) $Input_2 = GuiCtrlCreateInput("", 90, 170, 110, 20) $Label_3 = GuiCtrlCreateLabel("Friends IP: ", 20, 120, 50, 20) $Input_4 = GuiCtrlCreateInput("", 90, 120, 110, 20) $Group_5 = GuiCtrlCreateGroup("Welcome to SweetTalk", 20, 10, 160, 90) $Label_6 = GuiCtrlCreateLabel("Welcome to SweetTalk!", 30, 30, 120, 20) $Label_7 = GuiCtrlCreateLabel("Just enter your friends IP", 30, 50, 120, 20) $Label_8 = GuiCtrlCreateLabel("and hit connect!", 30, 70, 120, 20) $Button_9 = GuiCtrlCreateButton("Connect", 310, 190, 100, 50) ProgressOn ("Getting IP...", "Getting the public IP address needed...") InetGet("http://www.whatismyip.org", "publicIP.tmp") ProgressSet (25) $publicIP = FileReadLine("publicIP.tmp") ProgressSet(50) GUICtrlSetData($Input_2, $publicIP) ProgressSet(75) FileDelete("publicip.tmp") ProgressSet (100) ProgressOff () GUICtrlSetData ($Input_2, $publicIP, 1) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exitnow im thinking of just stopping the project though... i just have too much going on its hard to work, but i'd still like to see what the solution is for this, thanks! FootbaG Link to comment Share on other sites More sharing options...
Developers Jos Posted February 27, 2005 Developers Share Posted February 27, 2005 just get rid of this line: GUICtrlSetData ($Input_2, $publicIP, 1) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
layer Posted February 27, 2005 Author Share Posted February 27, 2005 wooops thats because i was testing it before and forgot to erase that@ thanks guys FootbaG 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