View unanswered posts | View active topics It is currently Sat Mar 25, 2017 2:47 pm



Reply to topic  [ 6 posts ] 
 Pulling Corp Ship Number 
Author Message
Gameop

Joined: Mon Jan 15, 2007 2:41 am
Posts: 291
Unread post 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.

_________________
Where Chaos Reigns TW Server
chaostwgs.darktech.org:23


Mon May 23, 2016 1:28 am
Profile ICQ
Chief Warrant Officer

Joined: Mon Dec 01, 2014 5:39 pm
Posts: 113
Unread post 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


Mon May 23, 2016 3:36 am
Profile
Gameop

Joined: Mon Jan 15, 2007 2:41 am
Posts: 291
Unread post Re: Pulling Corp Ship Number
Thank you.

Ugh. Something so simple.

_________________
Where Chaos Reigns TW Server
chaostwgs.darktech.org:23


Mon May 23, 2016 8:36 am
Profile ICQ
Chief Warrant Officer
User avatar

Joined: Sat Feb 27, 2016 1:01 am
Posts: 139
Location: Molon Labe
Unread post 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 22 times

_________________
The object of life is not to be on the side of the majority, but to escape finding one’s self in the ranks of the insane.” — Marcus Aurelius

Quote of the month: "It’s pretty easy to avoid but I’ve just been living life on the edge." — Hammer


Mon May 23, 2016 10:40 am
Profile ICQ
Chief Warrant Officer

Joined: Mon Dec 01, 2014 5:39 pm
Posts: 113
Unread post 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.


Mon May 23, 2016 5:11 pm
Profile
Chief Warrant Officer
User avatar

Joined: Sat Feb 27, 2016 1:01 am
Posts: 139
Location: Molon Labe
Unread post Re: Pulling Corp Ship Number
Gracias, ...what seems rather odd is that #42 does not seem to work, maybe because quotes are required?

_________________
The object of life is not to be on the side of the majority, but to escape finding one’s self in the ranks of the insane.” — Marcus Aurelius

Quote of the month: "It’s pretty easy to avoid but I’ve just been living life on the edge." — Hammer


Tue May 24, 2016 12:10 am
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.