Jump to content
Sign in to follow this  
ForsakenGod

ControlClick,ControlSend

Recommended Posts

ForsakenGod

Hello ,

I ve written a script for 1 app but the bad thingy is that it works well with MouseClick() Send() But whenever i try ControlSend() ControlClick() it does not work . This app has its own mouse inside its gui so i m quessing it needs to addup smthink more (controls) could anyone explain me how to get the right controls to simulate the same situation with ctrl send and ctrlclick as with Send,Mouseclick ? :idea:

Thanks in advance,

Unreal

Share this post


Link to post
Share on other sites
ForsakenGod

>>>> Control <<<<
Class:  #32770
Instance:   1
ClassnameNN:    #327701
Name:   
Advanced (Class):   [CLASS:#32770; INSTANCE:1]
ID: 
Text:   
Position:   0, 0
Size:   1024, 768
ControlClick Coords:    75, 256
Style:  0x50000044
ExStyle:    0x00040000
Handle: 0x00000000001600EA

I tryed to implement it into a code but no luck ...

$HANDLE1 = ControlGetHandle("[ACTIVE]", "", "#327701")
    ControlClick($appmine, "", $HANDLE1, "Right", 1, 182, 22)
        ControlClick($appmine, "", $HANDLE1, "Left", 1, 461, 301)
Edited by ForsakenGod

Share this post


Link to post
Share on other sites
Jos

Couple of questions:

1. Where is $appmine set?

2. Doubt is $Handle1 will be filled with a correct value as you refer to a Class and not a ControlId. What is the returned value and the @error?

3. Why use the ControlGetHandle() first?

4. Your controlclick() lines both refer to $Handle1... is this intentionally?

5. The X,Y position is the relative position within the control. Looks like are specifying an Absolute position on the whole window?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
ForsakenGod

1 . Its set in the upper part of my script Containst "Name of programm"

2 . None error is returned

3 . I never worked with this but i quess i have to get handle of the controll before using it ?

4 . Yes it is

5 . I ve specified this position thanks to au3info window . It showed me the control click position to the prog

Share this post


Link to post
Share on other sites
GEOSoft

Take a look at Opt("MouseCoordMode"). I seem to recall that Au3Info returne the screen coordinates for the mouse.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Jos

Point 5 is about this from the helpfile:

Parameters

title The title of the window to access.

text The text of the window to access.

controlID The control to interact with. See Controls.

button [optional] The button to click, "left", "right", "middle", "main", "menu", "primary", "secondary". Default is the left button.

clicks [optional] The number of times to click the mouse. Default is 1.

x [optional] The x position to click within the control. Default is center.

y [optional] The y position to click within the control. Default is center.

So it is not the position you get from au3info!

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×