www.ClassicTW.com
https://www.classictw.com/

Issues with TWXProxy 2.06 commands
https://www.classictw.com/viewtopic.php?f=15&t=35866
Page 1 of 2

Author:  Adept [ Tue Jun 21, 2022 10:19 pm ]
Post subject:  Issues with TWXProxy 2.06 commands

I've been playing around with the new commands and am finding issues with a few of them, so wanted to post them so they might be resolved or to get help using them correctly.

For 'format':

Using 'currency' only ever seems to return: "2E02"
(Question: what is currency supposed to return as opposed to using 'number', a money symbol?), e.g.,

updatequickstats
format CURRENTCREDITS $Credits CURRENCY
echo "You have $" $Credits " available."

And it appears that strtodatetime and datetimetostr are cross-wired,
# e.g., only the below seems to function as intended:

format "07/04/1776 08:14:23" $obj1 strtodatetime
format "-45103.343321759261000" $obj2 datetimetostr
echo "*" $obj1 "*" $obj2 "*"

For 'getDirList' after numerous attempt to figure out its correct syntax it only ever seems to return '0'

For 'padLeft' and 'padRight' neither appear to function at all.
(I have further thought on this as well; for this function, it would be better to pad the string passed onto it with consideration of its length.
For example:

$line1 := "My data is here" (length is: 15)
padLeft $line1 20
echo $line1 "[12345]My data is here" (length is now 20--numbered spaces for visual concept.) Also a padBoth function might be nice too.)

#For me, the following variables return only themselves as their literal names:

GAMEDATA, BOTLIST, ACTIVEBOTDIR, and ACTIVEBOTNAME

Also, I am not certain that the TWGS version info is correct, TWXProxy is showing my versions as: Classic, 3.13, and 1.03; however, I am on v2.20b, 3.34b Gold, and TWGS v2--I presume my version would not be considered the Classic edition.

I have not tested this one, but what would 'openInstance' ever be used for--this starts up a new instance of TWXProxy correct--I am only seeing this being helpful if TWX crashes or freezes and you would like to restart it via a script, but there is no way to test or handle that in such a fashion or while AFK?

Author:  Adept [ Tue Jun 21, 2022 10:33 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Oh, also would it be feasible to modify the CURRENT names for updatequickstats? They are all so long. Maybe change to QS... and/or abbreviate many of the objects? E.g., QSCORBO, QSTWARP, QSPSCANNER, QSPSYCHIC, etc. Perhaps include . or _ for readability?

Author:  Adept [ Wed Jun 29, 2022 9:50 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Is Microblaster no longer working on this project?

Issues reported on github have no response since April.

https://github.com/MicroBlaster/TWXProxy/issues

Author:  Star Killer [ Thu Jun 30, 2022 7:50 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Is Microblaster no longer working on this project?

Issues reported on github have no response since April.

https://github.com/MicroBlaster/TWXProxy/issues


Micro is still around tho I dont know what the status is on twx. but best way to contact him is on Discord since this forum is pretty much dead.

-sk

Author:  Micro [ Thu Jun 30, 2022 7:58 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Is Microblaster no longer working on this project?

Issues reported on github have no response since April.

https://github.com/MicroBlaster/TWXProxy/issues


Yeah, that is about the time I got pissed off and shut down the 15 year old Windows 7 laptop that I use to compile TWXP on. Also you are in the wrong repo. The new repo is https://github.com/TW2002/twxp , but it doesn't have the WIKI. I need to transfer the WIKI and delete the old repo.

I am working on a new version of my old helper FirstMate.
https://github.com/TW2002/twfm

I will give you full access to the TWXP repo if you want to work on it!

Author:  Adept [ Thu Jun 30, 2022 9:57 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Oh cool that sounds interesting!

Alrighty, I setup an account on Github as Adept2002.

Author:  Micro [ Fri Jul 01, 2022 3:14 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Oh cool that sounds interesting!

Alrighty, I setup an account on Github as Adept2002.


Invite sent on Github.

I can also help you setup a Turbo Delphi 2006 express compiler if you have a Windows XP or Window 7 Box.

Please join my discord server https://discord.gg/zvEbArscMN

Author:  Adept [ Fri Jul 01, 2022 9:07 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Okay, thanks! I still have a PC running on Win7, so would be great to have help setting that up.

Last year I purchased a Pascal book by Marco Cantu to start learning to code in it...I think I bought a course or two on Udemy too.

Author:  Micro [ Sun Jul 03, 2022 7:58 am ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

So I had trouble moving the wiki, so long story short I ended up deleting the tw2002\twxp repo and transferring my personal repo to the tw2002 organization.

@adept - I have sent you a new invite to the new repo.

Author:  Adept [ Sun Jul 03, 2022 9:57 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Okay gracias, this is the right link now?

https://github.com/TW2002

Author:  Micro [ Mon Jul 04, 2022 6:52 am ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Okay gracias, this is the right link now?

https://github.com/TW2002


Yes, and the repo is:
https://github.com/TW2002/twxp

and the wiki is:
https://github.com/TW2002/twxp/wiki

So, one of the reasons I quit working on TWXP is because my Diabetic Retinopathy has gotten really bad. I cannot read the Window Laptop screen at all, but I did turn it back on, and I connected an external monitor at 1024 x 768 resolution and 150% magnification , and I can kinf of read the screen. Unfortunately, Turbo Delphi 2006 does not have a dark mode, bit I as able to edie the code window setting to make it easier to read.

I think I fixed "Format $Credits CURRENCY", which is one of the commands ElderProphit (EP) wrote 5+ years ago. The problem actually appears to be a Pascal bug.

Now I am working on getDirList which was also written by EP. The first problem is that you can not use "*.*", but you can use "*". The other problem is that you can not specify a path, so you can only view the subfolders of the TWXP program folder. I can not imagine that being usefull to anyone.

Author:  Micro [ Mon Jul 04, 2022 8:59 am ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

getDirList is fixed.

Part of the problem is that TWX converts Wildcards '*' to Charage returns #13, so I had to convert #13 back to '*', and I also added a path option as the command seems useless without it.

Adept wrote:
And it appears that strtodatetime and datetimetostr are cross-wired,
# e.g., only the below seems to function as intended:

format "07/04/1776 08:14:23" $obj1 strtodatetime
format "-45103.343321759261000" $obj2 datetimetostr
echo "*" $obj1 "*" $obj2 "*"


These are just wrappers for the Pascal commands by the same name.

DateTimeToStr is defined as:
Code:
#Params[1].Value := DateTimeToStr(Params[0].DecValue);


StrToDateTime is defined as:
Code:
#OutVar := StrToDateTime(Params[0].Value);
#UpdateParam(Params[1], OutVar, 15);


...and they both appear to be working as designed.
Code:
getDate $Date
getTime $Time

format ($Date & $Time) $obj1 strtodatetime
format $obj1 $obj2 datetimetostr
echo "*" $obj1 "*" $obj2 "*"


Outputs:
Code:
44746.371064814811600
7/4/2022 8:54:19 AM


Please explain further the problem you are having with these commands.

Author:  Adept [ Mon Jul 04, 2022 10:16 pm ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Oh so sorry to hear that news, that totally sucks!

...I just figured by the names of the commands they would return the opposite of that:

44746.371064814811600 (would be string to datetime.)
7/4/2022 8:54:19 AM (would be datetime to string.)

Go figure!

I setup the files you sent me and it seems to startup nicely, so what settings need to be tweaked and such and other stuff, heh?

Author:  Micro [ Tue Jul 05, 2022 12:14 am ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Oh so sorry to hear that news, that totally sucks!

...I just figured by the names of the commands they would return the opposite of that:

44746.371064814811600 (would be string to datetime.)
7/4/2022 8:54:19 AM (would be datetime to string.)

Go figure!

I setup the files you sent me and it seems to startup nicely, so what settings need to be tweaked and such and other stuff, heh?


string to datetime produces 44746.371064814811600
and datetime to string produces 7/4/2022 8:54:19 AM

They are not backwards.

Incidentally, I just added the UNIX/Julian versions of these commands because of aa request from Deign. I have no idea why EP bundled them into "format" instead of making them separate commands.

...

So basically the file you compile will be huge. MindDqagger and I tweaaked several settings, but I don't remember what they were.

If we can do a screenshare on discord I am sure we caan figure it out.

Author:  Micro [ Thu Dec 22, 2022 3:34 am ]
Post subject:  Re: Issues with TWXProxy 2.06 commands

Adept wrote:
Oh, also would it be feasible to modify the CURRENT names for updatequickstats? They are all so long. Maybe change to QS... and/or abbreviate many of the objects? E.g., QSCORBO, QSTWARP, QSPSCANNER, QSPSYCHIC, etc. Perhaps include . or _ for readability?


I removed the word CURRENT from all of the Quickstat vars. Abbreviating stuff makes it LESS readable, so I am not going to do that!

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