Private Sub Timer1_Timer()
On Error Resume Next
a = "http://www.narod.ru/guestbook/?owner=" & Int(Rnd * 100000)
w1.Navigate2 a
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
If w1.LocationName = "404" Then Command4_Click
End Sub
Private Sub w1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
If w1.Busy = False Then
w1.Document.All("your_name").Value = t1
w1.Document.All("your_url").Value = t2
w1.Document.All("your_message").Value = t3
w1.Document.Forms(0).submit
Timer1.Enabled = True
End If
End Sub
Private Sub Command4_Click()
On Error Resume Next
a = "http://www.narod.ru/guestbook/?owner=" & Int(Rnd * 100000)
w1.Navigate2 a
End Sub
Option Explicit
Private Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long)
Const SW_SHOWNORMAL = 1
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Sub Label1_Click()
Dim Ie As Object
Set Ie = CreateObject("InternetExplorer.Application")
Ie.Navigate "http:\\mentalprograms.narod.ru"
Ie.MenuBar = 1
Ie.ToolBar = 1
Ie.StatusBar = 1
Ie.AddressBar = 1
Ie.Visible = 1
End Sub
RUSYA писал(а):винсок + post запрос
dim id as long
dim msg as string, nic as string, url as string
id = Int(Rnd * 100000)
Winsock1.SendData "POST /guestbook/?owner=id&your_message="&msg&"&your_url="&url&"&your_name="&nic&" HTTP/1.1" & vbCrLf
Winsock1.SendData "Host: www.narod.ru" & vbCrLf
Winsock1.SendData vbCrLf
'или (for i=0 to 10000000 ... id=i ... next)
alibek писал(а):Можно.
Через API-шные сокеты.
Код:
Option Explicit
Private Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long)
Const SW_SHOWNORMAL = 1
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Sub Label1_Click()
Dim Ie As Object
Set Ie = CreateObject("InternetExplorer.Application")
Ie.Navigate "http:\\mentalprograms.narod.ru"
Ie.MenuBar = 1
Ie.ToolBar = 1
Ie.StatusBar = 1
Ie.AddressBar = 1
Ie.Visible = 1
End Sub
Как автозаполнить поля исходя из этого кода ?
Примеры в поиске.
Ie.Document.All("my_field").value = "My_Vale"
Rostik Ultra (2) писал(а):Odrick
- Код: Выделить всё
Ie.Document.All("my_field").value = "My_Vale"
не работает
keks-n писал(а):Rostik Ultra (2)
Какое имя кнопки? Жмёшь по открытому документу левой кнопочкой и видишь "Просмотр HTML кода", тебе туда. Находишь твм форму и смотришь у кого какие имена.
Сейчас этот форум просматривают: SemrushBot, Yandex-бот и гости: 19