View unanswered posts | View active topics It is currently Mon Sep 25, 2017 3:01 am



Reply to topic  [ 87 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
 TWX Proxy Feature Request 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 259
Unread post Re: TWX Proxy Feature Request
Hey EP, question about another possible addition to TWX, having it track the planets by the planet number assigned to them by the game. Would help in a lot of scripts where you use a generic name for the planets.

I was thinking maybe as part of the getSector command maybe? You already have .PLANETS and .PLANET[$x], maybe .PLANETNUM[$x] or .PLANET.NUMBER[$x] or something like that. Don't know how hard it would be, but I think it would be pretty handy to have.


Wed Jun 20, 2012 1:51 am
Profile
Gunnery Sergeant

Joined: Thu Feb 07, 2008 10:02 pm
Posts: 23
Unread post Re: TWX Proxy Feature Request
V'Ger wrote:
It would be nice to have a trim spaces command, so if we are grabbing a field it takes out all leading and trailing spaces.


So... I wrote the following block of code, only to realize that, in addition to whacking leading and trailing whitespace, it turns all multiple spaces into single spaces. Did you ever solve this problem? A correct answer would be much appreciated.

A regex engine would solve all of our woes. :-)
Code:
# input and return value is found in $strip_me
:stripTrailingWhitespace
  # Look for empty string.  Return the same.
  getLength $strip_me $me_length
  if (0 = $me_length)
    return
  end
  setVar $newString ""
  setVar $strip_wc 1
  setVar $done 0
  while (0 = $done)
    getWord $strip_me $a_word $strip_wc
    if ($a_word <> 0)
      # Found a word!
      if (1 = $strip_wc)
        # First word.  Set it first word.
        setVar $newString $a_Word
      else
        # Not the first word.  Add a space and the next word.
        # Bad news bears - multiple spaces not accounted for
        setVar $newString $newString & " " & $a_word
      end
      add $strip_wc 1
    else
      setVar $done 1
    end
  end
  # Actual word count, if needed
  subtract $strip_wc 1
  setVar $strip_me $newString
  # Patch up null string.  Any null string here is actually a 0.
  getLength $strip_me $me_length
  if (0 = $me_length)
    setVar $strip_me "0"
  end
return


Sat May 11, 2013 2:30 am
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1099
Location: Augusta, GA
Unread post Re: TWX Proxy Feature Request
I did indeed add a Trim function. Again, I'm uncertain if it's in the releases that are in circulation, so you'll have to test. I'm working on an updated build, which I'll compile and release soon. The syntax is simply:
Trim var

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Sun May 12, 2013 6:27 pm
Profile WWW
Gunnery Sergeant

Joined: Thu Feb 07, 2008 10:02 pm
Posts: 23
Unread post Re: TWX Proxy Feature Request
ElderProphet wrote:
I did indeed add a Trim function. Again, I'm uncertain if it's in the releases that are in circulation, so you'll have to test. I'm working on an updated build, which I'll compile and release soon. The syntax is simply:
Trim var


*trumpets, fanfare, applause*

Thanks! :-)


Sun May 12, 2013 7:32 pm
Profile
Chief Warrant Officer

Joined: Sun Mar 06, 2011 12:22 am
Posts: 118
Unread post Re: TWX Proxy Feature Request
Regarding endless loops, would there be anyway to detect endless loops? When I accidentally make one, I always need to kill TWX Proxy, which is wrong on many levels.

Something like "Grey Gamer, you are an idiot. Do push-ups" would be great.


Mon May 13, 2013 3:59 am
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1099
Location: Augusta, GA
Unread post Re: TWX Proxy Feature Request
I've put some work in to the endless loop problem. I'll have to revisit the source code this evening to check on it. I'll let you know where it stands.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Mon May 13, 2013 11:43 am
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 1865
Location: Oklahoma City, OK 73170 US
Unread post Re: TWX Proxy Feature Request
Grey Gamer wrote:
Regarding endless loops, would there be anyway to detect endless loops? When I accidentally make one, I always need to kill TWX Proxy, which is wrong on many levels.

Something like "Grey Gamer, you are an idiot. Do push-ups" would be great.

I'm guilty of that one too...
IIS 7 doesn't have loop detection either :/

_________________
Regards,
Micro

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

"The goal is to turn data into information, and information into insight.”


Mon May 13, 2013 5:16 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1099
Location: Augusta, GA
Unread post Re: TWX Proxy Feature Request
On a side note... performing a long variable dump can be almost as annoying as an endless loop. It's not uncommon for me to use multiple arrays with 20000 elements, and if you screw up and do a variable dump, you'll be there a long while. But no more. If you press the Escape key during a variable dump, it will now stop.

Again, this feature was added in a recent version, so it may or may not be present in yours. But hey, the next time you screw up and do a massive variable dump, maybe this tidbit will come back to you as you smack your forehead, and you'll be able to escape it.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Mon May 13, 2013 10:32 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3367
Location: Los Angeles, CA
Unread post Re: TWX Proxy Feature Request
ElderProphet wrote:
On a side note... performing a long variable dump can be almost as annoying as an endless loop. It's not uncommon for me to use multiple arrays with 20000 elements, and if you screw up and do a variable dump, you'll be there a long while. But no more. If you press the Escape key during a variable dump, it will now stop.

Again, this feature was added in a recent version, so it may or may not be present in yours. But hey, the next time you screw up and do a massive variable dump, maybe this tidbit will come back to you as you smack your forehead, and you'll be able to escape it.

If the newer version has windows 7/vista tray control then I want to try it :)

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Getting (re)started in TradeWars? Time to update the package, its been 3 years.
Lest we forget


Tue May 14, 2013 4:02 am
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 1865
Location: Oklahoma City, OK 73170 US
Unread post Re: TWX Proxy Feature Request
I would like to try the new version too...

_________________
Regards,
Micro

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

"The goal is to turn data into information, and information into insight.”


Tue May 14, 2013 8:52 am
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1099
Location: Augusta, GA
Unread post Re: TWX Proxy Feature Request
Helix wrote:
If the newer version has windows 7/vista tray control then I want to try it :)
It has the same tray icon and control as always. Is the version you're using missing something? Please elaborate. I know that you may need to hit the little triangle in the system tray, select 'Customize', and then choose 'Show icon and notifications' so the TWX icon always shows up. Other than that, it behaves like previous versions.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Tue May 14, 2013 5:30 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3367
Location: Los Angeles, CA
Unread post Re: TWX Proxy Feature Request
ElderProphet wrote:
Helix wrote:
If the newer version has windows 7/vista tray control then I want to try it :)
It has the same tray icon and control as always. Is the version you're using missing something? Please elaborate. I know that you may need to hit the little triangle in the system tray, select 'Customize', and then choose 'Show icon and notifications' so the TWX icon always shows up. Other than that, it behaves like previous versions.


The version we are using has an updated tray control that you added because the old one crashed when you tried to right-click it using Vista or Windows 7. Sing is the one who compiled the 2.05 we are using on windows 7

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Getting (re)started in TradeWars? Time to update the package, its been 3 years.
Lest we forget


Tue May 14, 2013 9:29 pm
Profile WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1099
Location: Augusta, GA
Unread post Re: TWX Proxy Feature Request
Well that stinks. I'll compile and release a stable build by next Friday.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Wed May 15, 2013 5:37 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 1865
Location: Oklahoma City, OK 73170 US
Unread post Re: TWX Proxy Feature Request
Has anyone tried running TWX Proxy on Windows 8?

I don't have windows 8, but I know MicroSoft made changes that are messing up older programs.

_________________
Regards,
Micro

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

"The goal is to turn data into information, and information into insight.”


Wed May 15, 2013 6:00 pm
Profile ICQ YIM WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 1865
Location: Oklahoma City, OK 73170 US
Unread post Re: TWX Proxy Feature Request
Is there any way to disable the "Script Terminated" message on a normal/successful script exit?

_________________
Regards,
Micro

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

"The goal is to turn data into information, and information into insight.”


Thu May 16, 2013 7:06 am
Profile ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 87 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 2 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.