|
-
May 18th, 2009, 05:26 AM
#1
Thread Starter
Hyperactive Member
Not quite sure how to do this one
Hi,
I've been writing an app that plays music from youtube in a sort of itunes style (ie from a user genorated library of songs). This is all fine. My problem, however, is that i would like an easier way to add a song found on youtube to the library (currently, you have to copy the youtube code from the address bar, and paste it into a song entry form).
I'm aiming to have some sort of key combo, that when pressed (hopefully regardless of whether the app is focused or not), the app automatically grabs the current address in the browser (firefox) and saves it to a file.
It's the non-focused key combo && API stuff to grab the address that im struggling with. Cheers guys.
Frank
-
May 18th, 2009, 07:28 AM
#2
Not NoteMe
Re: Not quite sure how to do this one
This looks like it might be what you're after for the key combo stuff:
http://www.pinvoke.net/default.aspx/...terHotKey.html
If not, some good keywords are global keyboard hook
Re. getting the address, you'll probably have to do something with the FindWindow(Ex) APIs although this sort of thing could be tricky as you'd have to determine what browser the user is using.
It would be MUCH easier to just read the clipboard (for example) and use that rather than working out where the URL was.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
May 19th, 2009, 04:43 AM
#3
Thread Starter
Hyperactive Member
Re: Not quite sure how to do this one
It would be easier but that's pretty much the way im doing it now. But i do have a new question though.
This is the way the app is set out:
Main Form
----------
This has the menus and controls (ie play, stop etc). A listbox contains all the songs in your library. When you double click a song or hit play, a hidden form is opened (HiddenForm).
HiddenForm
-----------
This simply contains a webbrowser control which navigates to your chosen song. Hitting stop on the mainform navigates to google (therefore stopping the song).
Im having some trouble with pause. I originally thought i would just send the required number of tabs and then a return with sendkeys but this failed. any other suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|