Jump to content
Sign in to follow this  
wolfpacker

Mouse Wont Click!

Recommended Posts

wolfpacker

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)

Share this post


Link to post
Share on other sites
dbzfanatic

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)

Share this post


Link to post
Share on other sites
TehWhale

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.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.