Sign in to follow this  
Followers 0
GregN

Using Controlclick With Classnamenn Trouble

4 posts in this topic

Hi guys,

I'd like to double-click an area of a program that has no ControlID, but only a ClassNameNN. Is there a way to do that? Can you use ContolClick for that?

Here is what I've tried, but it doesn't seem to work:

;-----------------------------

WinActivate ("Trend Link for Fluke")

ControlClick ("Trend Link for Fluke", "", "TimeDisplay3", 2)

;TimeDisplay3 is the ClassNameNN value I'd like to double-click

;-----------------------------

The software is for a Fluke NetDAQ, I'm trying to write a program that can automatically set the time for me. Only workaround I can think of is to move and resize the window to 0,0 and then use a Mousclick function.

Any other ideas?

Thanks!

Greg

Share this post


Link to post
Share on other sites



set the time as in windows time in the bottom right corner? cuz there have been other topics about this i think without having todo some control click

Share this post


Link to post
Share on other sites

I'd like to double-click an area of a program that has no ControlID, but only a ClassNameNN. Is there a way to do that? Can you use ContolClick for that?

You have options for what to use for the ControlID parameter

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 234 Y: 98 W: 36 H: 29

Control ID: 131

ClassNameNN: Button42

Text: 7

Style: 0x50000000

ExStyle: 0x00000004

Example:

$title = 'Calculator'
Run('calc')
WinWait($title)

ControlClick($title, '', 131)
MsgBox(0, 'Type used', 'ControlID')

ControlClick($title, '', 'Button42')
MsgBox(0, 'Type used', 'ClassNameNN')

ControlClick($title, '', '7')
MsgBox(0, 'Type used', 'Text')

The 3 options above work.

:think:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

First change:

ControlClick ("Trend Link for Fluke", "", "TimeDisplay3", 2) to look like:

ControlClick ("Trend Link for Fluke", "", "TimeDisplay3", "Left", 2)

If you want to use the optional parm for clicks, you must put something for the button parm.

If ControlClick does not work for your app (if it is non-standard) then read on.....

Judging from your post, I would say that you have already used the "AutoIt Window Info" tool. What you may not have discovered are the coordinate modes. Within the AutoIt Window Info tool, go to Options, "Coord Mode" and look at the various ways that the tool will report x, y coordinates for use with the mouse functions. Edit2: You don't have to move the window to 0,0 but you might want to resize the window (like you said) to standardize the locations to click. [but hopefully, ControlClick will work]

Go to the index tab in the help file and enter "opt"

Read thru all of them, but in particular > MouseCoordMode

later...

Edit1: Get the SciTE editor for AutoIt3 - if you have not already done so:

http://www.autoitscript.com/autoit3/scite/downloads.php

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0