AutoHotkey Community

It is currently May 26th, 2012, 9:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Lyric Searcher
PostPosted: August 1st, 2009, 11:52 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
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 August 3rd, 2009, 7:29 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 5:01 am 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
Added direct AHK and EXE downloads for convenience :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 7:20 pm 
Offline

Joined: July 31st, 2009, 10:42 pm
Posts: 11
thanks another way to be lazy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 7:26 pm 
Online

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
btw: mediafire is not a convenience. any site that requires a wait is an annoyance :)

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

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 7:51 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
Good tip. But those links should be direct downloads...They are for me..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 11:21 pm 
Offline

Joined: July 31st, 2009, 10:42 pm
Posts: 11
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2009, 11:22 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 7:16 am 
hard to tell sarcasm on the internet now that i think about it but it was prety fast though


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 3:18 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
tidbit wrote:
btw: mediafire is not a convenience. any site that requires a wait is an annoyance :)

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.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 5:23 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
SoggyDog wrote:
tidbit wrote:
btw: mediafire is not a convenience. any site that requires a wait is an annoyance :)

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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 6:24 pm 
i almost didnt have to wait


Report this post
Top
  
Reply with quote  
 Post subject: Re: Lyric Searcher
PostPosted: August 3rd, 2009, 7:23 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
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.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 7:24 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
Well, in any rate, I'm going to go ahead and change those to AHK.net links.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 7:30 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
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.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 7:32 pm 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
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 :). If there are any bugs, etc. Please tell me.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group