GetCursorPos or execute javascript chromium dcef4 delphi

0

I can not in any way make this command work in dcef4, can any good soul tell me how I do?

crm.Browser.MainFrame.ExecuteJavaScript ('document.getElementById ("signIn"). click ();', '', 0);

I'm using this function that works, plus I need a way to get the x, y coordinates of the page object's screen to be able to send to the procedure, but I do not know how to do this. I would like that when the program is minimized, the code sends the correct coordinates of the object as it could cause problems if minimized and maximized.

procedimento Simulate_Mouse_Click (X: string; Y: string); 
var 
MouseEvent: TCefMouseEvent; 
KeyEvent: TCefKeyEvent; 
begin 
MouseEvent.x: = strtoint (X) +5; 
MouseEvent.y:= strtoint (y) +5;
MiniBrowserFrm.Chromium1.Browser.Host.SendFocusEvent (true); 
MiniBrowserFrm.Chromium1.Browser.Host.SendMouseClickEvent (PCefMouseEvent (@MouseEvent), MBT_LEFT, false, 1); 
MiniBrowserFrm.Chromium1.Browser.Host.SendMouseClickEvent (PCefMouseEvent (@MouseEvent), MBT_LEFT, true, 1); 
fim; 

Simulate_Mouse_Click ('727', '738');
    
asked by anonymous 07.12.2018 / 21:36

0 answers