Jump to content

Bot

Active Members
  • Posts

    66
  • Joined

Bot's Achievements

Wayfarer

Wayfarer (2/7)

1

Reputation

  1. I want to access the context menu to select an installed add-on. However it seems that the key events will work with custom context menu of the webpage only and they are sent to the element, not the native context menu of the browser. So I think I will have to use standard AutoIT command instead. Anyway thanks for the help 🙂
  2. @Danp2 No I'm referring to the context menu of the browser, not the custom context menu of the webpage, so _WD_LinkClickByText just failed with a No match error. _WD_LinkClickByText($sessionID, "Inspect Element")
  3. Using the _WD_ElementActionEx function, I can "right click" on an element to show the context menu. But how can I interact with the context menu, e.g selecting an item. I tried to send keystrokes but did not success: $elementInput = _WD_FindElement($sessionID, $_WD_LOCATOR_ByXPath, "(//input[contains(@name,'q')])[1]") _WD_ElementActionEx($sessionID, $elementInput, "rightclick") $sAction = '{"actions":[{"type": "key", "id": "default keyboard", "actions": [{"type": "keyDown", "value": "\uE015"}, {"type": "keyUp", "value": "\uE015"}, {"type": "keyDown", "value": "\uE015"}, {"type": "keyUp", "value": "\uE015"}, {"type": "keyDown", "value": "\uE015"}, {"type": "keyUp", "value": "\uE015"}, {"type": "keyDown", "value": "\uE015"}, {"type": "keyUp", "value": "\uE015"}]}]}' ; $sAction = '{"actions":[{"type": "key", "id": "default keyboard", "actions": [{"type": "keyUp", "value": "Q"}, {"type": "keyDown", "value": "Q"}]}]}' ; Send the key Q which is shortcut for the Inspect Element menu _WD_Action($sessionID, "actions", $sAction) Can anyone help me please?
  4. I'm just testing and there is no next lines yet. However I found the solution here ">>>ToolsBar<<<" Understanding how to access these controls - AutoIt General Help and Support - AutoIt Forums I replaced the old code with this code based on jdelaney's post: Run('"' & @AutoItExe & '" /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand(WinGetHandle(''My Window''),'''', ''[CLASS:ToolbarWindow32; INSTANCE:1]'', ''SendCommandID'', 32780)"') And it works just fine
  5. I'm trying to click a button on a toolbar ControlCommand($hWnd, "", "[CLASS:ToolbarWindow32; INSTANCE:1]", "SendCommandID", 32780) The button is clicked, but since its purpose is to open a Save As dialog, the script won't continue and hangs there forever unless the dialog is closed. So what should I do? Thanks so much.
  6. OK I see. Then I will create a full box. Thanks for your answer
  7. Thanks a million. I have modified the source as you said and it now works well
  8. Such a great script. However, I see in the source file that $iGBoxColor = background color but in fact, it's the border color of the box not the background one. So can you add an option to set the background color of the box and its transparency as well? Thanks
  9. Nobody, nobody helps me Anyone please?
  10. Thanks for the UDF. I'm about updating to position of the mouse every time the user moves it so I use the event $MOUSE_MOVE_EVENT but it always fails. Can you give me a suggestion please? #include <MouseOnEvent.au3> #include <GUIConstantsEx.au3> _MouseSetOnEvent($MOUSE_MOVE_EVENT, "MouseMove_Event") Local $hLabel, $msg GUICreate("My GUI") $hLabel = GUICtrlCreateLabel("Mouse Position", 10, 30, 100) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Func MouseMove_Event() $pos = MouseGetPos() GUICtrlSetData($hLabel, $pos[0] & "," & $pos[1]) Return True EndFunc
  11. Here is it, I copied from MSDN Edit 1 : It seems that we can use only one parameter for the IE Edit 2 : I'm using IE 8 so my script fails when using old paramteters
  12. Yes that's really helpful Thanks so much BTW, I'd like to check the registry for IE path, in case the user may change it or don't have IE installed. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE Sometimes when I launch the script, the GUI doesn't show after all and I have to use Task Manager to close IE and AutoIT. I think I will add the option -new so the IE instance created by the script won't conflict with others Cheers
  13. I like this so much but unfortunately, this function doesn't support control resizing. When the user clicks the maximize button, size of the embedded IE remains unchanged Can anybody fix this please?
  14. OK I tried and it worked fine
  15. I have replaced the _IEAction($oIE, "refresh") with $oIE.document.execCommand("Refresh") and things just work fine Thanks a lot for your help.
×
×
  • Create New...