Jump to content
Sign in to follow this  
Denninja

Noob, need script, can't figure it out. Help please.

Recommended Posts

Denninja

Do
MouseClick ("Left") 

Sleep(2500)

Until _IsPressed ("21")
EndFunc

I can't seem to figure out how to make this work, I'm completely new to AutoIt.

Someone please give me a script (maybe with simple GUI?)

to continuously left-click on current mouse position every 2.5 seconds until I press Esc or PageDown.

Please?

I get this error and have no idea what I'm doing wrong.

Posted Image

Share this post


Link to post
Share on other sites
Melba23

Denninja,

First, welcome to the AutoIt forums. :(

Someone please give me a script

I am afraid it does not work like that here - we expect you to have had a go at solving your problems beforehand. Think of the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever". We try to be net makers and repairers, not fishmongers.

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

M23

P.S. As to your problem - the error message is teling you to look at Line 7 and mentions "matching" "Func" and "EndFunc" statements. What happens if you remove that line so there is no mismatch? :)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Denninja

Thanks, I understand.

I removed that line, but now it gives me this error.

Posted Image

edit- I don't have much time at the moment, but I want to set up this script ASAP and leave it on for a few days while I'm away.

Edited by Denninja

Share this post


Link to post
Share on other sites
Melba23

Denninja,

Go and read the Help file like I told you! :)

M23

P.S. Last hint: The function _IsPressed is in the Misc.au3 include file. Add #include <Misc.au3> to the top of your script. :(


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Denninja

Thank you!!!

I downloaded the help files and will have time to learn later, but now the script works.

I thought that the command was supposed to be available to begin with... :(

Edited by Denninja

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  

×