Jump to content

Ip Adresi Alan Program


daft117
 Share

Recommended Posts

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 by daft117
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...