daft117 Posted December 31, 2011 Share Posted December 31, 2011 (edited) daha önce benzer konu açıldı mı bilmiyorum string fonksiyonları kullanımına güzel bir örnek bence [img]http://img51.imageshack.us/img51/2299/clipboard01dh.png[/img] au3 dosyası için : http://www.multiupload.com/53W5TX7X9Z [code]#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("IP Adress", 268, 48, -1, -1) $Button1 = GUICtrlCreateButton("Copy", 176, 8, 75, 25, $WS_GROUP) $Label1 = GUICtrlCreateInput("Getting...", 11, 12, 100, 20) GUISetState(@SW_SHOW) $ip = __GetIP() GUICtrlSetData($Label1, $ip) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 ClipPut($ip) EndSwitch WEnd Func __GetIP() Local $source, $dot, $ip, $split, $i $source = BinaryToString(InetRead("http://checkip.dyndns.org/", 1)) $source = StringTrimLeft($source, StringInStr($source, ":", 2, 1) + 1) $dot = StringInStr($source, ".", 2, 3) $ip = StringLeft($source, $dot) $split = StringSplit(StringLeft(StringTrimLeft($source, $dot), 3), "") For $i = 1 To 3 Step +1 If StringIsInt($split[$i]) Then $ip = $ip & $split[$i] Next Return ($ip) EndFunc ;==>__GetIP[/code] Edited December 31, 2011 by daft117 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.