|  | 
	
	
		| zeiuszeppo Novice
 
 
 Joined: 22 Nov 2001
 Posts: 48
 Location: Italy
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 1:16 am 
 infinite loop
 
 |  
				| Hi friends , I meed to create an infinite loop, exiting from it only if a certain
 condition matches like che content of
 a var (not a counter!!!)
 |  | 
	
	  |  | 
	
		|  | 
	
		| iljhar GURU
 
  
 Joined: 10 Oct 2000
 Posts: 1116
 Location: USA
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 1:57 am 
 |  
				| Well, do you want this loop to run immediately or do you want it to wait for certain text to loop again or what?  Give us some more info, some output would be nice, maybe the variable you want to stop the loop on, etc. 
 Iljhar
 |  | 
	
	  |  | 
	
		|  | 
	
		| zeiuszeppo Novice
 
 
 Joined: 22 Nov 2001
 Posts: 48
 Location: Italy
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 2:03 am 
 |  
				| well, the loop shoul start as aan alias, and runs infinitely, until the var @STOP
 is "TRUE" (suppose that it is "FALSE")
 as the alias is typed
 |  | 
	
	  |  | 
	
		|  | 
	
		| PrestoPimp Apprentice
 
 
 Joined: 18 Sep 2001
 Posts: 175
 Location: USA
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 2:13 am 
 |  
				| Alias: Start = #IF (@Stop = TRUE) {#NOOP} {#LOOP 1 *command to execute for varible being false*;start}
 
 Try that.. tell me if it works
 
 For tomarrow is another day, and other days come but 6 times a week.
 |  | 
	
	  |  | 
	
		|  | 
	
		| zeiuszeppo Novice
 
 
 Joined: 22 Nov 2001
 Posts: 48
 Location: Italy
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 2:18 am 
 |  
				| Not this way, I made something similar, but after some time zmud crashes (overflow i suppose). I nedd a single loop 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Kjata GURU
 
  
 Joined: 10 Oct 2000
 Posts: 4379
 Location: USA
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 3:59 am 
 |  
				| #UNTIL (@stop) {do stuff} 
 Kjata
 |  | 
	
	  |  | 
	
		|  | 
	
		| LightBulb MASTER
 
 
 Joined: 28 Nov 2000
 Posts: 4817
 Location: USA
 
 | 
			
			  |  Posted: Thu Jan 24, 2002 6:35 pm 
 |  
				| To avoid overflow from a recursive loop, use a second alias. Each alias is able to complete its script, so it doesn't need to be stacked. 
 #AL loop1 {#IF (@stop) {} {do stuff;loop2}}
 #AL loop2 loop1
 
 LightBulb
 All scripts untested unless otherwise noted
 |  | 
	
	  |  | 
	
		|  | 
	
		| Vijilante SubAdmin
 
  
 Joined: 18 Nov 2001
 Posts: 5187
 
 
 | 
			
			  |  Posted: Fri Jan 25, 2002 12:53 am 
 |  
				| Use either Kjata's suggestion or #AL INFINITE {STOP=0;#WHILE (@STOP=0) {#NOOP}}
 
 Lightbulb's will ultimately eat all your system memory and crash Zmud.
 |  | 
	
	  |  | 
	
		|  | 
	
		| PrestoPimp Apprentice
 
 
 Joined: 18 Sep 2001
 Posts: 175
 Location: USA
 
 | 
			
			  |  Posted: Fri Jan 25, 2002 4:04 am 
 |  
				| Its fun when yer system's memory gets eaten and programs crash 
 For tomarrow is another day, and other days come but 6 times a week.
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |