Código: Seleccionar todo
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
$Form1 = GUICreate("Mi Bloque 0.0.0.1", 539, 298, -1, -1)
$Combo1 = GUICtrlCreateCombo("", 20, 16, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "BITCOIN|ETHEREUM|LITECOIN|DASH|DOGE", "BITCOIN")
$Input1 = GUICtrlCreateInput("1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD", 140, 16, 289, 21)
GUICtrlCreateLabel("DIRECCIÓN:", 91, 72, 108, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
$Input2 = GUICtrlCreateInput("", 211, 72, 289, 21, $ES_READONLY)
GUICtrlCreateLabel("TOTAL RECIBIDO:", 43, 104, 156, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
GUICtrlCreateLabel("TOTAL ENVIADO:", 50, 136, 149, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
$Input3 = GUICtrlCreateInput("", 211, 104, 289, 21, $ES_READONLY)
$Input4 = GUICtrlCreateInput("", 211, 136, 289, 21, $ES_READONLY)
$Button1 = GUICtrlCreateButton("Buscar", 444, 15, 75, 25)
GUICtrlCreateLabel("BALANCE:", 108, 168, 91, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
$Input5 = GUICtrlCreateInput("", 211, 168, 289, 21, $ES_READONLY)
GUICtrlCreateLabel("SIN CONFIRMAR:", 49, 200, 150, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
$Input6 = GUICtrlCreateInput("", 211, 200, 289, 21, $ES_READONLY)
GUICtrlCreateLabel("", 2, 256, 532, 4, $SS_SUNKEN)
$acercade = GUICtrlCreateLabel("Acerca de...", 432, 272, 74, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetState($Button1, $GUI_DISABLE)
$Flash = SplashTextOn("","Espere...","250","50","-1","-1",0,"",14,500)
$c = 6
Do
$c = $c - 1
$Flash = SplashTextOn("",$c & " Espere...","250","50","-1","-1",0,"",14,500)
Sleep(1000)
Until $c = 0
Sleep(500)
_Getinfo()
SplashOff()
GUICtrlSetState($Button1, $GUI_ENABLE)
Case $acercade
MsgBox(8256, "Acerca de...", "Mi Bloque 0.0.0.1" & @CRLF & @CRLF & "http://themxp.blogspot.mx/" & @CRLF & @CRLF & "http://www.emesn.com/autoitforum/index.php" & @CRLF & @CRLF & "© 2019 XPyro. All Rights Reserved.")
EndSwitch
WEnd
Func _Getinfo()
If GUICtrlRead($Combo1) = 'BITCOIN' Then $Cripto = 'btc'
If GUICtrlRead($Combo1) = 'ETHEREUM' Then $Cripto = 'eth'
If GUICtrlRead($Combo1) = 'LITECOIN' Then $Cripto = 'ltc'
If GUICtrlRead($Combo1) = 'DASH' Then $Cripto = 'dash'
If GUICtrlRead($Combo1) = 'DOGE' Then $Cripto = 'doge'
$Addres = GUICtrlRead($Input1)
$API = _INetGetSource("https://api.blockcypher.com/v1/" & $Cripto & "/main/addrs/" & $Addres & "/balance")
If Not @error Then
$Datos = StringRegExp($API, '":(.*?),', 3)
If Not @error Then
GUICtrlSetData($Input2, $Addres)
if StringLen(StringStripWS($Datos[1], 1)) <= 8 Then
$DatosF = '0.' & StringStripWS($Datos[1], 1)
GUICtrlSetData($Input3, $DatosF & ' ' & $Cripto)
Else
$DatosF = StringTrimRight($Datos[1], 8)
$DatosF = $DatosF & '.' & StringTrimLeft($Datos[1], StringLen($DatosF))
GUICtrlSetData($Input3, StringStripWS($DatosF, 1) & ' ' & $Cripto)
EndIf
if StringLen(StringStripWS($Datos[2], 1)) <= 8 Then
$DatosF = '0.' & StringStripWS($Datos[2], 1)
GUICtrlSetData($Input4, $DatosF & ' ' & $Cripto)
Else
$DatosF = StringTrimRight($Datos[2], 8)
$DatosF = $DatosF & '.' & StringTrimLeft($Datos[2], StringLen($DatosF))
GUICtrlSetData($Input4, StringStripWS($DatosF, 1) & ' ' & $Cripto)
EndIf
if StringLen(StringStripWS($Datos[3], 1)) <= 8 Then
$DatosF = '0.' & StringStripWS($Datos[3], 1)
GUICtrlSetData($Input5, $DatosF & ' ' & $Cripto)
Else
$DatosF = StringTrimRight($Datos[3], 8)
$DatosF = $DatosF & '.' & StringTrimLeft($Datos[3], StringLen($DatosF))
GUICtrlSetData($Input5, StringStripWS($DatosF, 1) & ' ' & $Cripto)
EndIf
if StringLen(StringStripWS($Datos[4], 1)) <= 8 Then
$DatosF = '0.' & StringStripWS($Datos[4], 1)
GUICtrlSetData($Input6, $DatosF & ' ' & $Cripto)
Else
$DatosF = StringTrimRight($Datos[4], 8)
$DatosF = $DatosF & '.' & StringTrimLeft($Datos[4], StringLen($DatosF))
GUICtrlSetData($Input6, StringStripWS($DatosF, 1) & ' ' & $Cripto)
EndIf
EndIf
EndIf
EndFunc