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

TWXProxy openMenu....
https://www.classictw.com/viewtopic.php?f=15&t=35627
Page 1 of 1

Author:  LoneStar [ Fri Nov 29, 2019 9:08 pm ]
Post subject:  TWXProxy openMenu....

Anyone know if it’s possible to selected a database from the openMenu command, programmatically?

Author:  Micro [ Sat Nov 30, 2019 6:55 am ]
Post subject:  Re: TWXProxy openMenu....

I can easily add an openDatabse command...

You can specify a database on the command line:
Code:
twxp mydata.xdb

Author:  LoneStar [ Sat Nov 30, 2019 6:32 pm ]
Post subject:  Re: TWXProxy openMenu....

Thanks. I was hoping to select a DBase from a script; that there might be a Trick within the Menu —ie setting the menu value.

Doesn’t look like it’s possible.

Author:  Micro [ Sat Nov 30, 2019 10:09 pm ]
Post subject:  Re: TWXProxy openMenu....

openMenu TWX_DATABASE_SELECT

But then it prompts for the database name :/

Author:  Micro [ Sun Dec 01, 2019 2:09 am ]
Post subject:  Re: TWXProxy openMenu....

Thanks to a new breakthrough in home video marketing, yes, is instant cassettes... umm... I mean instant documentation... That's right... Now your command can now be documented in the Wiki before the movie is finished...

TWXProxy selectDatabase command:
https://github.com/MicroBlaster/TWXProx ... ctDatabase

Now all I have to do is write the command :/

oh, and here is a link in case your name is not Lonestar - Spaceballs "We're in Now Now" clip:
https://www.youtube.com/watch?v=nRGCZh5A8T4

Author:  LoneStar [ Sun Dec 01, 2019 6:21 am ]
Post subject:  Re: TWXProxy openMenu....

Micro wrote:
Thanks to a new breakthrough in home video marketing, yes, is instant cassettes... umm... I mean instant documentation... That's right... Now your command can now be documented in the Wiki before the movie is finished...

TWXProxy selectDatabase command:
https://github.com/MicroBlaster/TWXProx ... ctDatabase

Now all I have to do is write the command :/

oh, and here is a link in case your name is not Lonestar - Spaceballs "We're in Now Now" clip:
https://www.youtube.com/watch?v=nRGCZh5A8T4


That will be handy for those times when the DBase get corrupted.

That “when will then, be now?” ...never gets old. Lol.

Here’s a snippet of the all-time funniest movie scene (with another member of S.C.T.V. cast):
https://youtu.be/reQpGJ2mtv0

Author:  Adept [ Wed Apr 15, 2020 12:38 pm ]
Post subject:  Re: TWXProxy openMenu....

Say would it be possible to include an 'addDatabase' command to so you set up a new game though a login script for example?

And to add to it and including editDatabase:

"ServerAddress"
"ListeningPort"
"Sectors"
"UseRLogin" 0/1
"MaxBubbleSize"
"AutoRunScript" (Will need to load upon Db creation for current session.)
"LogANSICodes" 0/1
"LogAsBinary" 0/1

Author:  Micro [ Wed Apr 15, 2020 6:17 pm ]
Post subject:  Re: TWXProxy openMenu....

Adept wrote:
Say would it be possible to include an 'addDatabase' command to so you set up a new game though a login script for example?

Yes, and I already documented about 6 database commands. Now I just have to write them.

createDatabase:
https://github.com/MicroBlaster/TWXProx ... teDatabase

I tried to stick to required data fields, and you can add the other fields with editDataBase:

Code:
createDatabase "ClassicTW-1" "twgs.classictw.com" 2002

editDatabase "LoginName" "Micro"
editDatabase "Password" "Meow"
editDatabase "GameLetter" "A"

connect


Quote:
"MaxBubbleSize"
"AutoRunScript" (Will need to load upon Db creation for current session.)
"LogANSICodes" 0/1
"LogAsBinary" 0/1

These fields are not part of the Database, and apply globally to all copies of TWX Proxy, but TWX Proxy is not aware of any other copies running, so they should not be modified unless you only have one copy open and you must close that copy to save the change.

Author:  Adept [ Thu Apr 16, 2020 10:54 am ]
Post subject:  Re: TWXProxy openMenu....

Oh okay...

Say, what replaces setVar in the earlier verison? I am not seeing anything in the commands except for setArray.

...Oh I see you just use operators now, $i := 0.

Could it maybe be updated to use = as := and then = would become == instead, and perhaps === for strict/literal matches, so it's more inline with programatic logic?

e.g.,

Code:
$i=0
if($i==100 OR $terminate==="TRUE")
goto :COMPLETION
end

Author:  Deign [ Thu Apr 16, 2020 12:44 pm ]
Post subject:  Re: TWXProxy openMenu....

Adept wrote:
Could it maybe be updated to use = as := and then = would become == instead, and perhaps === for strict/literal matches, so it's more inline with programatic logic?
end[/code]


Remember, TWX is written in Pascal (Delphi). := is what assignment looks like in that world.

Author:  Micro [ Thu Apr 16, 2020 3:26 pm ]
Post subject:  Re: TWXProxy openMenu....

@Adept that would break thousands of scripts that have already been written, and as Deign said, it is mimicking pascal, not c#.

You can still use setVar, it just isn't very pretty. Either way, it compiles as setVar.

Author:  Adept [ Thu Apr 16, 2020 11:31 pm ]
Post subject:  Re: TWXProxy openMenu....

oh, I'm not familiar with Pascal, but thought it could be internally converted or something.

I tried to write a test script yesterday and it would not let me use setVar, it was throwing an error message. ...That was when I came across the post about using :=

Author:  Micro [ Thu Apr 16, 2020 11:52 pm ]
Post subject:  Re: TWXProxy openMenu....

@Adept it "Could" be easily changed, but it would break every script ever written for TWX.

Author:  Micro [ Wed Jul 01, 2020 9:36 am ]
Post subject:  Re: TWXProxy openMenu....

LoneStar wrote:
Thanks. I was hoping to select a DBase from a script; that there might be a Trick within the Menu —ie setting the menu value.

Doesn’t look like it’s possible.

OK new command,

OpenDatabase <database>

Has bee added to TWXP, along with a bunch of other command to list, close, reset, delete, etc.. databases... Plus a command to open New Instances of TWX, or close them.

Author:  Hammer_2 [ Wed Jul 01, 2020 5:26 pm ]
Post subject:  Re: TWXProxy openMenu....

wow great stuff Micro.

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