Sign in to follow this  
Followers 0
Nostalius

How to MouseClick

18 posts in this topic

Hi

How can i make my program to click on something i want? Are there any tutorials already? Can't find :S

And also how to make my program write something that i want in any space

cheers

Share this post


Link to post
Share on other sites



Start with the help file and "MouseClick"

Posted Image

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Start with the help file and "MouseClick"

Posted Image

8)

Im running the Game Updater, then AutoIt Window Info, then i move cursor on the button i want to be clicked

Position is: 14, 410

So im doing code like this:

;Run KalOnline.exe

Run("KalOnline.exe")

;Wait 5s then run game

Sleep(5000)

MouseClick("left", 14, 410, 2)

And it doesnt click on the button :/ , the cursor is moving somewhere on the end of screen

Any ideas?

Share this post


Link to post
Share on other sites

Check out MouseCoordMode

Share this post


Link to post
Share on other sites

see Options for "Mouse coordinates mode"

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I change the code:

;Run KalOnline.exe

Run("KalOnline.exe")

;Wait 5s then run game

Sleep(5000)

MouseClick("left", 14, 410, 0)

but now mouse dont even move ;/

Share this post


Link to post
Share on other sites

MouseClick("left", 14, 410, 0)

Maybe cause you want "0" clicks... I don't know

Where did you get that "0" from?

Where is the Option Mode at?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Where is the Option Mode at?

well i dont know where to put it hmm

Share this post


Link to post
Share on other sites

at the top of the page... use the one at the bottom of the page in the help file

Might wanna take a class in Autoit

http://www.autoitscript.com/forum/index.ph...mp;showfile=100

8)

I can't understand, can you show me how the code should looks?

I like to do things myself but i cant understand it, and if u show me code i will see how to do this and what im doing wrong

cheers

Share this post


Link to post
Share on other sites

did you look at the link for the class?

here is how to use the option for mouse coordinates

Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client

;Run KalOnline.exe
Run("KalOnline.exe")
WinWaitActive("")

;Wait 5s then run game
Sleep(5000)
MouseClick("left", 14, 410, 0)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Question:

Is your X and Y value coordinate within a window or it is a coordinate on your desktop height and width?

Opt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only.


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

Thx alot mate it worked now :D

And now.. how can i get the position of "Hanin"

Screenshot:

Posted Image

because it doesnt show any position in window info

Share this post


Link to post
Share on other sites

Question:

Is your X and Y value coordinate within a window or it is a coordinate on your desktop height and width?

Opt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only.

Is your X and Y value coordinate within a window ... Yes, or it is a coordinate on your desktop height and width? No

Opt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only.... yes, that is what you want.

Actually, if it is a button and you have the Autoit Window Info, You should be using ControlCommand() or ControlClick()

... But you dont look at the info for learning that I linked to

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Please answer my post i made above

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Abuse... why do I allow it???

Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client

While 1
    $pos = MouseGetPos()
    ToolTip("X = " & $pos[0] & @CRLF & "Y = " & $pos[1], 10, 10, "Thanks... Valuater", 1)
    Sleep(50)
WEnd

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Thx alot mate

My Code looks like this now:

Opt("MouseCoordMode", 0)

Run("KalOnline.exe")

Sleep(2000)

MouseClick("left", 14, 410, 2, 0)

Sleep(9000)

MouseClick("left", 440, 507, 2, 0)

It should click on server name Hanin, but it doesnt and the application is closing (my program), its not on tray anymore

and btw do you have msn mayby?

Share this post


Link to post
Share on other sites

Abuse... why do I allow it???

I think it's some sort of secret fetish of yours :D lol

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