View Full Version : Multi-threading
pinoyid0l
01-27-2009, 02:18 AM
Is there a way within scar to multi-thread? or run functions at the same time?
But not running multiple scar instances.
Example: I want mining (finding ores) while responding to messages while simulating human behavior movements.
I did succeed combining a mining scar script here, to auto responder I made in VBscript (using database techniques, and it finds what message to respond faster in a big database of text). but I find this a dirty approach. Any help to it all within scar? also the database techniques.
Thank you.
Method
01-27-2009, 02:42 AM
You can use the SetTimeout procedure to call functions automatically every x seconds (where you set x in SetTimeout), but that's probably as close to multi-threading as you're going to get with SCAR.
EDIT: Also, there is usually some lag associated with that procedure, so use it carefully.
boberman
01-27-2009, 04:08 AM
You can use the SetTimeout procedure to call functions automatically every x seconds (where you set x in SetTimeout), but that's probably as close to multi-threading as you're going to get with SCAR.
EDIT: Also, there is usually some lag associated with that procedure, so use it carefully.
That's not true multithreading though, its more like program interruption.
Method
01-27-2009, 05:16 AM
That's not true multithreading though, its more like program interruption.
Right, that's why I didn't say it was "true multithreading". :eek:
senrath
01-27-2009, 08:01 AM
Just be careful when using SetTimeout, so that whatever procedure or function it is calling doesn't interfere with the rest of the script. Ie, it's probably best not to use it with any procedure or function that moves the mouse.
pinoyid0l
01-27-2009, 10:09 AM
Many thanks for the reply.
I'm actually trying to take advantage of multi-core cpu's. SetTimeout, I had no problem with mouse movements since I did it in a separate function. But I found that it doesn't improve responsiveness which is my primary reason in doing this project..
I've done a dirty trick with auto-respond while mining. It work's fine.
Also, I wanted to know, is there a chance to approve a script here not made with scar? I wanted to release this to have free bug testers =).
MasterKill
01-27-2009, 10:17 AM
Also, I wanted to know, is there a chance to approve a script here not made with scar? I wanted to release this to have free bug testers =).
Programming General Programming Forum. For the Programming community.
http://www.srl-forums.com/forum/images/satellite/misc/navbits_finallink.gifProgramming (http://www.srl-forums.com/forum/programming-f148.html?s=&daysprune=&f=148)
good luck ;)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.