|
Page 1 of 1
|
[ 12 posts ] |
|
Qmodem Pro scripting question
| Author |
Message |
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 270
|
 Qmodem Pro scripting question
Hi all, I saw discussion about Qmodem Pro and scripting with it in another thread and it brought back memories of writing scripts for it.
If I remember correctly, you could write some scripts that automated some tasks, but for reaction to events it wasn't much good, as there were no commands that let you easily work with a line from the game to get out trader names or sector numbers and such.
Am I remembering this correctly, or was/are there commands in the scripting language that allow you to get information out of a line from the game like sector numbers?
If there were commands that let you grab a sector number or something from a line from the game, what were they?
Oh, by the way, I found a copy a guy had worked with so that it is even compatible with Windows 7 and 64 bit now. I can post a copy of it, if anyone would be interested in grabbing a copy of it. Or, maybe Helix could add it to his post with the script collections? I know they also have an (I believe) open source fork rewrite of it for Linux systems, I came across that while doing a search for the original Qmodem Pro.
|
| Tue Mar 20, 2012 8:50 pm |
|
 |
|
Helix
Ambassador
Joined: Wed Nov 12, 2008 8:57 am Posts: 3554 Location: Long Beach, CA
|
 Re: Qmodem Pro scripting question
Hopefully cruncher or kav can answer that for you. I used procomm and qmodem but only with macros. Then I stopped playing and when I came back it was swath/twx
H
_________________ Helix Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars. Lest we forget I had to ask myself WWSGD?
|
| Tue Mar 20, 2012 10:08 pm |
|
 |
|
Cruncher
Ambassador
Joined: Fri Feb 23, 2001 3:00 am Posts: 4016 Location: USA
|
 Re: Qmodem Pro scripting question
Helix wrote: Hopefully cruncher or kav can answer that for you. I used procomm and qmodem but only with macros. Then I stopped playing and when I came back it was swath/twx
H Maybe Kav. I was TWar, TWHelper, Zoc - now Swath, TWX, Mombot, and sometimes Zoc.
_________________
BOTE 1998 Champs: Team Fament HHT 2015 Champs: Cloud09 Big Game 2016 Champs: Draft team HHT 2018 Champs: Rock Stars Big Game 2019 Champs: Draft Team
Classic Style Games Here: telnet://crunchers-twgs.com:2002 Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm Blog with current server info: http://cruncherstw.blogspot.com Discord: https://discord.gg/4dja5Z8 E-mail: Cruncherstw@gmail.com FaceBook: http://www.facebook.com/CrunchersTW
|
| Tue Mar 20, 2012 10:16 pm |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
 Re: Qmodem Pro scripting question
Man, I hadnt noticed how fast time passes until I tried to answer the question - its almost 15 years since I wrote qmodem. The answer is yes, you can read line(s). You probably have the sample script HOST.QSC, it gives examples. The script command is RECEIVE, if memory serves. You need to declare a string variable first, to which you write the line or part thereof.
In general, open the script menu, type help, help topics, scripting command reference. As usual, the help file sucks.
Its similar to pretty much any other terminal program, you wait for a trigger and then grab the line. I think you can designate X,Y coordinates anywhere on the screen but cant remember, I'll play with it tonight. You can definitely grab the line after the trigger no problem, then use one of the str commands to get the part of the string that is of interest.
It is a great scripting language for TW btw and well worth the time to become proficient in it. Compiled too, so its fast (altho thats not as important as when we ran 2400 baud modems). I use Telix, marginally better at string handling but offhand I cant think of anything that Qmodem cant do that Telix can
|
| Wed Mar 21, 2012 1:34 am |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: Qmodem Pro scripting question
Hey, all you peeps who use or used these old helpers... could you do me a favor and post some screenshots? I'll use them on the wiki for articles about the helpers.
_________________ Suddenly you're Busted!
|
| Wed Mar 21, 2012 12:39 pm |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
 Re: Qmodem Pro scripting question
SteveH_66 wrote: Hi all, I saw discussion about Qmodem Pro ...
If there were commands that let you grab a sector number or something from a line from the game, what were they?
The following will grab the sector number ( last 3 lines, ignore - they send the grabbed string on corp ss to check that it worked, useful first time you run the script, then delete it: dim sectnum as string SEND "i"; waitfor "Current Sector :" receive sectnum SEND "'"; SEND sectnum; SEND "^M";Here is the display that the above generates: Command [TL=00:00:00]:[571] (?=Help)? : I <Info>
Trader Name : Civilian kav2 Rank and Exp : 0 points, Alignment=0 Neutral Corp # 1, General Products Ship Name : The Merchant Marines Ship Info : IonStream Merchant Cruiser Ported=0 Kills=0 Date Built : 06:45:29 PM Thu Mar 21, 2024 Turns to Warp : 3 Current Sector : 571 Turns left : 1000 Total Holds : 20 - Empty=20 Fighters : 30 Credits : 300
Command [TL=00:00:00]:[571] (?=Help)? :
Sub-space radio (0): [<ENTER> for multiple lines]
' 571
Message sent on sub-space channel 0.
Command [TL=00:00:00]:[571] (?=Help)? :
-When the script sees the "Current Sector :" trigger, it assigns the rest of the line to the string variable 'sectnum'. There are faster displays to get the sector number than from the "I" screen, but the above will give you something to play with a bit more. I cant remember how to read from anywhere on the screen yet, hopefully it will come to me. If you would like help with anything specific please ask. @Mongoose, I'll dig up a few, would you like some stuff from Trade Wars Assistant (Twassist)?
Last edited by Kavanagh on Wed Mar 21, 2012 2:41 pm, edited 1 time in total.
|
| Wed Mar 21, 2012 2:07 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: Qmodem Pro scripting question
Yeah, anything that shows the history of helpers. If you've already got them running, it'll save me a lot of trouble setting up DOSEMU or something to get some screenshots.
_________________ Suddenly you're Busted!
|
| Wed Mar 21, 2012 2:40 pm |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
 Re: Qmodem Pro scripting question
Mongoose wrote: Yeah, anything that shows the history of helpers. If you've already got them running, it'll save me a lot of trouble setting up DOSEMU or something to get some screenshots. Here, or email? you can pm me a web based email addr
|
| Wed Mar 21, 2012 2:44 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: Qmodem Pro scripting question
Here's fine.
_________________ Suddenly you're Busted!
|
| Wed Mar 21, 2012 3:11 pm |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
 Re: Qmodem Pro scripting question
I can't remember nor find how to read from an X,Y position on the screen in Qmodem. Sent Tweety a pm; if it is possible, he will know how to do it, way more Q literate than I.
|
| Sun Mar 25, 2012 3:40 pm |
|
 |
|
Wookie8662
Gunnery Sergeant
Joined: Sun Mar 25, 2001 3:00 am Posts: 21 Location: The Wolfpack
|
 Re: Qmodem Pro scripting question
I have TWHelper and TWAR DOS. I will try to set them up with Com-IP, and DOSBox, and see what happens.
|
| Sun Mar 25, 2012 4:00 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: Qmodem Pro scripting question
Okay, thanks. Kav already sent me some good screens of TWAssist, Qmodem, and Telix, so I don't need those.
_________________ Suddenly you're Busted!
|
| Sun Mar 25, 2012 4:13 pm |
|
 |
|
|
Page 1 of 1
|
[ 12 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 14 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
|
|