| Author | 
		Message | 
	
		 
		skootles
 
  
 
    
		 | 
		
		
			
				  Posted: Wed Mar 01, 2006 9:02 pm    Post subject: Check if a process is running  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				| I was wondering if it's possible in turing to check if a process is running. Say, for example, I have MSN running. The process name is "MsnMsgr.exe" in the task manager. Is there any way in turing to detect if a process is running? | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
		 
		Sponsor Sponsor 
		 
  
		 | 
		
 | 
	
	 
		  | 
	
				 
		Andy
 
 
 
    
		 | 
		
		
			
				  Posted: Wed Mar 01, 2006 9:55 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				| no it cant, turing doesn have access to system resources | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		jamonathin
 
  
 
    
		 | 
		
		
			
				  Posted: Wed Mar 01, 2006 11:17 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				You can always cheat, like this:
 
	  | code: | 	 		  
 
if Sys.Exec ("C:\\Windows\\system32\\taskmgr.exe") then
 
end if  | 	  
 
 
Just like I can run a calculator program in 2 lines:
 
	  | code: | 	 		  
 
if Sys.Exec ("C:\\Windows\\system32\\calc.exe") then
 
end if
 
  | 	  
 
 
  | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		MysticVegeta
 
  
 
    
		 | 
		
		
			
				  Posted: Thu Mar 02, 2006 2:40 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				| err, actually you can run calc in 1 line, Start -> run -> cmd -> calc.exe. But thats not the point.. lol. He wants to know how to "check" if soemthing is running and that cannot be done unless you run the program your self which I donnt think he wants tod o. | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		md
 
  
 
    
		 | 
		
		
			
				  Posted: Thu Mar 02, 2006 6:38 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				| Surely there must be a way to add libraries to turing; ones that use functions written in a different language? I know that windows provides system calls for process management that would do what you want, but I doubt that the native windows APIs have been interfaced to turing. | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		Cervantes
 
  
 
    
		 | 
		
		
			
				  Posted: Thu Mar 02, 2006 8:00 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				There is.  You can bring the function in with the external keyword.  This is how most of Turing's built-in functions/procedures work.  
 
 
However, where that C++ (or others?) function is located is the important question. | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		[Gandalf]
 
  
 
    
		 | 
		
		
			
				  Posted: Thu Mar 02, 2006 8:43 pm    Post subject: (No subject)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				Really?  How would you go about that?
 
 
The functions that are called using external, I believe, are located in the turing.pdb file and/or hardcoded in the executable file.  If there is a way to somehow add a function from another language, I would be very interested to know how. | 
			 
			
				 | 
			 
		  | 
	
	 
		 | 
		
		 | 
	
	
 
		  | 
	
				 
		 |