Sign in to follow this  
Followers 0
Flamingwolf

Google MP3 Search

14 posts in this topic

#1 ·  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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

:)

I love it. Thanks for posting script

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Doesn't work for me. It just openes up google's main page iGoogle. :)

Hmm...

Could you tell me where this link brings you?

Share this post


Link to post
Share on other sites

#7 ·  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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

RomanK: Have you had a chance to try the new version and see if it works? I'd like to get this working for everyone, so that way I can have it everywhere. :)

Share this post


Link to post
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


[font="Courier New"]http://RomanK.hondadesigns.com[/font]

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

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


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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
Sign in to follow this  
Followers 0