dnszs

how acess variable in this case

7 posts in this topic

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



#2 ·  Posted (edited)

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

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

@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)
1 person likes this

Share this post


Link to post
Share on other sites
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

#7 ·  Posted (edited)

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