Jump to content

Recommended Posts

Posted

I am new to Autoit Forum so please go easy on me. I am trying to do a simple interaction with a software program. Using the Autoit Window Info I am able to zero in on the exact location of the item I want to click on. For some reason my mouse moves ontop of it but it acts as if there is nothing their when clicked. Yet using my physical mouse it works perfect. I know this is an elementary problem but I am stuck. I can us mouseclick on ms excel no problem but not this one. I tried control click and nothing. Here is the print of the Window Info Tool

>>>> Window <<<<

Title: frmNewSearch

Class: WindowsForms10.window.8.app.0.378734a

Position: 528, 269

Size: 624, 481

Style: 0x16010000

ExStyle: 0x00010000

Handle: 0x00250DFC

>>>> Control <<<<

Class: WindowsForms10.STATIC.app.0.378734a

Instance: 1

ClassnameNN: WindowsForms10.STATIC.app.0.378734a1

Name:

Advanced (Class): [CLASS:WindowsForms10.STATIC.app.0.378734a; INSTANCE:1]

ID: 2757950

Text: Import

Position: 290, 107

Size: 44, 16

ControlClick Coords: 25, 8

Style: 0x5601000D

ExStyle: 0x00000000

Handle: 0x002A153E

>>>> Mouse <<<<

Position: 843, 384

Cursor ID: 0

Color: 0x3A00FF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

Import

Paste

100

Specify the number of keywords you want for your keyword research.

Number of Results:

Enter all possible keywords around which you want to theme your keyword research.

Enter Seed Keywords

Close

Build huge list of keywords && semantically related phrases by connecting to world's biggest keyword databases.

Keyword Research

Contact Us.

Contact Experts

Keyword Research Video Tutorial.

for help.

- Want us to do your Keyword Research ?

- Still Confused ?

- Watch

Need Help ?

United States (US)

Choose the country you want to target with your keyword research.

Target Countries:

English (en)

Choose the language in which you want your keyword research.

Target Language:

>>>> Hidden Text <<<<

And I have simplified my code down to this just to get past this although it is not optimal yet. Some direction would be greatly appreciated.

MouseClick("left", 843, 384, 1)

I even tried control click. What I want to click on is the import button which the above data is for.

I have even delayed the click but nothing.

Thank you.

Posted (edited)

Hi.

Try to use this technic (this is not exact code as I have no much time):

(You have to know how much pixels are till button from center of your GUI = button coordinates considering your GUI x and y, not considering monitor!)

BlockInput(1)
WinMove(-1, -1)
MouseMove(-1,-1)
MouseMove("Window name", x,y)
MouseClick({LEFT})
BlockInput(0)
;This string can help you too, for not moving window : GuiCreate("Window name", 200, 200, -1, -1)

have a nice coding...

Edited by electrico
Posted

Hi.

Try to use this technic (this is not exact code as I have no much time):

(You have to know how much pixels are till button from center of your GUI = button coordinates considering your GUI x and y, not considering monitor!)

BlockInput(1)WinMove(-1, -1)MouseMove(-1,-1)MouseMove("Window name", x,y)MouseClick({LEFT})BlockInput(0);This string can help you too, for not moving window : GuiCreate("Window name", 200, 200, -1, -1)

have a nice coding...

I'd advise you gripper, not to pay much attention to this post.

I dont really know what to make of it.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

JohnOne, propose your variant, dont shit on others.

I'm not shitting on anyone, I cannot improve on the OPs code, if you tell script to mouseclick somewhere and it dosen, I dont know what the problem is.

So the only advice I can offer the OP is to not waste time on code that looks like it will just error out and dosent realy do anything.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted (edited)

I hate WindowsForms

Try one more time with whis line to click it (i know it look dumb but it worked for me)

ControlClick("Your win name","","WindowsForms10.STATIC.app.0.378734a1")

Make shure that win is active before trying to click so use winactivate winwaitactive and dont add other parametars on ControlClick command

Whats the name of the program that your trying to automate?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Posted

I add this to the top of all my codes

;MouseClick("left", LEFT RIGHT, UP DOWN, 2)

;MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

;MouseClick ("left", 540, 100, 1, 1) <----- thats the code for really fast

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...