Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.03.03;
Скачать: CL | DM;

Вниз

TWebBrowser   Найти похожие ветки 

 
Vladimir   (2003-01-12 10:28) [0]

Скажите, можно ли в TWebBrowser программно кликнуть по ссылке, и если можно, то может кто знает как?


 
Song ©   (2003-01-12 10:30) [1]

Mouse_event()


 
Vladimir   (2003-01-12 12:36) [2]

А подробнее, можно? Mouse_event() - что это


 
sergey2   (2003-01-12 18:37) [3]

Народ, подскажите чем отличается клик по ссылке в TWebbrowser от Webbrowser1.Navigate2(URL)?


 
Rouse_ ©   (2003-01-12 18:59) [4]

The mouse_event function synthesizes mouse motion and button clicks.

VOID mouse_event(

DWORD dwFlags, // flags specifying various motion/click variants
DWORD dx, // horizontal mouse position or position change
DWORD dy, // vertical mouse position or position change
DWORD dwData, // amount of wheel movement
DWORD dwExtraInfo // 32 bits of application-defined information
);


Parameters

dwFlags

A set of flag bits that specify various aspects of mouse motion and button clicking. The bits in this parameter can be any reasonable combination of the following values:

Value Meaning
MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy parameters contain normalized absolute coordinates. If not set, those parameters contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section.
MOUSEEVENTF_MOVE Specifies that movement occurred.
MOUSEEVENTF_LEFTDOWN Specifies that the left button changed to down.
MOUSEEVENTF_LEFTUP Specifies that the left button changed to up.
MOUSEEVENTF_RIGHTDOWN Specifies that the right button changed to down.
MOUSEEVENTF_RIGHTUP Specifies that the right button changed to up.
MOUSEEVENTF_MIDDLEDOWN Specifies that the middle button changed to down.
MOUSEEVENTF_MIDDLEUP Specifies that the middle button changed to up.
MOUSEEVENTF_WHEEL Windows NT only: Specifies that the wheel has been moved, if the mouse has a wheel. The amount of movement is given in dwData


Разве трудно F1 нажать?

Желаю успехов


 
alvin   (2003-01-13 07:56) [5]

Это чтобы имитпровать клик, сначала надо имитировать перемещение, затем MOUSEEVENTF_LEFTDOWN,а затем MOUSEEVENTF_LEFTUP - я правильно понимаю?


 
alvin   (2003-01-13 07:56) [6]

Это чтобы имитировать клик, сначала надо имитировать перемещение, затем MOUSEEVENTF_LEFTDOWN,а затем MOUSEEVENTF_LEFTUP - я правильно понимаю?


 
Opuhshii ©   (2003-01-13 12:29) [7]

или можно по другому...

procedure TForm1.Button2Click(Sender: TObject);
var
Document:Variant;
A:Variant;
I:Integer;
begin
WebBrowser1.Navigate("www.delphi.mastak.ru");
while WebBrowser1.ReadyState <> READYSTATE_COMPLETE do
Application.ProcessMessages;
ShowMessageFmt("%s READYSTATE_COMPLETE",[WebBrowser1.LocationURL]);
Document:=WebBrowser1.Document;
for I:=1 to Document.Body.All.Tags("A").Length -1 do begin // перебором все теги <A></A>
A:=Document.Body.All.Tags("A").Item(I);
if A.InnerText="FAQ" then // если Текст = FAQ тогда
A.Click; // Кликнем по этому элементу
end;
end;


 
2Ksion   (2003-01-13 17:21) [8]

Opuhshii

А можно такойже код для кнопки? а то импритировал не получаеться.=(


 
Troll   (2003-01-13 23:51) [9]

2Opuhshii
огромное спасибо, если не трудно не поможешь организовать это дело для какого нибудь фрейма.



Страницы: 1 вся ветка

Текущий архив: 2003.03.03;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.023 c
4-5922
Diamond Cat
2003-01-15 02:53
2003.03.03
Shell_NotifyIcon


1-5630
[HDD]John
2003-02-20 12:35
2003.03.03
Картинка как фон


1-5560
REA
2003-02-21 15:51
2003.03.03
Профайлинг


14-5846
Johnny Smith
2003-02-11 12:12
2003.03.03
Хотелось бы комментарии, особенно от Мазута Берегового,


1-5502
UDS
2003-02-20 20:20
2003.03.03
Вопрос по компоненту