Location

WWW

Interests

Greetings!
I am in need of your guidance once again. I searched the forums for clicking in span, clicking by class, clicking without an ID or Name, etc., but I am unable to find a solution for my problem.
I am trying to expand this tree in IE. There is an arrow ( > ) that i need to click, but I can't find a way to do it . Alternatively, I can double-click the text "Servers", but that seems to be even more troublesome. I will have to do this 2-3 more times as the tree expands.
There appears to be an ID for the tree, simply called "tree", but that isn't working when I send a click to it.
;Open an IE session and navigate to pgAdmin.
Global $oIE = _IECreate($pgAdmin)
;Maximize the IE window.
WinSetState(_IEPropertyGet($oIE, "hwnd"), "", @SW_MAXIMIZE)
Sleep(2000)
;Expand the tree
$oTree = _IEGetObjById($oIE, "tree")
_IEAction($oTree, "click")
Any ideas?

Hello again, I am in phase two of my help bot. I cannot figure out how to properly code Autoit to click on a webpage button using the I.E UDF. I want to click on the button that I have attached as an image. This button does not have a name but it has an ID. Here is the HTML code for this button that I found using chromes developer inspector.
HTML Code:
<img role="button" tabindex="-1" id="toolactions_INSERT-tbb_image" src="nav_icon_insertkey.gif" alt="New Work Order CTRL+ALT+I" draggable="false">
Here is the code that I have so far:
;*******************************************************************************
; Opens IE and fill out a New Workorder
;*******************************************************************************
; Start IE at the ** Tracking Application in ******
$oIE = _IECreate("https:I_am_Bound_by_my_company_to_not_reveal_this_webpage")
; Wait for a browser page load to complete
_IELoadWait($oIE)
Sleep(6000)
; Store the field names where the important data will be sent
Local $nWorkOrderB = _IEGetObjById($oIE, "toolactions_INSERT-tbb_image")
_IEAction($nWorkOrderB, "click")
I want my program to click on the button that looks like a piece of paper with a blue #
(For those wondering, I am allowed to send images just not the URL.)
As always any help would be appreciated.

Hello Everyone,
New Guy here. This is a two-part question, hopefully easy enough though. I know it's ugly coding, this is because I have only a couple hours worth of coding experience and could really use some help.
1) When I single click the button I want one action (like playing a sound clip) and when I double click the button I want a different action (such as opening dialogue box to ask for soundclip directory address). At the bottom of the script I made a comment which one I would like single click versus double click.
2) I can not get the FileOpenDialogue to save the file address to the config.ini file at the 'One' position on the .ini.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <FileConstants.au3>
#include <AutoItConstants.au3>
#include <Sound.au3>
Opt('MustDeclareVars', 1)
Opt("GUIOnEventMode", 1)
Global $OneID
_Main()
Func _Main()
GUICreate("Form1", 156, 86, 281, 276)
$OneID = GUICtrlCreateButton("Button", 15, 17, 122, 37)
GUICtrlSetOnEvent($OneID, "OnOne")
GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit")
GUISetState()
While 1
While 1
Sleep(1000)
WEnd
WEnd
EndFunc
;---------------Functions-------------
While 1
Sleep(100)
WEnd
Func OnOne()
; ******************Single Click for this action****************
$OneID = IniRead("config.ini", "Config", "One", $OneID)
If $OneID = True Then
SoundPlay($OneID, @HotKeyPressed)
Else
; *******Double Click for this action*****And Help Saving File Address to config.ini 'One'***********
$OneID = FileOpenDialog("Select file", @WorkingDir, "All (*.*)")
IniWrite("config.ini", "Config", "One", $OneID)
$OneID = InputBox("Enter Information", "Short Name for File?", "")
IniWrite("config.ini", "Config", "NameOne", $OneID)
EndIf
EndFunc
Any help would be greatly appreciated, and if you need anymore clarity as to what exactly I'm trying to do, please do not hesitate to ask. Thanks so much!
Pike

Hi!
I have a button where I need to close it!
I was doing through clicking same position in screen but there are some id's that have different sizes.
What are the possible ways to click this closable button?
Is there a way to close it through id?
Is there a way to get it's position through it's ID?
Thanks in advance!

I'm trying to click a button on a web page. I have added a couple of MsgBox lines to allow me to watch what happens on the page. As you can see the first half of my script enters data into text boxes on the page. I have no problem there. I just cannot click on the region buttons. The "set focus" line causes an outline to appear around the EU button and the "click button" line causes the "Pick a Region" text to disappear. Here is the code I have so far.
#include <IE.au3>
Local $oIE = _IECreate("http://questchecker.com/")
Local $iQuestID = "123456"
Local $sCharacterName = "CharacterName"
Local $colForms = _IEFormGetCollection($oIE)
$iCount = 0
For $oForm In $colForms
$oFormElements = _IEFormElementGetCollection($oForm)
For $oFormElement In $oFormElements
$iCount = $iCount + 1
Local $sTagName = StringLower($oFormElement.tagName)
Local $sElementType = $oFormElement.type
Local $sElementName = $oFormElement.name
Switch $iCount
Case 6
_IEFormElementSetValue($oFormElement, "MyRealm", 0) ; realm
Case 7
_IEFormElementSetValue($oFormElement, $sCharacterName, 0)
Case 8
_IEFormElementSetValue($oFormElement, $iQuestID, 0)
EndSwitch
Next
Next
Local $oButtons = _IEGetObjByName($oIE, "questForm")
For $oButton In $oButtons
If _IEFormElementGetValue($oButton) = "US" Then
MsgBox(0, "", "Click Okay to set focus")
_IEAction($oButton, "focus")
MsgBox(0, "", "Click Okay to click button")
_IEAction($oButton, "click")
ExitLoop
EndIf
Next
MsgBox(0, "", "Click Okay to quit")
_IEQuit($oIE)
Exit

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?
Kind regards
OtenMoten

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?

Hi everybody,
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
dejhost

Hi guys!
I'm really new to AutoIT, and I have little experience with scripting or any sort of programming. But I'm trying to learn!
Right now, what I'm trying to do is make a quick script that repeats a few functions while a key is held down. I want to see if I can make a quick-burst script that might work in Fallout 4 with machine guns
#include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
Sleep(100)
If _IsPressed("01", $dll) Then
MouseDown("left")
Sleep(320)
MouseUp("left")
Sleep(25)
EndIf
WEnd
DllClose($dll)
Right now, when I hold down my left mouse button, it just repeats the script once - then I have to release and hold again to enable it again. Is it possible to to start it from the top and basically just repeats itself while I'm holding down my mouse button?
In advance, thank you!

Hi All,
I'm wanting to learn how to use ControlSend or ControlClick to be able to click a button when prompted, part of the problem is the button text changes.
The button I want to click displays "NO (XX)" where XX is a countdown each second from 90 - image attached.
I've not done Control based code before, so the below code may be wrong lol, but this is what I've got so far:
While 1
If WinExists("System", "reboot") Then
Local $hWnd = WinWait("System", "reboot", 5)
Local $iPID = WinGetProcess($hWnd)
ControlClick($hWnd, "", "[CLASS:Button; Text: NO"]
;ProcessClose($iPID)
EndIf
Sleep(10000)
WEnd
Thanks!

Hello, First off, I want to say that I very much appreciate the hard work that people put in to replying on these forums and helping newbs. I've gotten 99% of my answers through google, forum searches, and documentation.
Okay, so. I'm actually sure this has been asked before, but I wasn't able to find anything and I'm having some difficulty.
I want to delete tabs in a control with a middle click (or specifically, detect when a tab has been middle-clicked).
Initially I was going to try to use GUIGetCursorInfo along with checking for a middle-click, the problem is, when the cursor is over a tab, it simply returns the ID of the whole control (I'm using the native tab functionality).
If I can avoid it, I REALLY don't want to manually check coordinates of tabs when the middle mouse is clicked, as tabs are going to be generated dynamically (anywhere from one to infinity tabs if the user lets things get out of hand), and the window I'm using will be resizable (thus having to run checks if a tab is out of view, etc), but I can if I have no other choice.
So basically, Is there either 1: a simple native/UDF way to detect middle-click on tabs, 2: a way to get GUIGetCursorInfo give the control ID of the tab itself instead of the control, or 3: something I haven't thought of all together?
Thanks in advance!

I want to change the text in a label depending on which item in a list view is selected. So I need to run a piece of script everytime a ListViewItem is selected (clicked). What is the way to do that? Is there a way to do it with GUIGetMsg()?
Thank you
Reinhardt1Julian

Hi,
I cant find my mistake in simple task. I Just want to click a button and enter some text in textbox.
Could you check this out?
#include <Constants.au3>
WinWaitActive("[CLASS:NOTES]") ; this works
Send("^m") ; this works
ControlSetText("NOTES", "", "[CLASS:IRIS.tedit; INSTANCE:1])", "Some email adress.....") ;this should write an email adress
ControlClick("NOTES", "", "[ID:1610760201]") ;this should press the button send
https://onedrive.live.com/embed?cid=2CE060CF4F2B012E&resid=2CE060CF4F2B012E%2182849&authkey=AGUPPRF3g_Qmaew

Hi, everyone. I cannot press "Submit" image on Login website using FF.au3 #include <FF.au3>
#include <FFex.au3>
_FFStart()
_FFOpenURL("https://url")
_FFTabSetSelected()
_FFSetValueByName("username")
_FFSetValueByName("msisdn")
_FFSetValueByName("password")
Sleep(1000)
_FFImageClick("visual/images/login-btn.png") I have been using IE.au3 with _IEFormImageClick($oIE, "visual/images/login-btn.png", "src") and it's successful. I want to use Firefox now because I got some error on IE like crash, etc. Can you all help me? Thanky ou.

I just made a GUI opening youtube I want to make clicks only inside GUI(let's say if i have a photo on full screen and the GUI is behind that photo I still want a video from GUI browser to be clicked without clicking the photo) Hope you guys will understand because I cant explain so good.... Here is the code: HotKeySet("{ESC}", "Quit")
Example()
Func Example()
$oIE = ObjCreate("Shell.Explorer.2")
GUICreate("",800, 600, 0 , 0)
$GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, 800, 600)
$oIE.navigate("https://www.youtube.com")
GUISetState()
While 1
sleep(1000)
WEnd
GUIDelete()
EndFunc
Func Quit()
Exit
EndFunc