Jump to content

Mouse Wont Click!


Recommended Posts

Hello everybody i am writing a script to make a my mouse lick at certian places, but i have a problem. The problem is mouse moves to the spots but the does not click. If anybody could plz help me i would really appreciate it.

This is my script

Dim $primary

Dim $secondary

;Determine if user has swapped right and left mouse buttons

$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation

If $k = 1 Then

$primary = "right"

$secondary = "left"

Else ;normal (also case if could not read registry key)

$primary = "left"

$secondary = "right"

EndIf

WinActivate( "(Restur on main) Eternal Lands" )

;plants

MouseClick("$primary", 569, 372, 2)

Sleep( 40000 )

;drop all

MouseClick("$primary", 399, 307, 2)

Link to comment
Share on other sites

Don't use "s when you use a variable. Also use code tags.

Dim $primary, $secondary
;Determine if user has swapped right and left mouse buttons
$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation
If $k = 1 Then
$primary = "right"
$secondary = "left"
Else;normal (also case if could not read registry key)
$primary = "left"
$secondary = "right"
EndIf

WinActivate( "(Restur on main) Eternal Lands" )
;plants
MouseClick($primary, 569, 372, 2)
Sleep( 40000 )
;drop all
MouseClick($primary, 399, 307, 2)
Link to comment
Share on other sites

Hello,

It appears you have found your answer to your question.

Please take the time to edit your thread title with [RESOLVED] so others know that is it resolved.

You can do this by scrolling to the top of your thread, clicking EDIT and then Full Edit and adding: "[RESOLVED]"

to the front of your thread title.

Thanks for your cooperation.

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...