Multiline Capture

Posted by Strazor on Thu 16 Oct 2014 04:53 AM — 3 posts, 15,861 views.

USA #0
I'm working on capturing the following data and making the NUM clickable. The abbreviated MUD output is this:

             [ Aardwolf Marketplace - Current List of Inventory ]

Num    Item Description             Lvl  Type Last Bid      Bids Time Left
------ ---------------------------- --- ----- ------------- ---- -------------
 47956 |6[Six of Air]6|               1  Gold       999,600   11      03:16:59
 47957 Aardwolf Aura of Sanctuary     1    Qp         1,950   25      04:10:07
 47958 Aardwolf Bracers of Iron Gri   1    Qp         1,560   37      04:10:35
 47959 Aardwolf Gloves of Dexterity   1    Qp         1,310   17      04:10:55
 47960 Aardwolf Breastplate of magi   1    Qp         1,660   23      04:12:08
 47965 a blank chaos portal           1  Gold    17,005,329    8      06:47:12
 48034 (Aarchaeology) An Old Rope     1  Gold     6,000,000    1      08:53:48
 48102 (Aarchaeology) A Dragon's To   1  Gold       450,000    3      14:37:11
 48173 |7[Seven of Air]7|             1  Gold       236,361    7      14:57:51
 48174 Daily Blessing Qreset Token    1  Gold     2,950,001    5      14:59:30
 48148 |E[Elemental of Fire]E|        1  Gold       236,361    7      19:01:49
 48123 (Aarchaeology) Wilted Rose     1  Gold       696,969    3      19:22:57
 48189 A sparkle of faerie dust     105  Gold        26,250    3      19:42:14
 48190 a smuggler's ring            141  Gold         1,501    3      19:42:18
 48176 Hatshepsut's Cartouche       120  Gold       210,000    8      20:24:51
 48218 Dagger of Aardwolf           180 *  Qp             1    0   6d 23:47:25
------------------------------------------------------------------------------
Type: 'Lbid <num>' to see stats and 'Lbid <num> <amount>' to bid on an item.


I'm not sure if the best way to do this is a minwin or main output. Any suggestions? Here is what I currently have, it's a work in progres.

<triggers>
  	<trigger
		enabled="y"
		match="             [ Aardwolf Marketplace - Current List of Inventory ]"
		regexp="n"
		omit_from_output="n"
		send_to="14"
		sequence="100"
		>
		<send>
			EnableTrigger ("captureMarketLine", true)
			EnableTrigger ("endCaptureMarketLine", true)
		</send>
	</trigger>

 	<trigger
		name = "captureMarketLine"
		enabled="n"
		match="^(.*)$"
		regexp="y"
		omit_from_output="n"
		send_to="14"	
		sequence="100"
		>
	</trigger>

 	<trigger
		name = "endCaptureMarketLine"
		enabled="n"
		match="Type\: \'Lbid \{num\}\' to see stats and \'Lbid \{num\} \{amount\}\' to bid on an item\.|Type\: \'market bid \{num\}\' to see stats and \'market bid \{num\} \{amount\}\' to bid on an item\."
		omit_from_output="n"
		regexp="y"
		send_to="14"
		sequence="100"
		>
		<send>
			EnableTrigger ("captureMarketLine", false)
			EnableTrigger ("endCaptureMarketLine", false)
		</send>
	</trigger>

 	<trigger
		name = "captureMarketItemHeader"
		enabled="n"
		match="+-----------------------------------------------------------------+"
		regexp="n"
		omit_from_output="n"
		send_to="14"	
		sequence="100"
		>
		<send>
			EnableTrigger ("captureMarketItemHeader", false)
			EnableTrigger ("captureMarketItem", true)
		</send>
	</trigger>

 	<trigger
		name = "captureMarketItem"
		enabled="n"
		match="^(.*)$"
		regexp="y"
		omit_from_output="n"
		send_to="14"	
		sequence="100"
		>
	</trigger>
</triggers>

Obviously this does not currently print anything. It's more of a working mind map. The end goal is to make the display clickable and then have the data for the item populate in a minwin. Any thoughts?

Strazor
Amended on Thu 16 Oct 2014 05:06 AM by Strazor
USA Global Moderator #1
Quote:
I'm not sure if the best way to do this is a minwin or main output. Any suggestions?


The only questions you need to consider is whether you want it to be persistent on your screen and how pretty you want it to be. That's harder to do in the main output.

Main output hyperlinks are significantly simpler, of course, because you don't need to worry about placement and sizing and dragging and fonts and drawing and hotspots. But then you're limited to main output, so... :)
Amended on Thu 16 Oct 2014 02:36 PM by Fiendish
Australia Forum Administrator #2
It's not that hard to make hyperlinks in a miniwindow. Get the process right and make it into a function.

Example here:

http://www.gammon.com.au/forum/?id=8770