Capture url IE ???

pcpunch Messages postés 1243 Date d'inscription mardi 7 mai 2002 Statut Membre Dernière intervention 18 février 2019 - 26 oct. 2003 à 03:04
quiaimeflash Messages postés 270 Date d'inscription samedi 29 novembre 2003 Statut Membre Dernière intervention 11 juillet 2007 - 17 août 2004 à 10:51
Slt j'ai trouver une src qui capture l'url de Internet Explorer (ci dessous), je declare evidement les apis concerner, et je lance un GetUrL toute les 100 ms avec un timer et j'enregistre l'url dans un fichier!!

Le probleme c'est que lorsque l'on tape l url dans la barre d'url ex: www.vbfrance.com, je me retrouve avec ca dans le fichier :
w
ww
www
www.
www.v
etc...

dans mon timer je lance une verification pour voir si l'url capturer n'est pas la mm que la precedente donc pas de bleme quand l'url ne change pas, qd on clique c bien la nouvelle url qui dans le fichier.. Mais le bleme c lorsque je tape l'url!!!

Si qq as une soluce!!!

PS: cette src ne marche qu'avec IE, et j'aurais voulu le faire avec le navigateur par defaut au cas ou c Opera, MyIe2, etc... Mais si deja je pouvez supprimer ce probleme???

Public Function GetURL() As String
Dim sIEClassName As String, hIE As Long, lngRep As Long
Dim sText As String * 255, sClass As String * 255
Dim iNum As Long, hwndChild As Long, lngRepClassName As Long
Dim lngLength As Long, sURL As String

On Error GoTo Fin
'on trouve la fenêtre de d'Internet Explorer
sIEClassName = "IEFrame"
hIE = FindWindow(sIEClassName, vbNullString)
If hIE <> 0 Then
hwndChild = hIE
hwndChild = hwndFindWindow(hwndChild, "WorkerW")
If hwndChild = 0 Then Err.Raise 10
hwndChild = hwndFindWindow(hwndChild, "ReBarWindow32")
If hwndChild = 0 Then Err.Raise 10
hwndChild = hwndFindWindow(hwndChild, "ComboBoxEx32")
If hwndChild = 0 Then Err.Raise 10
hwndChild = hwndFindWindow(hwndChild, "ComboBox")
If hwndChild = 0 Then Err.Raise 10
hwndChild = hwndFindWindow(hwndChild, "Edit")
If hwndChild = 0 Then Err.Raise 10
GetURL = ExtractURL(hwndChild)
End If
Exit Function
Fin:

End Function

2 réponses

pcpunch Messages postés 1243 Date d'inscription mardi 7 mai 2002 Statut Membre Dernière intervention 18 février 2019 5
26 oct. 2003 à 03:07
Dsl pour les fautes d'orthographe, suis fatigué lol.

Je tiens a preciser que c'est pas du hack, enfin ci un peu lol mais c pour hacker mon pc. Pour verifier où et que fait on sur mon pc, qd je suis absent!!!!
0
quiaimeflash Messages postés 270 Date d'inscription samedi 29 novembre 2003 Statut Membre Dernière intervention 11 juillet 2007
17 août 2004 à 10:51
Je cherche aussi a faire un programme du meme genre, est ce que tu as trouver une solution (puisque ta question a ete poser il y a 1 an) ?
Merci.
0
Rejoignez-nous