Jump to content

Google MP3 Search


Flamingwolf
 Share

Recommended Posts

Wrote this a year or two ago, updated it because it was /really/ badly written. [Probably still is, but it's better than it was.]

Well, have fun!

[This uses the same search string g2p.org uses]

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#NoTrayIcon

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$FORM1 = GUICreate(".:[ Google MP3 Finder ]:.", 231, 67, 595, 479, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
$INPUT1 = GUICtrlCreateInput('Search Term', 8, 8, 217, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL))
$BUTTON1 = GUICtrlCreateButton("Search", 64, 36, 113, 25, 0)
GUICtrlSetState($BUTTON1, $GUI_DEFBUTTON)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetOnEvent($BUTTON1, "findmp3s")
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")

Func FINDMP3S()
    $INPUTT = StringSplit(GUICtrlRead($INPUT1), ' ')
    $SEARCH = ''
    $INPUTT2 = $INPUTT[0] - 1
    For $I = $INPUTT2 To 0 Step -1
        $TEMP = $INPUTT[0] - $I
        $SEARCH &= $INPUTT[$TEMP]
        If $I <> 0 Then
            $SEARCH &= '+'
        EndIf
    Next
    $FINAL = "http://www.google.com/search?hl=en&q=intitle:index.of%20%2B%22last modified%22%20%2B%22parent directory%22%20%2B(mp3|wma|ogg)%20%2B%22"
    $FINAL &= $SEARCH
    $FINAL &= "%22%20-htm%20-html%20-php%20-asp&meta="
    ShellExecute($FINAL)
EndFunc

Func SPECIALEVENTS()
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Exit
    EndSelect
EndFunc

While 1
Sleep(10000)
WEnd
Edited by Flamingwolf
Link to comment
Share on other sites

:)

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center]VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

@RomanK

Maybe this can get you going.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
;#include <IE.au3>
#NoTrayIcon

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$FORM1 = GUICreate(".:[ Google MP3 Finder ]:.", 231, 67, 595, 479, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
$INPUT1 = GUICtrlCreateInput("Search Term", 8, 8, 217, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL))
$BUTTON1 = GUICtrlCreateButton("Search", 64, 36, 113, 25, 0)
GUICtrlSetState($BUTTON1, $GUI_DEFBUTTON)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetOnEvent($BUTTON1, "findmp3s")
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")

Func FINDMP3S()
    $SEX = StringSplit(GUICtrlRead($INPUT1), " ")
    $SEARCH = ""
    $SEX2 = $SEX[0] - 1
    For $I = $SEX2 To 0 Step -1
        $TEMP = $SEX[0] - $I
        $SEARCH &= $SEX[$TEMP]
        If $I <> 0 Then
            $SEARCH &= "+"
        EndIf
    Next
    ;_IECreate('http://www.google.com/search?hl=en&q=intitle:index.of+last+modified+parent+directory+(mp3|wma|ogg)+";' & $SEARCH & '"+-htm+-html+-php+-asp')
    ShellExecute('http://www.google.com/search?hl=en&q=intitle:index.of+last+modified+parent+directory+(mp3|wma|ogg)+";' & $SEARCH & '"+-htm+-html+-php+-asp')
EndFunc


Func SPECIALEVENTS()
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Exit
    EndSelect
EndFunc

While 1
  Sleep(100)
WEnd

Regards

ptrex

Edited by ptrex
Link to comment
Share on other sites

Sorry that I didn't reply so far.

Your link brought me to www.google.de :unsure:

While your updated version doesn't work, ptrex' one works. :P

Dang, I was hoping that updating the link would work. The reason I don't want to use ptrex's version is because that creates a window in IE, and some people [read: I] don't like using IE. =/

Ahh well, I guess if it only works for you with _IECreate...

Link to comment
Share on other sites

  • 2 weeks later...

ummm... www.g2p.org for the same end result.

Was there a point in that? There are already people that are older than you on this planet, are you gonna stop your aging process? Are you gonna stop breathing just because someone else did it before you?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...