Jump to content
dnszs

how acess variable in this case

Recommended Posts

dnszs

when i try run my code, i receive this error msg

==> Subscript used on non-accessible variable.:
MouseClick ( "right" [, 1782, 620 [, clicks = 1 [, speed = 10]]] )
MouseClick ( "right" ^ ERROR
>Exit code: 1    Time: 2.105

 

why?

 

 

the code:

 

 

#include <AutoItConstants.au3>
HotKeySet("{F3}","_Start")

While 1
    Sleep(10)
WEnd

Func _Start()
    ;your script
MouseClick ( "right" [, 1782, 620 [, clicks = 1 [, speed = 10]]] )

MouseClick ( "left" [, 994, 521 [, clicks = 1 [, speed = 10]]] )

EndFunc

Share this post


Link to post
Share on other sites
AutoBert

Read in helpfile and understand the conventions: First line must  be:

MouseClick ("right" , 1782, 620 , clicks = 1 , speed = 10)

The brackets are only to show: "The parameter is optional.

Edited by AutoBert

Share this post


Link to post
Share on other sites
dnszs

==> Unknown function name.:
MouseClick ("right" , 1782, 620 , clicks = 1 , speed = 10)
MouseClick ("right" , 1782, 620 , ^ ERROR
>Exit code: 1    Time: 1.895

Share this post


Link to post
Share on other sites
dnszs
2 minutes ago, dnszs said:

==> Unknown function name.:
MouseClick ("right" , 1782, 620 , clicks = 1 , speed = 10)
MouseClick ("right" , 1782, 620 , ^ ERROR
>Exit code: 1    Time: 1.895

Func _Start()
    ;your script
MouseClick ("right" , 1782, 620 , clicks = 1 , speed = 10)

MouseClick ("left" , 994, 521 , clicks = 1 , speed = 10)

EndFunc

Share this post


Link to post
Share on other sites
aa2zz6

@dnszs - Autobert was giving you the definitions of click and speed settings. When you write it out it'll look like...

MouseClick("right", 1782, 620, 1, 10)
  • Like 1

Share this post


Link to post
Share on other sites
dnszs
16 minutes ago, dnszs said:

==> Unknown function name.:
MouseClick ("right" , 1782, 620 , clicks = 1 , speed = 10)
MouseClick ("right" , 1782, 620 , ^ ERROR
>Exit code: 1    Time: 1.895

yea bro, now working... thank you

Share this post


Link to post
Share on other sites
aa2zz6

Great to hear!

Edited by aa2zz6

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

×

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.