Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:54

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] YT Searcher 0.9 (Alpha)

Discussion on [Release] YT Searcher 0.9 (Alpha) within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
[Release] YT Searcher 0.9 (Alpha)

Gut, soweit läufts ganz gut, nur dass mir der Quelltext Probleme bereitet...
Manchmal ändert der sich, sodass es beim 10. Ergebnis zu Scriptfehlern kommt...

Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#include <Array.au3>

$Form2 = GUICreate("YT Searcher 0.9", 602, 257, 199, 126)
$hListBox = GUICtrlCreateList("", 176, 0, 425, 253, BitOR($WS_BORDER, $WS_VSCROLL,$WS_HSCROLL))
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

$Combo1 = GUICtrlCreateCombo("", 8, 8, 161, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Input1 = GUICtrlCreateInput("", 8, 48, 161, 21)
$Checkbox1 = GUICtrlCreateCheckbox("Save last Search", 8, 80, 161, 17)
$Button1 = GUICtrlCreateButton("Search", 8, 144, 65, 25)
$Button2 = GUICtrlCreateButton("Next Page", 8, 184, 70, 25)
$Button3 = GUICtrlCreateButton("Prev Page", 91, 184, 70, 25)
$Button4 = GUICtrlCreateButton("First Page", 8, 224, 65, 25)
$Button5 = GUICtrlCreateButton("Last page", 96, 224, 65, 25)
$Checkbox2 = GUICtrlCreateCheckbox("Save all Searches", 8, 112, 161, 17)
GUISetState(@SW_SHOW)

Global $pr = 0
Global $link[10]

GUICtrlSetState($Button2,$GUI_DISABLE)
GUICtrlSetState($Button3,$GUI_DISABLE)
GUICtrlSetState($Button4,$GUI_DISABLE)
GUICtrlSetState($Button5,$GUI_DISABLE)
GUICtrlSetState($Combo1,$GUI_DISABLE)
GUICtrlSetState($Checkbox2,$GUI_DISABLE)

While 1
	Sleep(10)
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			GUICtrlSetData($hListBox,"")
			$r = GUICtrlRead($Input1)
			If NOT $r = "" Then
			$search = _search($pr,$r)
			For $i = 0 To 8
				$link[$i] = $search[$i]
				If $i = 8 Then
					$link[9] = $search[$i+2]
				EndIf
			Next
			$pr -= 1
			GUICtrlSetState($Button2,$GUI_ENABLE)
			GUICtrlSetState($Button5,$GUI_ENABLE)
			GUICtrlSetState($Button3,$GUI_DISABLE)
			GUICtrlSetState($Button4,$GUI_DISABLE)
			Else
				MsgBox(0,"","No Keywords set")
			EndIf
		Case $Button2
			GUICtrlSetData($hListBox,"")
			If $pr = 0 Then 
				$pr += 2
			Else
				$pr += 1
			EndIf
			$searchn = _search($pr,$search[9])
			For $i = 0 To 8
				$link[$i] = $searchn[$i]
				If $i = 8 Then
					$link[9] = $search[10]
				EndIf
			Next
			GUICtrlSetState($Button3,$GUI_ENABLE)
			GUICtrlSetState($Button4,$GUI_ENABLE)
			GUICtrlSetState($Button2,$GUI_DISABLE)
			If $pr = 99 Then
			GUICtrlSetState($Button5,$GUI_DISABLE)
			Else
			GUICtrlSetState($Button5,$GUI_ENABLE)
			EndIf
		Case $Button3
			GUICtrlSetData($hListBox,"")
			If $pr = 2 Then
				$pr -= 1
				$searchf = _search($pr,$search[9])
			For $i = 0 To 8
				$link[$i] = $searchf[$i]
				If $i = 8 Then
					$link[9] = $search[10]
				EndIf
			Next
				GUICtrlSetState($Button3,$GUI_DISABLE)
				GUICtrlSetState($Button4,$GUI_DISABLE)
				GUICtrlSetState($Button2,$GUI_ENABLE)
				GUICtrlSetState($Button5,$GUI_ENABLE)
			Else
				$pr -= 1
				$searchf = _search($pr,$search[9])
			For $i = 0 To 8
				$link[$i] = $searchf[$i]
				If $i = 8 Then
					$link[9] = $search[10]
				EndIf
			Next
				GUICtrlSetState($Button2,$GUI_ENABLE)
				GUICtrlSetState($Button3,$GUI_ENABLE)
				GUICtrlSetState($Button4,$GUI_ENABLE)
				GUICtrlSetState($Button5,$GUI_ENABLE)
			EndIf
		Case $Button4
			GUICtrlSetData($hListBox,"")
			$pr = 1
			$searchl = _search($pr,$search[9])
			For $i = 0 To 8
				$link[$i] = $searchl[$i]
				If $i = 8 Then
					$link[9] = $search[10]
				EndIf
			Next
			GUICtrlSetState($Button3,$GUI_DISABLE)
			GUICtrlSetState($Button4,$GUI_DISABLE)
			GUICtrlSetState($Button2,$GUI_ENABLE)
			GUICtrlSetState($Button5,$GUI_ENABLE)
		Case $Button5
			GUICtrlSetData($hListBox,"")
			$pr = 99
			$searchl = _search($pr,$search[9])
			For $i = 0 To 8
				$link[$i] = $searchl[$i]
				If $i = 8 Then
					$link[9] = $search[10]
				EndIf
			Next
			GUICtrlSetState($Button5,$GUI_DISABLE)
			GUICtrlSetState($Button3,$GUI_ENABLE)
			GUICtrlSetState($Button2,$GUI_DISABLE)
			GUICtrlSetState($Button4,$GUI_ENABLE)
	EndSwitch
WEnd

Func _search($page,$key)
	$split = StringReplace($key," ","+")
	$read = InetRead("http://m.youtube.com/results?gl=DE&client=mv-google&hl=de&search=by_search&uploaded=&q="&$split&"&p="&$page)
	$get = BinaryToString($read)
	$string = StringRegExp($get,'<a accesskey="(.+)" href="/watch[?]gl=DE&client=mv-google&hl=de&(.+)">(.+)</a>',3)
	$string2 = StringRegExp($get,'<a href="/watch[?]gl=DE&client=mv-google&hl=de&(.+)">(.+)</a>',3)
	MsgBox(0,"",$string2)
	Local $array[11]
	Local $tstring[9]
	
	For $i = 2 to UBound($string) Step 3
		$tstring[($i-2)/3] = $string[$i]
	Next
	
	For $i = 1 To UBound($string)-1 Step 3
		If $i <> 1 Then
			$zop = ($i - 1) / 3
		Else
			$zop = $i - 1
		EndIf
		$array[$zop] = $string[$i]
	Next
	$array[10] = $string2[0]
	For $i = 0 To 8
		GUICtrlSetData($hListBox,$tstring[$i])
	Next
	GUICtrlSetData($hListBox,$string2[1])
	$array[9] = $split
	If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
		IniWrite("Search.ini","Last - Page","Page",$page)
		For $i = 0 To 8
			IniWrite("Search.ini","Last - Link",$i,$array[$i])
			IniWrite("Search.ini","Last - Vid",$i,$tstring[$i])
			If $i = 8 Then
				IniWrite("Search.ini","Last - Link",$i+1,$array[10])
				IniWrite("Search.ini","Last - Vid",$i+1,$string2[1])
			EndIf
		Next
		IniWrite("Search.ini","Last - Keyword","Keyword",$array[9])
		
	;ElseIf GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
	;	For $i = 0 To 8
	;		IniWrite("Search.ini","All - Link",$i,$array[$i])
	;		IniWrite("Search.ini","All - Vid",$i,$tstring[$i])
	;	Next
	;	IniWrite("Search.ini","All - Keywords",$array[9],$array[9])
	EndIf
	;GUICtrlSetData($List1,$string2[3])
	;_ArrayDisplay($string)
	
	;_ArrayDisplay($array)
	
	Return $array
		
EndFunc

Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg
    Local $hWndFrom, $iIDFrom, $iCode, $hWndListBox
    If Not IsHWnd($hListBox) Then $hWndListBox = GUICtrlGetHandle($hListBox)
    $hWndFrom = $ilParam
    $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
    $iCode = BitShift($iwParam, 16) ; Hi Word
    Switch $hWndFrom
        Case $hListBox, $hWndListBox
            Switch $iCode
                Case $LBN_DBLCLK ; Sent when the user double-clicks a string in a list box
                    $getzb = _GUICtrlListBox_GetCurSel($hListBox)
					ShellExecute("http://www.youtube.com/watch?"&$link[$getzb])
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc
mipez is offline  
Old 11/07/2010, 18:52   #2
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Und warum sollte man nicht einfach über Youtube selber suchen?
MoepMeep is offline  
Old 11/07/2010, 20:53   #3
 
PenGuin :O's Avatar
 
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
Dient einfach als Übungszweck.
PenGuin :O is offline  
Old 11/08/2010, 17:52   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
Quote:
Originally Posted by pinguin94 View Post
Dient einfach als Übungszweck.
This.
Außerdem brauch ich n paar Bugreports... Ich hab zwar viele bereits gefunden, aber sicherlich nicht alle :x
mipez is offline  
Reply


Similar Threads Similar Threads
[Release] Alpha-Key SF etc. pub
10/09/2011 - Metin2 PServer Guides & Strategies - 30 Replies
Hallo, Hab mir gedacht ich mach mal Alpha-Key SF,DB etc pub Nur den Client nicht, da er zu groß ist Verschicke den DL Link via PN ODER via mail einfach irgendeine mail an "[email protected]" und schon bekommt ihr innerhalb sekunden eine Antwort (Auto-Antwort) Mail funktioniert anscheinend nicht!
[RELEASE] RedBOT - RC3 Alpha
05/10/2011 - Nostale Hacks, Bots, Cheats & Exploits - 145 Replies
Der neue Release vom RedBot ist da! Der bot hat weiterhin folgende funktionen: -monster angreifen; -sachen aufsammeln; -bei beliebiger hp/mp % hinsetzen bis die hp bar wider voll ist; -bei beliebiger hp/mp % pots auf beliebigen slots zu benutzen; Spezielle funktionen wie "wenn du sitzt um hp/mp aufzuladen, und du wirst von einem monster angegriffen, dann steht der bot auf,tötet das monster, und sezt sich wieder hin" wurden auch implementiert. Der komplette code wurde überarbeitet und...
[RELEASE] //lvlman4nostale // v0.2 Alpha //
01/27/2009 - Nostale Hacks, Bots, Cheats & Exploits - 12 Replies
//DEVELOPMENT IS INACTIVE !// ENTWICKLUNG BIS AUF WEITERES EINGESTELLT !// - Version is not working - Diese Version funktioniert im Moment nicht korreckt - Basierend auf den Projekten die ich hier bereits vorgestellt habe, möchte ich euch jetzt meinen neuesten Bot vorstellen. Das wichtigste neue "Feature" ist die endlich fertiggestellte GUI, die man nicht verwenden MUSS, aber kann... Der Bot ist an sich ein recht nettest Tool und bringt eine menge Nützlicher Features und sowas mit ......



All times are GMT +1. The time now is 06:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.