Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Need scripting help...

Discussion on Need scripting help... within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1

 
Angelsblood's Avatar
 
elite*gold: 44
Join Date: Feb 2012
Posts: 444
Received Thanks: 67
Need scripting help...

Hello everyone,

i made a simple Script, which needs another Script to work fully. It actually collects Items through color detection, but each 2minutes i need the script to pause to click onto another 2 things (coordinates) and wait another 90 seconds, afterwards it should start collecting again... and again...


Greetings Angel

Leave me a message here or privately
Angelsblood is offline  
Old 06/22/2015, 12:04   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Pausing the other script is actually pretty easy. You can use NtSuspendThread for this.
To resume the process just use NtResumeThread.

Here's an UDF for AutoIt.


With this way you have to click the "2 things" with the script which pauses the main one.
So either you edit the script you want to pause or you'll do it this way.
alpines is offline  
Old 06/23/2015, 18:01   #3
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by alpines View Post
Pausing the other script is actually pretty easy. You can use NtSuspendThread for this.
To resume the process just use NtResumeThread.

Here's an UDF for AutoIt.


With this way you have to click the "2 things" with the script which pauses the main one.
So either you edit the script you want to pause or you'll do it this way.
I guess he's actually not trying to suspend any other scripts^^ Instead he's trying to do some actions every x seconds.

In that case, you might take a look @ the AdlibRegister function. That function interrupts your script in specified periods to do some other actions
lolkop is offline  
Old 06/23/2015, 20:11   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
That's why I suggested both ways.
alpines is offline  
Old 06/23/2015, 21:40   #5

 
Angelsblood's Avatar
 
elite*gold: 44
Join Date: Feb 2012
Posts: 444
Received Thanks: 67
Could someone add the AdlibRegister thingy to this Source code... It should run 2minutes pause and run Func "2" whichs needs to be made too (just a template to click on 2 coordinates and pause another 2 minutes) then repeat from the beginning....


Angelsblood is offline  
Old 06/23/2015, 22:09   #6
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by Angelsblood View Post
Could someone add the AdlibRegister thingy to this Source code... It should run 2minutes pause and run Func "2" whichs needs to be made too (just a template to click on 2 coordinates and pause another 2 minutes) then repeat from the beginning....
Just add this on top of your script...
Code:
AdlibRegister('extra', 120000)
Func extra()
   MouseClick('left', 1, 1)
   MouseClick('left', 100, 100)
EndFunc
It'll call the "extra" function every 120 seconds.
lolkop is offline  
Old 06/23/2015, 22:14   #7

 
Angelsblood's Avatar
 
elite*gold: 44
Join Date: Feb 2012
Posts: 444
Received Thanks: 67
Thanks for this - how do i make the other Func pause while it does those clicks?

E: Also need a code to detect a point to click (x, y) in my defined area (444, 46, 1464, 802) which is connected to my $color... //but i need it without the color to do the 2 requested clicks...
Angelsblood is offline  
Old 06/23/2015, 23:21   #8
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by Angelsblood View Post
Thanks for this - how do i make the other Func pause while it does those clicks?

E: Also need a code to detect a point to click (x, y) in my defined area (444, 46, 1464, 802) which is connected to my $color... //but i need it without the color to do the 2 requested clicks...
Like I said, before... adlib interrups the script while it executes it's function.

The "extra function in this case will get executed every 120seconds no matter what's currently going on in your script. when the function finishes, the script will go on, from the point it got interrupted.

So if you need to add stuff to the "extra" function, simply add it...

But keep in mind, that every second the "extra" function wastes, the rest of the script stays inactive. So you should try to keep it simple and efficient.
lolkop is offline  
Old 06/23/2015, 23:31   #9

 
Angelsblood's Avatar
 
elite*gold: 44
Join Date: Feb 2012
Posts: 444
Received Thanks: 67
Okay now i have to figure out how to make sure it walks/clicks (no matter where my character stays...) to the point it needs to stay befor doing "extra"
Angelsblood is offline  
Old 06/24/2015, 16:41   #10
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by Angelsblood View Post
Okay now i have to figure out how to make sure it walks/clicks (no matter where my character stays...) to the point it needs to stay befor doing "extra"
Well that's up to you.

Coding/scripting wouldn't be fun (or even necessary), if there were no problems to solve :P
lolkop is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Selling] Lua scripting
09/07/2014 - Guild Wars 2 Trading - 0 Replies
I'm offering my service in lua scripting as the most popular bot out there (mmominion) has a lua based api which mean you can script the bot to do almost anything. Payment will depend on the size of the project. Skype: mmorunner
CE 6.1 scripting.
04/27/2012 - Cabal Online - 3 Replies
since i have background experience in programming does ce have a special syntax to code in. example. for character animation rather then using hot keys i want it to be programmed to automatically set value to 7 without me doing actually anything. basically part of the lua script but what refference or variables would i need to use.
lua scripting?
10/08/2008 - World of Warcraft - 8 Replies
hi! wollte mal probieren n bisschen mit lua rum zuprogrammieren (für bosscasts oder sowas auf pserver) und weis nich wo ich n gutes tut herbekomme^^ kenne mich halbwegs mit C++ aus hoffe es kann mir jemand helfen mfg fr3ak0ut
LUA Scripting
06/23/2006 - World of Warcraft - 2 Replies
Moin, Suche einen LUA Scripter der mir folgendes AddOn machen könnte: Mein Bankchar steht z.B. in Ironforge rum. Wenn mich nun z.B. ein Gildenspieler mit dem Text "Bankinhalt" anwhispert, soll das AddOn automatisch checken was in der Bank ist und ihm anschliessend sofort zurücksenden was in der Bank vorhanden ist und in welcher Menge. Wenn sowas möglich ist, wäre es echt cool wenn mir jemand helfen könnte. Bin gerne für ander Vorschläge offen, wenn meiner nicht geht! Schonmal Danke...



All times are GMT +1. The time now is 06:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.