Jump to content

Stupid Question


Recommended Posts

maybe the stupids question ill ever ask lol

MouseClick("left",,, 10 , 0)

ok see mouse click say I don't want to move the mouse with the x and y axis, I just want to left click, and tell it to click 10 times and have the speed 0, but I think

MouseClick("left",,,

that all these (,,,) are uneeded is there away to have it cleaner like

MouseClick("left", 10 , 0)

oh well im here what is the fastest way to make a mouse move and click I know 0 is the fastest but is there a better command that would make it faster, maybe

mousemove(" 123, 234, speed= 0)

mouseclick("left" , speed = 0

Thanks in advance
Link to comment
Share on other sites

  • Moderators

Considering the Help file says

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Logically, this would make sense no?
MouseClick('left')

Edit:

Let me rephrase this with an example:

Opt('MouseClickDelay', 1)
MouseClick('left')

But the true question is... Why have redundant code?

MouseClick('left', 123, 123, 1, 1)
Should be good enough?? Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

maybe the stupids question ill ever ask lol

MouseClick("left",,, 10 , 0)

ok see mouse click say I don't want to move the mouse with the x and y axis, I just want to left click, and tell it to click 10 times and have the speed 0, but I think

MouseClick("left",,,

that all these (,,,) are uneeded is there away to have it cleaner like

MouseClick("left", 10 , 0)

oh well im here what is the fastest way to make a mouse move and click I know 0 is the fastest but is there a better command that would make it faster, maybe

mousemove(" 123, 234, speed= 0)

mouseclick("left" , speed = 0

Taken of the helpfile of AutoIt

When an optional parameter that need to be defined, if they are previous parameter that are optional, the default value must be given. A lot of time it is "" for string parameter and -1 for other type but some as StrinInStr or StringReplace require 0. See the corresponding optional parameter description.

Link to comment
Share on other sites

Considering the Help file saysLogically, this would make sense no?

MouseClick('left')

Edit:

Let me rephrase this with an example:

Opt('MouseClickDelay', 1)
MouseClick('left')

But the true question is... Why have redundant code?

MouseClick('left', 123, 123, 1, 1)
Should be good enough??

@Smoke_N

He is looking for for the defaulted values, if wrong didn't understand. In example:

MouseClick("left",-1,-1, 10 , 0)
Link to comment
Share on other sites

  • Moderators

@Smoke_N

He is looking for for the defaulted values, if wrong didn't understand. In example:

MouseClick("left",-1,-1, 10 , 0)
You're probably right, but your example is still giving it coords. I don't think you can use the click and speed optional parameters without giving values to x and y first.

Edit:

This (to me):

MouseMove(100, 100, 1)
$Pos = MouseGetPos()
If IsArray($Pos) Then MouseClick('secondary', $Pos[0], $Pos[1], 1, 1)
Is useless when you could just do
MouseClick('secondary', 100, 100, 1, 1)
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

...that all these (,,,) are uneeded is there away to have it cleaner like

MouseClick("left", 10 , 0)
...
Speed only applys to the mouse move part - so you do not need it..., but it seems that you cannot leave out the x, y info if you are going to use the number of clicks parm.

If you think this is "clean"

MouseClick("left")

then repeat it 10 times or use a loop

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

well ill try and explain more see this is what i am trying to do

While 1
    sleep(3000)
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xC2DADE); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
    
MouseClick("left",,, 10 , 0)     ; I don't want x and y because it looking for this 0xC2DADE and I need it to 

move as fast as possiable I am making aimbot and I want it to be a good one this is what I got so far more to add, and note this is not meant for online uses offline Only



        ExitLoop
    EndIf
WEnd
Exit
Edited by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

That won't do what you think it will - test it.

When an optional parameter that need to be defined, if they are previous parameter that are optional, the default value must be given. A lot of time it is "" for string parameter and -1 for other type but some as StrinInStr or StringReplace require 0. See the corresponding optional parameter description.

That don't what I think will do?

As I said, optional parameters: they depend on the function.

I only explained to Smoke_N what I supposed Evil_Has_Survived sought to make.

Link to comment
Share on other sites

well ill try and explain more see this is what i am trying to do

While 1
    sleep(3000)
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xC2DADE); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
    
MouseClick("left",,, 10 , 0)    ; I don't want x and y because it looking for this 0xC2DADE and I need it to 

move as fast as possiable I am making aimbot and I want it to be a good one this is what I got so far more to add, and note this is not meant for online uses offline Only



        ExitLoop
    EndIf
WEnd
Exit
You were right, it is a stupid question. And this is even stupider... why in the world would you want to find a pixel color in a certain location if you're just going to mouseclick wherever the hell the mouse currently is? You might as well leave out the pixel search and the "If IsArray($coord) = 1 Then" line, because you never use $coord in that snippet.

The $coord array has the location of the pixel that you just searched for.. so you WANT to specify the X and Y coordinates, otherwise you're not doing anything productive by searching.

Plus, you're confused - what color are you really searching for? The pixelSearch command says you're searching for 0xC2DADE, but your comment says 0x000000. Which one is it? Is it only going to be a single pixel that color, or is there going to be a small area (say, 3x3 or 10x10) with the same color?

While 1
    sleep(3000); if you want it to go as fast as possible, why have it sleep in the loop?
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xC2DADE); put a step to improve speed.
    If IsArray($coord) = 1 Then
        MouseClick("left", $coord[0], $coord[1], 10 , 0)    ; you do want x and y because you need it....
        ExitLoop
    EndIf
WEnd
Exit
Link to comment
Share on other sites

...I only explained to Smoke_N what I supposed Evil_Has_Survived sought to make.

That is what I thought you were doing :-)

-1,-1 will move the mouse to that position...

Evil does not want that...

You cannot leave those parms out if you are going to use other optional parms "downstream".

What you quoted from the help file does not apply to this function.

I knew that I should have avoided this thread...

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

You were right, it is a stupid question. And this is even stupider... why in the world would you want to find a pixel color in a certain location if you're just going to mouseclick wherever the hell the mouse currently is? You might as well leave out the pixel search and the "If IsArray($coord) = 1 Then" line, because you never use $coord in that snippet.

The $coord array has the location of the pixel that you just searched for.. so you WANT to specify the X and Y coordinates, otherwise you're not doing anything productive by searching.

Plus, you're confused - what color are you really searching for? The pixelSearch command says you're searching for 0xC2DADE, but your comment says 0x000000. Which one is it? Is it only going to be a single pixel that color, or is there going to be a small area (say, 3x3 or 10x10) with the same color?

While 1
    sleep(3000); if you want it to go as fast as possible, why have it sleep in the loop?
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xC2DADE); put a step to improve speed.
    If IsArray($coord) = 1 Then
        MouseClick("left", $coord[0], $coord[1], 10 , 0); you do want x and y because you need it....
        ExitLoop
    EndIf
WEnd
Exit
hehe like I said still need a few more commands in this there is a sleep so I cna maximize my game :think:
Thanks in advance
Link to comment
Share on other sites

What you quoted from the help file does not apply to this function.

I knew that I should have avoided this thread...

:think:

Alright, I don't know that we are still discussing here!! lol

But I have an important conclusion:

A lot of time it is "" for string parameter and -1 for other type but some as StrinInStr or StringReplace require 0. See the corresponding optional parameter description.

"Optional parameters: they depend on the function"

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