Jump to content

Recommended Posts

Posted (edited)

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
Posted

good job.

Curently writing a autoit installerAutoit installer 83 and 2 thirds%-template 100%-script syntax 100%-script parser 50%--error checking 100%--actual parsing 50%--combining template and parsed crap 0%Template.au3 - 4.15kbparser.au3 - 1.94kb

Posted (edited)

@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
Posted

Here's an updated version, the URL I used at first was probably an old one [ ...google.com/#... vs ...google.com/search?... ]

Hopefully this will work for you, RomanK!

Posted

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...

  • 2 weeks later...
Posted

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?

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
  • Recently Browsing   0 members

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