# MouseClick Error

## Recommended Posts

Something simple enough, and I am sure it's an oversight, but I have not been able to track this down. The entire script is attached, but here is the point of failure.

Note: I am getting the "Error: subscript used on non-accessible variable" but I thought the initial line of:

AutoItSetOption('MouseCoordMode', 0)

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; Install updates (minimized and updating for many minutes)
; Wait for updates to complete
WinWait("ProSeries Update")

; Wait just over 9 minutes to ensure popup is ready (test alternative to WinWait)
Sleep(550000)

; Set focus on Product Licenses window
WinActivate("ProSeries Update")

; Send Mouse Click to Install Now button

MouseClick ( "left" [, 581, 362 [, clicks = 1 [, speed = 10]]] )

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks for any insights!

c1one

ProSeries2017_No_Customer_Info.au3

##### Share on other sites

Udpate, tried with simpler:

MouseClick("left", 580, 360, 50)

Now, not getting an error, but the installer is not advancing.

Notes:

1. Verified the Window Information tool was set to "Window" and verified coordinates few times as I moved the window around the screen.

2. Verified I am looking at the mouse tab as well as the position information there.

##### Share on other sites

Why 50 clicks?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

# IUIAutomation - Topic with framework and examples

##### Share on other sites

I would suggest reading the help file and studying the example they provide for the mouseclick function! ^-^

##### Share on other sites

use silent install of installer instead of automation of installer

My resources are limited. You must ask the right questions

##### Share on other sites
14 hours ago, careca said:

Why 50 clicks?

Just a typo, was copying out of the help file.

##### Share on other sites
3 hours ago, Earthshine said:

use silent install of installer instead of automation of installer

I wish, we typically do that, we have around 500 applications packaged for SCCM, but this is pretty much the only one that has to be done manually, partially because of the updater.

##### Share on other sites

you could use the Information Tool to capture the buttons and controls you want to control, and then talk direct to them maybe?

My resources are limited. You must ask the right questions

##### Share on other sites
1 hour ago, Earthshine said:

you could use the Information Tool to capture the buttons and controls you want to control, and then talk direct to them maybe?

Typically I use:

Send("!N")

or a tab space or tab enter:

Send("{TAB}")
Send("{SPACE}")

But, this installer is a real nightmare. There is no "button" just a giant panel when attempting to get button info with the tool.

## Create an account

Register a new account

• ### Similar Content

• By dejhost
Hi.
I am trying to automate a software called "LabelImg" (https://pypi.org/project/labelImg/).
My autoit-script is started once I selected a folder with images within LabelImg. Pressing the button "Next Image" or pressing the shortcut "d" (https://github.com/tzutalin/labelImg#Hotkeys) jumps to the next image in the selected folder. This shall happen once per second.
#include <Misc.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Opt("WinTitleMatchMode", 1) Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("1B",$hDLL) Then ExitLoop Else Local $temp = WinActivate("labelImg") ConsoleWrite($temp & @CRLF) If WinActivate("labelImg") Then ConsoleWrite("All Set!" & @CRLF) EndIf ;Send("d") Local $temp = MouseClick($MOUSE_CLICK_RIGHT, 50, 200) If $temp <> 1 Then MsgBox(1, "$temp", $temp) ExitLoop EndIf Sleep(1000) EndIf WEnd DllClose($hDLL) So the Send ("d")-command and the MouseClick are alternative methods to jump to the next image. Both fail.
Both ConsoleWrite's deliver proper feedback (I continiously get the handle and "All set" ).

Could you tell me what I'm doing wrong?
Thank you.
• By Rskm
Hi, recently i created a GUI for some calculations in AutoIT.  The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks

• Hi All,
I am trying to login into our application using AutoIT. When I launch the application a splash screen appears and the login screen goes behind it. At this point the script pauses and I loose control of everything. I have literally tried everything for the past two days but nothing has worked yet. Any suggestions would be appreciated.
RunWait("\\mchsv411.siplaceworld.net\splmshare\int00\conf\start_apps\windows\start_nx110.bat en portal_client int00 tc112", "", @SW_MAXIMIZE)
AutoItSetOption("SendKeyDelay", 200)
MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2)
The splash screen has title "Teamcenter" and is static.
I tried to click on the center to get control of login window.
I have tried WinActivate, WinSetState, ControlCommand and a lot of other things.
• By lonardd
Hi,
I have a very strange problem concerning MouseClick function.
I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens.
I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way.
The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy.
All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link   but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence.
Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside?
If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks.
do you have a suggestion?

Thanks a lot
Dave

RotateDisplays.au3
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?

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...