|
You last visited: Today at 17:12
Advertisement
Auto it- Repeat script until hotkey pressed?
Discussion on Auto it- Repeat script until hotkey pressed? within the AutoIt forum part of the Coders Den category.
08/27/2014, 23:38
|
#1
|
elite*gold: 0
Join Date: Aug 2014
Posts: 1
Received Thanks: 0
|
Auto it- Repeat script until hotkey pressed?
I'm new to Auto it. I've given this my best go and im having issues coming up with solutions...
My goal:
-find an image, mousedown on it for 10 seconds
-switch to another image, mousedown on it for 20 seconds
-repeat until hotkey pressed.
Here's What I got so far:
#include <ImageSearch.au3>
$M = 0
$T = 0
Func Start()
$Search =_ImageSearch( #1imagetitlehere, 0, $M, $T, 0)
If $Search = 1 Then
MouseDown($M, $T, 10000)
Sleep(400)
EndFunc
#include <ImageSearch.au3>
$C = 0
$L = 0
Func Start
$Search =_ImageSearch( #2imagetitlehere, 0, $C, $L, 0)
If $Search = 1 Then
MouseDown($C, $L, 20000)
Sleep(400)
EndFunc
|
|
|
08/28/2014, 01:10
|
#2
|
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
|
#include <ImageSearch.au3>
Hotkeyset("{F7}","_exit")
$x = 0
$y = 0
while 1
$bPic = _ImageSearch(imagename,1,$x,$y,$tolerance)
If $Search = 1 Then
MouseMove($x,$y)
MouseDown("left")
Sleep(10*60*1000)
MouseUp("left")
While 1
$bPic = _ImageSearch(imagename2,1,$x,$y,$tolerance)
If $Search = 1 Then
MouseMove($x,$y)
MouseDown("left")
Sleep(10*60*1000)
MouseUp("left")
Endif
Wend
Endif
wend
Func _exit()
exit
endfunc
not tested
|
|
|
08/28/2014, 18:49
|
#3
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Code:
#include <ImageSearch.au3>
HotKeySet("{ESC}", "_Exit")
Global $images[2][3] = [[@ScriptDir & "\pic1.bmp", 0, 10000], [@ScriptDir & "\pic2.bmp", 0, 20000]]
Global $imagePosX = 0, $imagePosY = 0
Global $imageIndex = 0
While Sleep(10)
$searchResult = _ImageSearch($images[$imageIndex][0], 1, $imagePosX, $imagePosY, $images[$imageIndex][1])
If $searchResult == 1 Then
MouseMove($imagePosX, $imagePosY, 0)
MouseDown("primary")
Sleep($images[$imageIndex][2])
MouseUp("primary")
$imageIndex += 1
If $imageIndex == UBound($images) Then $imageIndex = 0
EndIf
WEnd
Func _Exit()
Exit
EndFunc
|
|
|
 |
Similar Threads
|
Using Auto Hotkey as a bot
11/03/2012 - Ragnarok Online - 3 Replies
Hello fellas,
currently I'm working on a bot that works solely with Autohotkey. Which means it will work on Harmony Servers. It's running quite nice but I got a few problems, for example if the monster is behind a wall the bot will run there but if he doesn't makes it in a certain time he will just fly wing.
I use colordetection to find the mobs which can also cause problems if the mob is moving into a corner of the screen that has already been checked.
So I'm wondering if there are...
|
Auto Hotkey [Hilfe]
05/11/2012 - General Coding - 9 Replies
Hallo,
ich habe heute angefangen mit Auto HotKey...
Ich wollte einen Bot für S4League, "Instant wall Jump" erstellen
Hier mal das Script und vielleicht ist es ganz falsch ka wahrscheinlich sogar aber hoffe ihr könnt mir helfen :)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
|
How to use Auto Hotkey on AFK Splashing?
02/05/2010 - Kal Online - 3 Replies
Hey guys sry to be so noob @ this but i was wondering if u guys could help me in a tutorial how to use AutoHot Key (AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText) for afk splashing with my mage @ a server? :D im using xp sp3 btw. You see i use key 4 for splash and key 3 for mana healing. Please answer ASAP.
Sry again to bother u guys.
|
Auto Hotkey + Script by me :)
09/06/2009 - S4 League - 16 Replies
wenn du den Dash Trick ps + cs noch nicht druff hast.
1. http://www.autohotkey.com/download/AutoHotkeyInsta ll.exe runterladen
2. installieren.
3. AutoHotkey.exe starten
4. bei "File" unter "Edit script" rein.
5. das hier kopieren und einfügen
*f::
Send {1 down}{space} {a down}{space down}
|
Auto hotkey help needed!
02/10/2007 - Conquer Online 2 - 1 Replies
Dear elite pvpers
I am making an auto training macro and it is almost finished, but I need some help:
I've made my macro and it works perfectally but I want it to train my conquer account while that window is minimized so I can do something else at the same time..
Can anyone help me with finding the command to run a script while the specified window is minimized??
text2schild.php?smilienummer=1&text=Thanx in advance..' border='0' alt='Thanx in advance..' />
<hr>Append on Feb 9...
|
All times are GMT +1. The time now is 17:19.
|
|