| 
	
		|  |  
		| MCrews17 Beginner
 
 
 Joined: 16 Oct 2011
 Posts: 13
 
 
 | 
			
			  |  Posted: Tue Jan 24, 2012 5:35 pm 
 #capture command
 
 |  
				| Does anybody know of any commands that I can use to scan through multiple lines of output? 
 ie:
 
 (I'm trying to capture the items below into an array.)
 
 Your Have: item1, item2, item3, etc., ...
 
 #var inv %array("item1","item2","item3", "etc.", "...")
 
 Thanks,
 
 MCrews17
 |  |  
	  |  |  
		|  |  
		| Daern Sorcerer
 
 
 Joined: 15 Apr 2011
 Posts: 809
 
 
 | 
			
			  |  Posted: Tue Jan 24, 2012 8:05 pm 
 |  
				| Try this: 
 
	  | Code: |  
	  | #TRIGGER {^You have: (*)} {inv = %replace(%1, ", ", "|")} |  
 |  |  
	  |  |  
		|  |  
		| Rahab Wizard
 
 
 Joined: 22 Mar 2007
 Posts: 2320
 
 
 | 
			
			  |  Posted: Tue Jan 24, 2012 9:25 pm 
 |  
				| Note:  Daern's code turns the captured items into a stringlist.  You really do want to use a stringlist, not an array.  You should not use %array unless you are trying to do COM coding. 
 |  |  
	  |  |  
		|  |  
		| MCrews17 Beginner
 
 
 Joined: 16 Oct 2011
 Posts: 13
 
 
 | 
			
			  |  Posted: Thu Jan 26, 2012 4:56 am 
 |  
				| Okay, that does the trick!  Thanks guys!  
 |  |  
	  |  |  
		|  |  
		|  |  
		|  |  
  
	| 
 
 | 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 vote in polls in this forum
 
 |  |