|
You last visited: Today at 06:21
Advertisement
Click in backround
Discussion on Click in backround within the AutoIt forum part of the Coders Den category.
06/14/2014, 19:28
|
#1
|
elite*gold: 0
Join Date: Jan 2013
Posts: 14
Received Thanks: 2
|
Click in backround
Hi I got this
HotKeySet("{NUMPAD7}","_start")
HotkeySet("{NUMPAD8}","_pause")
HotKeySet("{NUMPAD9}","_exit")
Global $active = 0
While 1
If $active = 1 Then
MouseClick ("left")
MouseClick ("right")
EndIf
WEnd
Func _start()
$active = 1
EndFunc
Func _pause()
$active = 0
EndFunc
Func _exit()
Exit
EndFunc
How to run this in the backround?
|
|
|
06/14/2014, 19:47
|
#2
|
elite*gold: 0
Join Date: Mar 2012
Posts: 6
Received Thanks: 0
|
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.
Func _pause()
if $active = 0 then $active = 1
elseif $active = 1 then $active=0
endif
EndFunc
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
While 1
while active <> 1
sleep(500)
wEnd
If $active = 1 Then
MouseClick ("left")
MouseClick ("right")
active = 0
EndIf
WEnd
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
|
#3
|
elite*gold: 0
Join Date: Jan 2013
Posts: 14
Received Thanks: 2
|
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
|
#4
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Use ControlClick, look up the usage on the documentation.
|
|
|
06/15/2014, 16:59
|
#5
|
elite*gold: 0
Join Date: Jan 2013
Posts: 14
Received Thanks: 2
|
So now I got this.. and get an parsing error
HotKeySet("{NUMPAD7}","_start")
HotkeySet("{NUMPAD8}","_pause")
HotKeySet("{NUMPAD9}","_exit")
Global $active = 0
While 1
If $active = 1 Then
ControlClick ("Minecraft 1.7.5", "" [, button = "left"])
ControlClick("Minecraft 1.7.5", "" [, button = "right"])
EndIf
WEnd
Func _start()
$active = 1
EndFunc
Func _pause()
$active = 0
EndFunc
Func _exit()
Exit
EndFunc
|
|
|
06/15/2014, 19:44
|
#6
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Wow, who saw that coming.
|
|
|
06/15/2014, 20:34
|
#7
|
elite*gold: 0
Join Date: Jan 2013
Posts: 14
Received Thanks: 2
|
Sorry for being nooby but these comments do not help >.>
May you just write that for me?
|
|
|
06/15/2014, 20:49
|
#8
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Quote:
Originally Posted by loltoaster
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
|
#9
|
elite*gold: 0
Join Date: Jan 2013
Posts: 14
Received Thanks: 2
|
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
|
#10
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
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
|
#11
|
elite*gold: 0
Join Date: Jun 2010
Posts: 11
Received Thanks: 2
|
Hi!
Here is a little script for the left button.
Adapt it in order to use the right button too.
#include <SendMessage.au3>
#include <WindowsConstants.au3>
HotKeySet("{NUMPAD7}","_start")
HotkeySet("{NUMPAD8}","_pause")
HotKeySet("{NUMPAD9}","_exit")
Global $hWndControl = WinGetHandle ("Minecraft 1.7.5")
While 1
;nothing
WEnd
Func _start()
_SendMessage($hWndControl, $WM_LBUTTONDOWN)
EndFunc
Func _pause()
_SendMessage($hWndControl, $WM_LBUTTONUP)
EndFunc
Func _exit()
Exit
EndFunc
++
|
|
|
07/11/2014, 06:48
|
#12
|
elite*gold: 0
Join Date: Nov 2009
Posts: 105
Received Thanks: 8
|
Quote:
Originally Posted by loltoaster
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
|
#13
|
ベトナム警察
elite*gold: 0
Join Date: Jan 2012
Posts: 16,497
Received Thanks: 3,524
|
Quote:
Originally Posted by VitorCornelius
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
|
|
|
Similar Threads
|
[Buying] Homepage Backround
11/12/2013 - Artist Trading - 1 Replies
----
|
[S]YT Backround [B]59 E*Gold
01/26/2013 - Trading - 0 Replies
Topic
Addet mich in Skype: ruffysshop.epvp
Ist zwar wenig aber es mus ja nicht der beste background der welt sein.
(aber auch nicht zu ausgelutscht) ^^
|
backround für youtube
11/25/2012 - Video Art - 2 Replies
hallo leute ,
suche jmd der mir backround für mein youtube kanal machen kann .
per pn melden !
mfg
buya
|
[S]Yt Backround[B]15egold
11/27/2011 - elite*gold Trading - 2 Replies
Topic
Es sollte richtig Nice sein mit Paar Efekte oder so
Das sollte diese Name stehen "eylan1" ohne das "
mfg
|
ElitePvPers Backround
05/01/2008 - Conquer Online 2 - 14 Replies
Hey everyone. I just made a REALLY BAD ElitePvPers wallpaper. If ya like it tell me- and I want suggustions!
|
All times are GMT +1. The time now is 06:21.
|
|