AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lyric Searcher
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Sat Aug 01, 2009 10:52 pm    Post subject: Lyric Searcher Reply with quote

I created a script that utilizes Lyricsdrive.com to find a song based on some lyrics. This was my first attempt at Parsing / String Split to get useful information out of the raw HTML of a search. Please tell me what you think!

PS: I realize the results are not very accurate, but that is LyricsDrive's fault, and not mine. This script was just an experiment in Parsing/StringSplit, but may be useful too!

Press F1 for help.

Code:
;-----------------------------------
;|This script was made by TchnclFl,|
;|and is free to use, as long as   |
;|you give credit if reposting! For|
;|help/instructions, press F1 while|
;|the script is running!           |
;-----------------------------------
Gui, Show, x400 y188 h130 w291, Lyric Searcher
Gui, Add, Edit, vLyrics x0 y40 h20 w300 , Type up to 15 words from a song
Gui, Add, Button, Default x105 y80 h40 w80 , Search!
Gui, Add, Text, x110 y10 w250 h30 , Lyric Searcher
F1:: msgbox, Type up to 15 words into the search bar and press enter or

press "Search!"  The more words, the more accurate the results will be. 

Results are gathered from the database provided by

http://www.lyricsdrive.com.
F2:: run

http://www.lyricsdrive.com/search/?qr=%Word1%+%Word2%+%Word3%+%Word4%+%Wo

rd5%+%Word6%+%Word7%+%Word8%+%Word9%+%Word10%+%Word11%+%Word12%+%Word13%+

%Word14%+%Word15%
Esc:: ExitApp
Return
ButtonSearch!:
  Gui, Submit, NoHide
  StringSplit, Word, Lyrics, %A_Space%, %A_Space%
  URLDownloadToFile,

http://www.lyricsdrive.com/search/?qr=%Word1%+%Word2%+%Word3%+%Word4%+%Wo

rd5%+%Word6%+%Word7%+%Word8%+%Word9%+%Word10%+%Word11%+%Word12%+%Word13%+

%Word14%+%Word15%, temp.txt
  FileRead, Results, temp.txt
  FileDelete, temp.txt
  StringSplit, Song, Results, =, "
  StringSplit, Reduced, Song43, ", %A_Space%
  StringReplace, Final, Reduced1, Lyrics,, All
  MsgBox, Best match based on provided lyrics: "%Final%"      

Press F2 to see full results.
Return

GuiClose:
  ExitApp


Direct Download (AHK)
Direct Download (EXE)


Last edited by TchnclFl on Mon Aug 03, 2009 6:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Sun Aug 02, 2009 4:01 am    Post subject: Reply with quote

Added direct AHK and EXE downloads for convenience Smile.
Back to top
View user's profile Send private message
Bumblebee3



Joined: 31 Jul 2009
Posts: 11

PostPosted: Sun Aug 02, 2009 6:20 pm    Post subject: Reply with quote

thanks another way to be lazy
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Sun Aug 02, 2009 6:26 pm    Post subject: Reply with quote

btw: mediafire is not a convenience. any site that requires a wait is an annoyance Smile

use http://www.autohotkey.net for AHK related files.
_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Sun Aug 02, 2009 6:51 pm    Post subject: Reply with quote

Good tip. But those links should be direct downloads...They are for me..
Back to top
View user's profile Send private message
Bumblebee3



Joined: 31 Jul 2009
Posts: 11

PostPosted: Sun Aug 02, 2009 10:21 pm    Post subject: Reply with quote

for me it was at most maby a second of waiting and thats because i have a slow ISP and loading most pages takes like 1/2 second, its really slow
Back to top
View user's profile Send private message
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Sun Aug 02, 2009 10:22 pm    Post subject: Reply with quote

Bumblebee3 wrote:
for me it was at most maby a second of waiting and thats because i have a slow ISP and loading most pages takes like 1/2 second, its really slow


Well, I designed it for my ISP, and you're welcome to edit the waiting to your needs.
Back to top
View user's profile Send private message
Bumblebee3unlogged in
Guest





PostPosted: Mon Aug 03, 2009 6:16 am    Post subject: Reply with quote

hard to tell sarcasm on the internet now that i think about it but it was prety fast though
Back to top
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Mon Aug 03, 2009 2:18 pm    Post subject: Reply with quote

tidbit wrote:
btw: mediafire is not a convenience. any site that requires a wait is an annoyance Smile

use http://www.autohotkey.net for AHK related files.

Agreed. Mediafire is a pain in the @$$. These are so not direct links and I'm not sure how/why you'd think they were. Further, any site with pop-ups isn't worth my time.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Mon Aug 03, 2009 4:23 pm    Post subject: Reply with quote

SoggyDog wrote:
tidbit wrote:
btw: mediafire is not a convenience. any site that requires a wait is an annoyance Smile

use http://www.autohotkey.net for AHK related files.

Agreed. Mediafire is a pain in the @$$. These are so not direct links and I'm not sure how/why you'd think they were. Further, any site with pop-ups isn't worth my time.


I guess it's only for the owner then, because those are absolutely direct for me.
Back to top
View user's profile Send private message
Bumblebee3unlogged in
Guest





PostPosted: Mon Aug 03, 2009 5:24 pm    Post subject: Reply with quote

i almost didnt have to wait
Back to top
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Mon Aug 03, 2009 6:23 pm    Post subject: Re: Lyric Searcher Reply with quote

You postedwhich takes me to a MediaFire download page (complete with pop-ups).


On that page is a direct download linkwhich does immediately start the download.

I don't know how these links are generated by MediaFire nor if they are prone to change,
but maybe this will help sort out what links, as provided by MediaFire, are direct-to-download.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Mon Aug 03, 2009 6:24 pm    Post subject: Reply with quote

Well, in any rate, I'm going to go ahead and change those to AHK.net links.
Back to top
View user's profile Send private message
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Mon Aug 03, 2009 6:30 pm    Post subject: Reply with quote

TchnclFl wrote:
Well, in any rate, I'm going to go ahead and change those to AHK.net links.

Probably a good idea.

All link issues aside, I like this script;
I'm constantly looking up lyrics to songs I hear;
Googleing is usually enough to do the job, but I'll give this a try for a while.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Mon Aug 03, 2009 6:32 pm    Post subject: Reply with quote

SoggyDog wrote:
TchnclFl wrote:
Well, in any rate, I'm going to go ahead and change those to AHK.net links.

Probably a good idea.

All link issues aside, I like this script;
I'm constantly looking up lyrics to songs I hear;
Googleing is usually enough to do the job, but I'll give this a try for a while.


Cool. Tell me how it works out Smile. If there are any bugs, etc. Please tell me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group