|
-
Jul 3rd, 2003, 11:47 PM
#1
Thread Starter
Member
.URL attributes?
does anybody know how I would extract the URL from the files saved in the IE favourites list?
The .URL files IE saves it as just seems to have the html code for that site. I would like to be able to get the address for that site...
any ideas welcome
Is the answer 42?
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O dpu(-)@ s++:+ a-->? C+++>--@ UL>B++++ P+>++++ L+(--) E--- W++>+++ N
o? K- w+++>+++++$ O--->---- M->-- V? PS+ PE Y? PGP--- t+(-) 5? X-(++) R*
tv++>! b+ DI+++>++++>+++++ D++ G>+++ e*>+++++ h!(*)>++ r%>$ x+>$
------END GEEK CODE BLOCK------
-
Jul 4th, 2003, 12:29 AM
#2
Frenzied Member
The ".URL" is essentially an INI file, so the INI file manipulation APIs will retrieve/set the data.
VB Code:
Option Explicit
Private Declare Function GetPrivateProfileString Lib "kernel32" _
Alias "GetPrivateProfileStringA" _
(ByVal lpApplicationName As String, _
ByVal lpKeyName As Any, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long, _
ByVal lpFileName As String) As Long
Private Sub Form_Load()
Dim File As String, Str As String * 255
File = "D:\Documents and Settings\MeIMyself\Favorites\KJ\InstallShield.URL"
Call GetPrivateProfileString("InternetShortcut", "URL", "", Str, 255, File)
MsgBox Str
End Sub
HTH
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Jul 4th, 2003, 03:14 AM
#3
Thread Starter
Member
thanks a lot KayJat, but is the only way to do it with API?
Is the answer 42?
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O dpu(-)@ s++:+ a-->? C+++>--@ UL>B++++ P+>++++ L+(--) E--- W++>+++ N
o? K- w+++>+++++$ O--->---- M->-- V? PS+ PE Y? PGP--- t+(-) 5? X-(++) R*
tv++>! b+ DI+++>++++>+++++ D++ G>+++ e*>+++++ h!(*)>++ r%>$ x+>$
------END GEEK CODE BLOCK------
-
Jul 4th, 2003, 04:04 AM
#4
Frenzied Member
Well...You could open up the ".URL" file as plain text (view it in Notepad to get to know the general layput) and parse out the "[SECTION_NAME]" followed by "KEYNAME=" and finally by the Value of that Key.
API's are easier to use, IMO
Regards
KayJay
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Jul 4th, 2003, 10:44 AM
#5
Thread Starter
Member
I can remember when I first mentioned API's to my tutor, he told me to stay away from them until I have a much more solid base.. and arn't api's kinda cheating?
Thanks a lot though KayJay
Is the answer 42?
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O dpu(-)@ s++:+ a-->? C+++>--@ UL>B++++ P+>++++ L+(--) E--- W++>+++ N
o? K- w+++>+++++$ O--->---- M->-- V? PS+ PE Y? PGP--- t+(-) 5? X-(++) R*
tv++>! b+ DI+++>++++>+++++ D++ G>+++ e*>+++++ h!(*)>++ r%>$ x+>$
------END GEEK CODE BLOCK------
-
Jul 4th, 2003, 02:19 PM
#6
Frenzied Member
APIs aren't cheating. They're just a quicker way to get what you're doing done. Besides, that's why the functions are there - so you don't have to reinvent the [slower] wheel.
Another way you could do this is by using VB's file functions.
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
|