[SOLVED] Programmatically open Dev Tools (HTML Widget)

Author: gls.tools@free.fr (Gilles)

Hi all, I'm trying to programmatically open DevTools (HTML Widget) from an pop up menu. DevTools is opening with CTRL+SHIFT+I  , then i try to reproduce this with  : $prompt="HTML widget" ; -----> test 1 ; macro"^129^130i" ;-----> test 2 ; macro"^129^130I" ;-----> test 3 ; macro"^129^130^073" ;--- ; macro"^129^130^105" ;-----> test 4 ; macro"^131i" ;-----> test 5 ; macro"^131I" ;-----> test 6 ; macro"^131^073" ;-----> test 7 ; macro"^131^105" ;------> test 8  user32.dll ; newinstance "USER32",test ; hwnd=test->getfocus() ; test->postmessage(hwnd,256,17,1900545) ;keydown get value from spy++ ; test->postmessage(hwnd,256,16,2752513) ; ; test->postmessage(hwnd,256,73,1507329) ; ;----> test 9 ; test->sendmessage(hwnd,257,73,1507329) ;keyup ; test->sendmessage(hwnd,257,16,2752513) ; test->sendmessage(hwnd,257,17,1900545) ; But nothing works , an idea ? Thanks. Gilles.

3 Comments

  1. Hi Gilles, I did a quick test here and it seems that the User32 function keybd_event will do the trick. I've used the following code:

    #define KEYEVENTF_KEYUP = 2 ; 0x02 #define VK_SHIFT = 16 ; 0x10 #define VK_CONTROL = 17 ; 0x11 #define I_key = 73 ; 0x49 $prompt="HTML_widget" activate "USER32".keybd_event(<VK_CONTROL>, 0, 0, 0) activate "USER32".keybd_event(<VK_SHIFT>, 0, 0, 0) activate "USER32".keybd_event(<I_key>, 0, 0, 0) activate "USER32".keybd_event(<VK_CONTROL>, 0, <KEYEVENTF_KEYUP>, 0) activate "USER32".keybd_event(<VK_SHIFT>, 0, <KEYEVENTF_KEYUP>, 0)

    Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  2. Hi Daniel, Yes , it work like dream. You will make the happiness of our developers (and mine). Topic is solved. Thank you very much. Gilles.


    Author: Gilles (gls.tools@free.fr)
  3. Thanks, Gilles. It's good to hear that you got this working. Daniel


    Author: diseli (daniel.iseli@uniface.com)