[Auto-It] Tomar IP

Iniciado por Xa0s, Junio 10, 2010, 11:21:39 AM

Tema anterior - Siguiente tema

0 Miembros y 2 Visitantes están viendo este tema.

Ok. Aqui les dejo un source simple de una aplicacion para tomar una IP.
El GUI lo hice con Koda. Luego agregue la biblioteca INet.au3 que es necesaria para la funcion _GetIP() y listo.

Ok. Les dejo el codigo:

Código: php
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
#Region ### START Koda GUI section ### Form=
$frmInicio = GUICreate("Tomar IP", 404, 67, 192, 124)
$cmdOk = GUICtrlCreateButton("Mostrar IP", 8, 32, 225, 25, $WS_GROUP)
$txtMensaje = GUICtrlCreateInput("", 8, 8, 385, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $cmdOk
$mip = _GetIP()
GUICtrlSetData($txtMensaje,$mip)
msgbox(0,"Tomar IP","Listo!")
EndSwitch
WEnd


Y asi se veria la aplicacion:

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta