Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_icon=LinkS.ico
- #AutoIt3Wrapper_outfile=LinkSearch 1.0.11.exe
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_Res_Comment=XPyro - Mejorando el mañana
- #AutoIt3Wrapper_Res_Description=Extrae links específicos de una Web con LinkSearch
- #AutoIt3Wrapper_Res_Fileversion=1.0.1.4
- #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
- #AutoIt3Wrapper_Res_LegalCopyright=XPYRO SOFT
- #AutoIt3Wrapper_Res_Language=2058
- #AutoIt3Wrapper_Res_Field=Web|www.softx.22web.net
- #AutoIt3Wrapper_Res_Field=Creado por|XPyro
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <ButtonConstants.au3>
- #include <GuiEdit.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <GUIConstants.au3>
- #include <INet.au3>
- #include <misc.au3>
- _Singleton("LinkSearch1.0.1.1")
- $N = 0
- ;Gui-----------------------------------------------------------------------------------------------------------------------------------------
- $Form1 = GUICreate("LinkSearch 1.0.11", 633, 462, -1, -1)
- GUISetBkColor(0xA6CAF0)
- GUICtrlCreateLabel("Buscar en:", 8, 8, 65, 17)
- GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
- $Input1 = GUICtrlCreateInput("", 72, 8, 545, 21)
- GUICtrlCreateLabel("Filtro:", 32, 40, 36, 17)
- GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
- $Input2 = GUICtrlCreateCombo("", 72, 40, 545, 21)
- GUICtrlSetData(-1, "http://www.mediafire.com/|http://www.megaupload.com/|http://rapidshare.com/|http://depositfiles.com/|http://hotfile.com/|http://www.storage.to|http://www.fileden.com/|http://uploading.com/|http://letitbit.net/")
- $Button1 = GUICtrlCreateButton("Comenzar búsqueda", 18, 70, 131, 25, $BS_DEFPUSHBUTTON)
- $Button2 = GUICtrlCreateButton("Guardar enlaces", 162, 70, 99, 25)
- GUICtrlSetState(-1, $GUI_DISABLE)
- $Button3 = GUICtrlCreateButton("Copiar lista a portapapeles", 274, 70, 163, 25)
- GUICtrlSetState(-1, $GUI_DISABLE)
- $Button4 = GUICtrlCreateButton("Salir", 450, 70, 75, 25)
- $Button5 = GUICtrlCreateButton("Acerca de", 538, 70, 75, 25)
- $Edit1 = _GUICtrlEdit_Create($Form1, "", 8, 102, 617, 339)
- $Progress1 = GUICtrlCreateProgress(8, 445, 617, 10)
- GUISetState(@SW_SHOW)
- ;---------------------------------------------------------------------------------------------------------------------------------------------
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- ;Función principal - recolectar enlaces de una Web
- GUICtrlSetState($Button1, $GUI_DISABLE)
- GUICtrlSetState($Button2, $GUI_DISABLE)
- GUICtrlSetState($Button3, $GUI_DISABLE)
- GUICtrlSetState($Button4, $GUI_DISABLE)
- GUICtrlSetState($Button5, $GUI_DISABLE)
- If GUICtrlRead($Input1) = "" Then
- MsgBox(8240,"Atención!!!","No se coloco una dirección" & @CRLF & @CRLF & "Inserte una dirección de Internet valida y vuelva a intentar")
- Else
- If GUICtrlRead($Input2) = "" Then
- MsgBox(8240,"Atención!!!","No se coloco un filtro" & @CRLF & @CRLF & "Si no coloca un filtro no obtendrá los resultados deseados")
- Else
- _BuscarURL(GUICtrlRead($Input1), GUICtrlRead($Input2), $Edit1)
- EndIf
- EndIf
- GUICtrlSetState($Button1, $GUI_ENABLE)
- If $N <> 0 Then
- GUICtrlSetState($Button2, $GUI_ENABLE)
- GUICtrlSetState($Button3, $GUI_ENABLE)
- $N = 0
- EndIf
- GUICtrlSetState($Button4, $GUI_ENABLE)
- GUICtrlSetState($Button5, $GUI_ENABLE)
- GUICtrlSetData($Progress1, 0)
- Case $Button2
- $fTXT = FileSaveDialog("Guardar enlaces", "", "Archivo de texto (*.txt)", 18, "", $Form1)
- if Not @error Then
- If StringInStr($fTXT, ".txt") Then
- $Exts = $fTXT & ""
- Else
- $Exts = $fTXT & ".txt"
- EndIf
- $Fopen = FileOpen($Exts, 10)
- FileWrite($Fopen, _GUICtrlEdit_GetText($Edit1))
- FileClose($Fopen)
- If FileExists($Exts) Then MsgBox(8256,"Guardar archivo","Archivo guardado correctamente en:" & @CRLF & @CRLF & $Exts)
- EndIf
- Case $Button3
- ClipPut(_GUICtrlEdit_GetText($Edit1))
- Case $Button4
- Exit
- Case $Button5
- _Acercade()
- EndSwitch
- Sleep(20)
- WEnd
- Func _BuscarURL($S_URL, $S_Filtro, $S_Control)
- _GUICtrlEdit_SetText($S_Control, "")
- _GUICtrlEdit_AppendText($S_Control, "Por favor espere a que termine la búsqueda..." & @CRLF & @CRLF & @CRLF & "Buscando enlaces...")
- $dfile = _INetGetSource($S_URL)
- _GUICtrlEdit_SetText($S_Control, "")
- $DivSting = StringSplit($dfile, '"')
- $DivSting = $DivSting & StringSplit($dfile, "'")
- $Dib = 100 / $DivSting[0]
- For $R = 1 To $DivSting[0]
- If StringInStr($DivSting[$R], $S_Filtro) Then
- If StringLeft($DivSting[$R], 7) = 'http://' Or StringLeft($DivSting[$R], 8) = 'https://' Then
- $N = $N + 1
- _GUICtrlEdit_AppendText($S_Control, $DivSting[$R] & @CRLF)
- GUICtrlSetData($Progress1, $R * $Dib)
- EndIf
- EndIf
- Next
- GUICtrlSetData($Progress1, 100)
- MsgBox(8256,"Terminado",'Se encontro un total de "' & $N & '" enlaces en la dirección a buscar')
- EndFunc
- Func _Acercade()
- GUISetState(@SW_DISABLE, $Form1)
- $Form2 = GUICreate("Acerca de", 329, 296, -1, -1, BitOR($WS_CAPTION,$WS_POPUP,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE), $Form1)
- GUISetBkColor(0xA6CAF0)
- GUICtrlCreateIcon(@ScriptFullPath, 161, 99, 10, 128, 128, BitOR($SS_NOTIFY,$WS_GROUP))
- GUICtrlCreateLabel("LinkSearch 1.0.1.1", 0, 145, 329, 33, $SS_CENTER)
- GUICtrlSetFont(-1, 18, 800, 0, "Verdana")
- GUICtrlCreateLabel("Busca todos los enlaces activos en cualquier sitio Web", 0, 180, 329, 17, $SS_CENTER)
- GUICtrlCreateLabel("© 2008 - 2009 XPYRO SOFT", 0, 200, 329, 17, $SS_CENTER)
- $Link = GUICtrlCreateLabel("http://softx.comxa.com/", 0, 230, 329, 17, $SS_CENTER)
- GUICtrlSetColor(-1, 0x0000FF)
- GUICtrlSetCursor (-1, 0)
- $2Button1 = GUICtrlCreateButton("Aceptar", 77, 255, 175, 25)
- GUISetState(@SW_SHOW, $Form2)
- Do
- $GMsg = GUIGetMsg()
- If $GMsg = $Link Then ShellExecute("http://softx.comxa.com/index.php?p=1_5")
- Sleep(10)
- Until $GMsg = $GUI_EVENT_CLOSE Or $GMsg = $2Button1
- GUISetState(@SW_ENABLE, $Form1)
- GUIDelete($Form2)
- EndFunc
Add Comment
Please, Sign In to add comment