Jump to content

Recommended Posts

Posted (edited)

Hi, im quite excited with autoit so i just have started reading about it. I am gonna need a help with my first script, so please feel free :x

I want to mouse click as fast as possible every pixel ( 1680x1050 resolution ) of my display.

How could this be done?

Thanks in advance

Edited by xorxhs
  • Moderators
Posted

xorxhs,

First, welcome to the AutoIt forum. :x

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading.

I know you want to start coding NOW, but a little study will save you a lot of trouble later on, believe me. :shifty:

Once you have a reasonable grasp of how AutoIt works, look carefully at MouseClick, @DesktopWidth, @DesktopHeight, and For...Next in the Help file. You will soon be able to click away to your heart's content - although why you want to click on every pixel escapes me completely! :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

thanks for your fast response m8 and your info. Really helps a lot. I know it sounds a bit hurry to ask for the code,but, i wouldnt do if it was not needed for an exercise i need for the next 2 days :x

Thanks!

  • Moderators
Posted

xorxhs,

This will give you the idea: :x

HotKeySet("{ESC}", "On_Exit")

For $i = 1 To 50
    For $j = 1 To 50
        MouseClick("left", $i, $j, 1, 500)
    Next
Next

Func On_Exit()
    Exit
EndFunc

and an indication of how slow it will be - just press Escape when you get bored! :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

nice start :x

1)i noticed that cant move clicks to the next column, constantly click a column from up to down.

2) How can i make clicking a lot faster?

  • Moderators
Posted

xorxhs,

nice start

And end - you are on your own now! :nuke:

Answers to your questions:

- 1. If you reverse the $i and $j in the MouseClick line, you will move across and then down rather and down and then across. :P

- 2. Have you looked at the Help file at all? :x Check out the page for MouseClick and you will discover the "speed" parameter. :shifty:

And do not forget to look at @DesktopWidth and @DesktopHeight while you are there - they will give you the limits for the loops. :lol:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...