View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:21 am



Reply to topic  [ 11 posts ] 
 "User Actions" in SWATH? 
Author Message
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post "User Actions" in SWATH?
Swath has a "User Actions" toolbar, but for the life of me I can't figure out what it's supposed to do. What are they and how do you use them?

It looks like you're supposed to maybe be able to assign macros or key shortcuts or something to them, but I can't find any options to do that. The help text only mentions that they exist as an option in View->Toolbars.


Fri Jul 23, 2021 4:09 am
Profile
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
And of course I've wondered and looked off and on for this for a week, but a few minutes after posting I figured it out =P

For the 3 people like me that probably don't know:

Under Edit->Triggers you can choose the User Actions as a trigger, then assign any of a bunch of actions (including triggering a specific script, which is what I wanted).

Actually, the triggers are a little more powerful than I expected. I knew you could trigger on a few things, but not quite so many, or so many different kinds of actions. That's nice.

K really did do a great job on this client. The API is also really nice and really clean.


Fri Jul 23, 2021 4:18 am
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: "User Actions" in SWATH?
Ripcord wrote:
K really did do a great job on this client. The API is also really nice and really clean.


I glanced at the scripting API, and it looks like he put a lot of work into it, and the database is very well written. Unfortunately, Swath is SLOW, so everyone scrips in TWX Proxy. The TWX scripting language looks like DOS 1.0 and the database is disorganized and incomplete. but there is no faster way to kill yourself that running Rammers unfigged gridder.

TWX Proxy MEGA installer!!!

The installer includes the latest version of Classic TWX Proxy! and ALL of your Favorite public Bots. Plus Over 350+ public scripts just to get you started. Everything a new or returning player needs to hop right into a game.

http://microblaster.net/files/twxp/twxproxy26.msi

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Mon Jul 26, 2021 2:24 am
Profile ICQ YIM WWW
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
I've tried to get into TWX Proxy but it FEELS like running Windows 3, which I don't like. SWATH at least feels like I'm in the early 2000s =) But I guess I haven't used it enough to understand what's really good/bad about it.

Can you give me some examples of where SWATH is slow? I haven't found any yet but I'm just getting (back?) into things and have been doing mostly building games. Although I'm troubleshooting an issue right this second where SWATH will randomly be slow processing sectors with one script and if there's a way to avoid it, but it's so unusual I'm guessing that's not what you mean.

My concern with SWATH is that if Klein both isn't working on it ever again, but also isn't interested in opening or selling it, it's kind of dead. Also seems like the most likely client to attract new players.

Edit: Also it's interested, although I see there's a jillion more TS scripts written than SWATH scripts, while I've been exploring servers it's been pretty clear a bunch of people still use SWATH. I assumed it was a lot more popular than I guess it is, and that people were just using MD's scripts.

Either way I'll be slowly posting my updates to MD's scripts (or anything else I come up with) to github in case anyone can use them.


Mon Jul 26, 2021 4:37 am
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: "User Actions" in SWATH?
If I run a script in TWX, say a simple ZTM script. It runs so fast that swath just can't keep up. The swath interface locks up and continues scrilling for minutes after the script has finished. Swath has a built in ZTM, but it can take at least twice as long to run as a TWX script, and that goes for every script in swath from colonizing to world trade. TWX scripts are also more evolved, there are a dozen or so ZTMs in TWX, and ALL of them will yield 98-99% of the warps, while swath can barely get 50%. Just remember to hit the "Suppress Text Output" button before running anything that scrolls a lot. You can connect putty and swath to TWX at the same time, and putty does not have any trouble keeping up with TWX. You still want Swath running, so it can collect the warp data, or you can export it from TWX and import into swath when the ZTM finishes.

Like I said, it looks line DOS 1.0 witch is a decade older than windows 3.x, so I do not know why it became so popular. I learned Pascal, because I got tired of it crashing all the time, and I fixed it. Now I am adding new features and plan on porting it to c#/.net 5. I have tried to make it look more like a programming language, by adding assignment operators and I am working on Library commands to replace includes.

I also wrote an extention for VS Code to make reading TWX script bearable:
https://github.com/TW2002/twscript

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Jul 27, 2021 12:55 pm
Profile ICQ YIM WWW
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
Thanks Micro, and thanks for what you've done to keep things alive and improve things. I don't think I'd have had the guts to go back to Pascal =)

A lot of the things you described sound like things that could be improved with better scripts, but I understand there's some things that just can't happen without work on SWATH itself.

I just hate to see all the great work Klein did go down the drain, and it's still overall an excellent client IMO.

Not being maintained or being open source is a pretty big problem, though.


Tue Jul 27, 2021 1:48 pm
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: "User Actions" in SWATH?
One of the problems with Swath is that it insists on displaying EVERY line it receives. If you watch Putty closely, you might notice that it skips lines, or even whole screens. In other words, it only displays the last screen received, and does not try to display every line as it has received.

The scripting language in Swath is Java, so I am not a fan. In my experience, which is mostly java apps in a web browser, the apps take forever to load, and they are always buggy because the constant Java updates are not fully backwards compatible.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Jul 27, 2021 8:28 pm
Profile ICQ YIM WWW
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
Right, PuTTY seems to accumulate a bit more from telnet before displaying, although I'm not sure about "whole screens". (MobaXterm would absolutely by my choice over PuTTY for a bunch of reasons, have you used it with TWXProxy at all?)

One thing I found yesterday that seems to help SWATH performance a bit is to enable immediate ACK (this is also common when trying to increase responsiveness from any telnet-ish software).

https://social.technet.microsoft.com/Fo ... networking

And that's BOTH TCPNoDelay and TckAckFrequency, since both are needed to deliver data to SWATH immediately, and to send ACKs back to TWGS immediately.

It didn't help with ZTM speed for me, but it definitely sped up a handful of other scripts (colonizing, resource moving) by about 60-80%. At least for the few I measured. The interface also feels a bit more smooth in general. It might improve putty/moba at least somewhat too (less likely if the server works over ssh, but not aware of many that do offhand). Doesn't fix all of SWATH's issues though. But it has made a pretty big difference for me for several things.


Last edited by Ripcord on Wed Jul 28, 2021 5:03 am, edited 1 time in total.



Wed Jul 28, 2021 4:52 am
Profile
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
> The scripting language in Swath is Java, so I am not a fan. In my experience, which is mostly java apps in a web browser, the apps take forever to load, and they are always buggy because the constant Java updates are not fully backwards compatible.

Java is the most popular language for big apps and server apps still. And while it's not my favorite (or in the top 3 depending on what it's used for), it's a great language with a really really extensive library set.

Yeah, a lot of people remember Java applets from the 90s which were slow and sucked and there's good reasons why they died.

But Java overall is a pretty good/fast language at this point (can't exactly reach well-optimized C++ speeds but it can be close). But faster in general than a ton of stuff.

One thing I DO like about Java is that it forces/encourages you to follow very strict object-oriented class and type structures. Which annoys some people, but it's GREAT when writing something like...a scripting API.

SWATH just needs some optimizations here and there, I bet. Unfortunately not going to happen if the project's dead, though.


Wed Jul 28, 2021 5:02 am
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: "User Actions" in SWATH?
I really HATE Java, and I am not a fan of JavaScript either.

https://www.youtube.com/watch?v=Og847HVwRSI

Looks like python is taking over. and my favorite, c#, is holding on to 4th place.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Sun Aug 01, 2021 2:20 pm
Profile ICQ YIM WWW
Staff Sergeant

Joined: Mon Aug 01, 2011 5:24 pm
Posts: 15
Unread post Re: "User Actions" in SWATH?
Micro wrote:
I really HATE Java, and I am not a fan of JavaScript either.

https://www.youtube.com/watch?v=Og847HVwRSI

Looks like python is taking over. and my favorite, c#, is holding on to 4th place.


Yeah, professionally Python is where I spend 90% of my time.

C# is better than Java, but Java's not bad. I'm pretty amazed C# ever got enough traction to make it to 4th though.

And I can't believe nothing better than Javascript (which has nothing to do with Java except marketing) took over its role. But holy crap has there been some impressive stuff written in Javascript, and it powers the web. So I can't knock it too hard.


Mon Aug 02, 2021 3:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.