Click in backround

06/14/2014 19:28 loltoaster#1
Hi I got this

How to run this in the backround?
06/14/2014 19:47 seanbrockest#2
Looks like you actually already have the right code in place to make this all work, you just dont know what you've got. That probably means you copied code/structure from someone else. That's not a horrible thing, that's how we all learn.

You just need to think about this a little different.

First, try this for your "start" function. Lets call it "pause" instead.

This turns pause on and off, letting you pause and unpause the program anytime.

Next, your main routine needs to reflect that. Lets add a waiting while loop



So, this checks to see if you want the program active. If not, it waits 500ms, then checks again. As long as active=0, it just keeps checking

If however you press unpause (active) it runs your "if" once, then turns active off again, and it goes back to checking.

Does that help?
06/14/2014 22:30 loltoaster#3
No I didn't copied it... It should repeat the right and left click infinite till I press pause or stop. And my problem is that I don't want the program to click in forground..
06/14/2014 22:32 alpines#4
Use ControlClick, look up the usage on the documentation.
06/15/2014 16:59 loltoaster#5
So now I got this.. and get an parsing error
06/15/2014 19:44 alpines#6
Wow, who saw that coming.
06/15/2014 20:34 loltoaster#7
Sorry for being nooby but these comments do not help >.>

May you just write that for me?
06/15/2014 20:49 alpines#8
Quote:
Originally Posted by loltoaster View Post
Sorry for being nooby but these comments do not help >.>

May you just write that for me?
Why should I? It seems that you don't even know AutoIt basics. Better go and learn them and show a real attempt.
06/16/2014 16:37 loltoaster#9
And you don't want to teach/show me the basics. You're too cool and good to share you knowledge huh?
06/16/2014 17:33 alpines#10
Wow, it's getting even more ridiculous.
Why should I spend my time with teaching you the basics if they are everywhere in the internet which explain it better than me? Instead of wasting your time here you would be already able to correct your script.
06/16/2014 17:46 periaz#11
Hi!

Here is a little script for the left button.
Adapt it in order to use the right button too.


++
07/11/2014 06:48 VitorCornelius#12
Quote:
Originally Posted by loltoaster View Post
No I didn't copied it... It should repeat the right and left click infinite till I press pause or stop. And my problem is that I don't want the program to click in forground..
And where are the coordinates, where you wana click? Definitely copy paste.

Did you tried to use Help file? Useful stuff, and easy to use, and you get all answare from it.

With a minimal english knowleadge and logic and low IQ, you can find out what bull... did you wrote in your script...
07/11/2014 13:44 Lumi#13
Quote:
Originally Posted by VitorCornelius View Post
And where are the coordinates, where you wana click? Definitely copy paste.

Did you tried to use Help file? Useful stuff, and easy to use, and you get all answare from it.

With a minimal english knowleadge and logic and low IQ, you can find out what bull... did you wrote in your script...
Look at the date, dude. -_- You pushed 1 month older thread.

Btw.:

Replace x and y with your coordinates.

Code:
HotKeySet("{NUMPAD7}","_start")
HotkeySet("{NUMPAD8}","_pause")
HotKeySet("{NUMPAD9}","_exit")

Global $active = 0


While 1
If $active = 1 Then
ControlClick ("Minecraft 1.7.5", "", "", "left", 1, x, y)
ControlClick("Minecraft 1.7.5", "", "", "right", 1,  x, y)
EndIf
WEnd 

Func _start()
$active = 1
EndFunc

Func _pause()
$active = 0
EndFunc

Func _exit()
Exit
EndFunc