Jump to content

XY coordinations


Recommended Posts

Hi Guys

I'm new to this forum and I need your expertise,

I'm looking for a script that allows me to click on button in XY coordination when a mouse got clicked in another XY coordination. Basically, I have a hidden keyboard that I would like show to a user when a search button get clicked and then hid it when the go button get clicked.

Thanks in advance

Link to comment
Share on other sites

You do not need XY to click a button, your need is hard to understand.

Please explain a little further, perhaps an example code.

I have an interactive application in kiosk mode that our customers uses to search for article number using a keyboard (hardware) even though we have a touch screen. My idea is to get rid of that keyboard(hardware) and launch a onscreen keyboard at startup. I don't have the original code for that application to integrate the onscreen keyboard. This onscreen keyboard have a key that allows me to hide and show the keyboard.

So, I want the mouse to click on the showKeyboard button when a customer press the search button on my application and than another mouse click to hide the keyboard when the same customer press OK button.

Unfortunatly I don't have an example code and I searched everywhere.

The attached is a print screen of my keyboard

post-64738-0-55207500-1305036025_thumb.j

Link to comment
Share on other sites

So this "interactive application", is it a web application? I ask because you mention "kiosk mode".

It's not a web base application.

Its a VBNET package and its sitting on c drive.

Link to comment
Share on other sites

How are you setting up your "If" statement?

While 1

If _IsPressed(01) Then

RunFunction()

EndIf

Wend

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

How are you setting up your "If" statement?

While 1

If _IsPressed(01) Then

RunFunction()

EndIf

Wend

Ĥere is an example code I tried

AutoItSetOption("MouseCoordMode", 2)

AutoItSetOption("TrayIconDebug", 1)

Func MouseBezier($x,$y)

while 1

$pos = MouseGetPos()

if $pos[$x]= 1010 and $pos[$y]= 1141 Then

MouseClick("left",1015,1241,1,1)

EndIf

WEnd

EndFunc

Link to comment
Share on other sites

It's not going to be $pos[$x] and $pos[$y] it will be $pos[0] and $pos[1] as mousegetpos returns [0] = x and [1] = y

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

It's not going to be $pos[$x] and $pos[$y] it will be $pos[0] and $pos[1] as mousegetpos returns [0] = x and [1] = y

In the code below I defined the XY coordination and it works like a charm. What's the best way to set a range of XY to cover the whole button area.

AutoItSetOption("MouseCoordMode", 2)

AutoItSetOption("TrayIconDebug", 1)

while 1

$pos = MouseGetPos()

ToolTip($pos)

if $pos[0]= 160 and $pos[1]= 44 Then

MouseClick("left",1015,1241,1,1)

EndIf

WEnd

Edited by yous
Link to comment
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
 Share

  • Recently Browsing   0 members

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