www.ClassicTW.com
https://mail.black-squirrel.com/

Script speed
https://mail.black-squirrel.com/viewtopic.php?f=15&t=17930
Page 1 of 1

Author:  Kaus [ Tue Oct 17, 2006 2:37 am ]
Post subject: 

I know Waitfor slows things down but any suggestions on how to speed up a script? Is there a burst command in twx that scripters can use to speed things up?

-Kaus

Author:  RexxCrow [ Tue Oct 17, 2006 2:55 am ]
Post subject: 

Do you mean like putting a space in your send commands to abort displays? i.e. "L *TNL1 *" or "L ^MTNL1 ^M" * and ^M are both use for CR's (Carriage Returns.)

Author:  Kaus [ Tue Oct 17, 2006 3:09 am ]
Post subject: 

yea i have those now.. just I'm looking to speed Terra farmer up without removeing waitfor's but that is prolly what ill have to do.

Author:  RexxCrow [ Tue Oct 17, 2006 3:22 am ]
Post subject: 

Yea, just set triggers for whatever you need to keep an eye out for and let spaced macro ‘sends’ fly, that is the best way to get your scripts to really smoke. Be careful though abort too much and your triggers will not be able to catch what you are watching for and you will reach fuse-land in quick, fast, and in a hurry.

Author:  Promethius [ Tue Oct 17, 2006 3:31 am ]
Post subject: 

quote:Originally posted by RexxCrow

Yea, just set triggers for whatever you need to keep an eye out for and let spaced macro ‘sends’ fly, that is the best way to get your scripts to really smoke. Be careful though abort too much and your triggers will not be able to catch what you are watching for and you will reach fuse-land in quick, fast, and in a hurry.


You can also just set cn9 to "ALL KEYS" - eliminates the need for spaces. This can mess some other scripts up though.

Author:  Kaus [ Tue Oct 17, 2006 3:44 am ]
Post subject: 

quote:Originally posted by Promethius

quote:Originally posted by RexxCrow

Yea, just set triggers for whatever you need to keep an eye out for and let spaced macro ‘sends’ fly, that is the best way to get your scripts to really smoke. Be careful though abort too much and your triggers will not be able to catch what you are watching for and you will reach fuse-land in quick, fast, and in a hurry.


You can also just set cn9 to "ALL KEYS" - eliminates the need for spaces. This can mess some other scripts up though.


What does "ALL KEYS" do? any key will skip pause?

Author:  Kaus [ Tue Oct 17, 2006 3:46 am ]
Post subject: 

quote:Originally posted by RexxCrow

Do you mean like putting a space in your send commands to abort displays? i.e. "L *TNL1 *" or "L ^MTNL1 ^M" * and ^M are both use for CR's (Carriage Returns.)


Does ^M work in Twx scripting language as a return that might be what im looking for. I feel naked without WAITFOR as I know if you dont slow it down you risk having things go awire.

Author:  Singularity [ Tue Oct 17, 2006 4:11 am ]
Post subject: 

send "'hello*"

Asterisk is the carriage return. Check my macro tutorial on grimy, I show of a little technique you can use to to burst a macro and waitfor text at the same time in order to keep stuff in synch. It's basically this:

quote:" q q sh* l 99 * c "
waitFor "Select (H)olo Scan or (D)ensity Scan or (Q)uit? [D] H"
waitFor "Warps to Sector(s) :"

That lifts, scans, lands and puts you in the cit. Then waits for the information to arrive before processing, you'll be landed before anyone can shoot at you but still make sure you've completed the scan before moving on.

Author:  ElderProphet [ Tue Oct 17, 2006 4:30 am ]
Post subject: 

^M doesn't work. Just use * for returns.

I believe that you should perfect using Spaces for aborting text, then you can selectively abort, which is far handier for speeding up scripts.

When I think "speeding up", I think optimization. But I believe that you are talking about making the script complete loops faster, without the pauses that all the safety checking introduces. The best tradeoff between safetly and loop speed is probably queing one cycle, or a half-cycle against the server.

So say your scripts moves to Terra, grabs colos, returns to base, dumps colos, repeat. Let's say you set $macro to be "tnt121*cb1*ylt*q1234*yylsnl1*" (spaces omitted for legibility). You can send $macro & "@" & $macro & "@", then set yourself a waitOn "Average Interval Lag:" before sending another $macro & "@". This will keep one loop queued, so the server is never waiting on the next command. But, if something goes haywire, it will try to execute the queued macro before you can do anything. So it isn't incredibly dangerous, but neither is it really safe. If you learn to buffer your commands using z and n and such, then you can make it relatively safe. Read Dynarri's Macro Tutorial at Grimy for an introduction to command buffering.

You see, you've sent it enough data to see "Average Interval Lag:" twice. But after you see the first one, and before you see the second one, you've already queued another sequence and another "@". So the server is always trying to play catch up. I refer to this as keeping a queue on the server. Remco referred to it as overclocking, but that means something very different to me. But whatever you call it, it keeps you from being the bottleneck.

+EP+

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/