Jump to content
Sign in to follow this  
hardrockeur38

HELP ! I NEED HELP to make a loop ! I don't understand how to make a loop !

Recommended Posts

hardrockeur38

Hello !

I don't know the Autohit langage, it appears complicate for me ! For example, I knew the function GOTO, and now there isn't anymore GOTO (scuse my english i'm french).

So, I wanna know how to make a clic at a precise point and how to make that clic infinite !

I've already write something like this :

Func WHATMUST I TYPE HERE();

ControlClick("BOMBEBLOG.COM - Visite sur son blog Booster les visites et les coms sur son blog - Mozilla Firefox","",)

MouseClick("left",289,56,WHAT ARE THE 2 OTHERS NUMBERS HERE)

EndFunc

But I don't know from where is the problem.

Thanks for helping !

Share this post


Link to post
Share on other sites
Andreik

Hello !

I don't know the Autohit langage, it appears complicate for me ! For example, I knew the function GOTO, and now there isn't anymore GOTO (scuse my english i'm french).

So, I wanna know how to make a clic at a precise point and how to make that clic infinite !

I've already write something like this :

Func WHATMUST I TYPE HERE();

ControlClick("BOMBEBLOG.COM - Visite sur son blog Booster les visites et les coms sur son blog - Mozilla Firefox","",)

MouseClick("left",289,56,WHAT ARE THE 2 OTHERS NUMBERS HERE)

EndFunc

But I don't know from where is the problem.

Thanks for helping !

First welcome to AutoIt Forum.

The language is AutoIt, no Autohit. And I wrote an simple example for you.

While True  ;This is the start of While loop
    ClickPoint()    ;Here is call ClickPoint function
    Sleep(20)
WEnd        ;This is the end of loop

Func ClickPoint()
    MouseClick("left",289,56,1) ;Click left mouse button at position 289,56 one time.
EndFunc

EDIT: Help file and search button are your best friends.

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
hardrockeur38

First welcome to AutoIt Forum.

The language is AutoIt, no Autohit. And I wrote an simple example for you.

While True  ;This is the start of While loop
    ClickPoint()    ;Here is call ClickPoint function
    Sleep(20)
WEnd        ;This is the end of loop

Func ClickPoint()
    MouseClick("left",289,56,1) ;Click left mouse button at position 289,56 one time.
EndFunc

EDIT: Help file and search button are your best friends.

Oh thank you ! Scuse me for Autoit and no Autohit !

Thank you very much ! The help is very fast here, as I see !

Thanks, I'll try this !

Share this post


Link to post
Share on other sites
KaFu

And if you need to know the single parameters of a function, there is a really good (no kidding) help-file in the install directory.

Share this post


Link to post
Share on other sites
hardrockeur38

Scuse me but i've tried this and........I was blocked !

I could'nt stop this loop. So i've musted to kill my computer. It's not good, but I'll be careful the next time !

So.....how can I stop this loop with a simple combination of keys please. Is there a command.

For example : there is the loop with the click (so I can't do anything more on the computer because the mouse is locked. And I press on Control+F9 and it stop. This is just an example.

Can I give a combination of keys to stop this loop ? If yes, how must I do ?

Thanks for answer.

My other question is : I wanna have the time to place the mouse on a window before the loop has begun (is my english correct please scuse me). So, I wanna for example, go on firefox, go on a website and NOW the loop can begin.

In order :

I go on a webbrowser, on the website that I want.

The loop begins.

I can stop the loop when I want with Control + F9

Thanks !

Share this post


Link to post
Share on other sites
Andreik

Scuse me but i've tried this and........I was blocked !

I could'nt stop this loop. So i've musted to kill my computer. It's not good, but I'll be careful the next time !

So.....how can I stop this loop with a simple combination of keys please. Is there a command.

For example : there is the loop with the click (so I can't do anything more on the computer because the mouse is locked. And I press on Control+F9 and it stop. This is just an example.

Can I give a combination of keys to stop this loop ? If yes, how must I do ?

Thanks for answer.

My other question is : I wanna have the time to place the mouse on a window before the loop has begun (is my english correct please scuse me). So, I wanna for example, go on firefox, go on a website and NOW the loop can begin.

In order :

I go on a webbrowser, on the website that I want.

The loop begins.

I can stop the loop when I want with Control + F9

Thanks !

More complete script, but check yourself in help for more.

HotKeySet("^{F9}","Quit") ;press CTRL+F9 to exit
HotKeySet("^{F8}","Start") ;press CTRL+F8 to start
HotKeySet("^{F7}","Stop") ;press CTRL+F7 to stop

Global $RUN = False

While 1
    If $RUN Then ClickPoint()
    Sleep(20)
WEnd

Func Start()
    $RUN =  True
EndFunc

Func Stop()
    $RUN = False
EndFunc

Func ClickPoint()
    MouseClick("left",289,56,1) ;Click left mouse button at position 289,56 one time.
EndFunc

Func Quit()
    Exit
EndFunc
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
hardrockeur38

More complete script, but check yourself in help for more.

HotKeySet("^{F9}","Quit") ;press CTRL+F9 to exit
HotKeySet("^{F8}","Start")
HotKeySet("^{F7}","Stop")

Global $RUN = False

While 1
    If $RUN Then ClickPoint()
    Sleep(20)
WEnd

Func Start()
    $RUN =  True
EndFunc

Func Stop()
    $RUN = False
EndFunc

Func ClickPoint()
    MouseClick("left",289,56,1) ;Click left mouse button at position 289,56 one time.
EndFunc

Func Quit()
    Exit
EndFunc
thank you

i'll try this

I crash again my computer if necessary lol

If it is good, i'll tell you

And I love the help that is giving on this forum.

Now, i'll try to read as you have said the help a small part, but i don't understand all, it is a reason more to progress in English lol

Bye !

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  

×