www.ClassicTW.com
http://classictw.com/

Pulling Corp Ship Number
http://classictw.com/viewtopic.php?f=15&t=34868
Page 1 of 1

Author:  The Bounty Hunter [ Mon May 23, 2016 1:28 am ]
Post subject:  Pulling Corp Ship Number

As I try and knock the dust off my scripting abilities,...

I need some help. Trying to pull a corpy ship number from bot qss command.

Can't us GETWORD as position may change if user name is 2 words
Can't use GETTEXT as there is nothing after the Ship #

Through about setting a QSS routine on the QSS output but that seems a bit overkill.

Suggestions? I'm sure the answer is simple but I am not yet back into scripting mode.

Author:  Hammer_2 [ Mon May 23, 2016 3:36 am ]
Post subject:  Re: Pulling Corp Ship Number

Hiya,

Super basic script, use the first waitfor to ensure we have right block of text.
Code:
send "'hunt qss*"
waitfor "|EPRB"
setTextTrigger x :x "SHIP ="
pause
:x
getText CURRENTLINE $v "SHIP = " ""
send "'ship num: " $v "*"


Cheers,

Ham

Author:  The Bounty Hunter [ Mon May 23, 2016 8:36 am ]
Post subject:  Re: Pulling Corp Ship Number

Thank you.

Ugh. Something so simple.

Author:  Adept [ Mon May 23, 2016 10:40 am ]
Post subject:  Re: Pulling Corp Ship Number

To show various methods of performing the same task, here is my take on such a function, applying an ANSI check and error routine on a simple wait:

Attachment:
get_ship_number.ts [327 Bytes]
Downloaded 623 times

Author:  Hammer_2 [ Mon May 23, 2016 5:11 pm ]
Post subject:  Re: Pulling Corp Ship Number

Nice one Adept, didn't even know you could use the * as the Carriage return for the new line on that command.

Author:  Adept [ Tue May 24, 2016 12:10 am ]
Post subject:  Re: Pulling Corp Ship Number

Gracias, ...what seems rather odd is that #42 does not seem to work, maybe because quotes are required?

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