12 posts in this topic
Hello dear community,
definitely I need external help now. I've did all 'ControlClick() - Tutorials' and read a lot of topics about interaction betweend AutoIT and external programs.
The most of them are about "Clicking a button ...". In my case it's different because I need to click a specific element within the program.
The 'program' what I am talking about is called Mendeley. It's library software for documents administration.
In the attachements in picture '1.jpg' you can see the red marked Help element.
In the picture '2.jpg' you see the context menu of the Help element. This is what I'm trying to do with the ControlClick() function.
Following I represent my code which not worked for me:
#include <MsgBoxConstants.au3> Opt("WinTitleMatchMode", 2) $hWnd = WinGetHandle("Mendeley Desktop", "") MsgBox($MB_SYSTEMMODAL, "handle check", $hWnd) ControlClick($hWnd, "Mendeley Desktop", "Help") The MsgBox tells me the number of the handle of the Mendeley window. It's not 0 so for me it means the window is recognized correctly.
When I'm execute the script the Help element is not clicked.
Any suggestions for me?
I need to click on the text "Batch submission" but I can not!
<div class="batchmenu2" onclick="Go('/lot/')" style="background-color: rgb(255, 255, 255);"> <span class="iconep">l</span> <div class="menu"> <b>Batch submission</b> <br> Bulk messages via file </div> </div> How could I do it?
How can I click the specific OnClick?
I have tried by class, text, etc
Here was my last attempt
$oButtons = _IETagNameAllGetCollection($o_IE, "button") For $oButton in $oButtons If String($oButton.value) = "Sign In" Then Sleep (1000) _IEAction($oButton, "click") ExitLoop EndIf Next This did not work either.
Go create a quick account in Zapier and go to https://zapier.com/app/dashboard and make some Zaps!
Just need to click the specific instance of an .open-menu button and then click its a.run (anchor) element.
Doing this IE.au3 script just causing to click its container element:
$target = 1; Target the first instance #include <IE.au3> $oIE = _IEAttach("Dashboard - Zapier") $count = 0; $tags = _IETagNameGetCollection($oIE, "div") For $tag in $tags $class_value = $tag.GetAttribute("class") If $class_value = "open-menu" Then $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) ; $tag.fireEvent("onmousedown") ; _IEAction($tag, "click") ; $tag.fireEvent("onmouseup") ; Or this but not working ; $tag.Click EndIf EndIf Next I also tried to do it using FF.au3
$target = 1; Target the first instance #Include <Array.au3> #Include <FF.au3> $count = 0; If _FFConnect(Default, Default, 3000) Then $aArray = _FFXPath( "//div[@class='open-menu']", "", 7 ) ; _ArrayDisplay($aArray) For $tag in $aArray $count += 1 if $count = $target Then MsgBox(0, "Instance: ", $count) _FFClick($tag) EndIf Next EndIf Error: _FFClick ==> No match: $sElement: [number]
Could some help me how to click such buttons on such kind of a dynamic page?
I have troubles using the function "GUISetCursor" properly.
My script generates a small GUI and opens an image in IrfanView. If the user hits the button "$p_coord" on the GUI, the GUI shall be hidden, IrfanView shall become active and the mousepointer shall turn into a cross (as long hovering over IrfanView). Once clicked into IrfanView, the cursor shall turn into a nordinary mousepointer again.
Unfortunately, the cross doesn't appear until the user clicks into IrfanView manually. Then the mousepointer changes for the duration of the click into the cross. Can anybody tell why this is happening?
Here is the relevant code:
GUISetState(@SW_SHOW, $hGUI) ;the autoit gui is hidden ; Loop until the user exits: While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $p_coord WinSetState("Bicon Coordinator","",@SW_HIDE) ;the autoit gui is hidden $Handle = WinActivate ( "IrfanView") ; IrfanView is activated GUISetCursor (15,1,$Handle) ;Cursor should be turned into a cross - this is what fails :-( While 1 If _IsPressed ("01", $hDLL) Then ;Once a mousclick by the user is performed... GUISetCursor (2) EndIf EndSwitch WEnd