If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
			
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by LA  2005-06-26 21:00:52 
			
			
			
			
			
			please write a script, which will search a movie within another amc database (should be chosen) and then will extract info from this database to current...
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								antp 							 
						Site Admin 			
		Posts:  9769 Joined:  2002-05-30 10:13:07Location:  Brussels
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by antp  2005-06-26 21:10:59 
			
			
			
			
			
			It is not possible to make that by script.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by LA  2005-06-26 21:40:31 
			
			
			
			
			
			why it is not possible? if we can read files and we know the format of the file, seems that we can do it.one/two/three  movie(s) from one database to another.. not to merge databases!
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								antp 							 
						Site Admin 			
		Posts:  9769 Joined:  2002-05-30 10:13:07Location:  Brussels
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by antp  2005-06-27 06:43:22 
			
			
			
			
			
			I do not think that the script engine can handle binary files, but actually I never tried. One of the problem is that you'll have to read strings from the file like if it was a simple memory area, for that you need to force the length of the string and then have a pointer to its first character. And these two things cannot be done with the script engine. But maybe it can be done in another way.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by LA  2005-06-30 11:46:01 
			
			
			
			
			
			I have asked the same question to developers of Pascal Script. And the ff answer was received:
You can use the streams part of the classes import library to read from a file.
Do you know what does it mean? 
 I need just a idea, how to read binary files...
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								antp 							 
						Site Admin 			
		Posts:  9769 Joined:  2002-05-30 10:13:07Location:  Brussels
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by antp  2005-06-30 11:50:47 
			
			
			
			
			
			That does not solve the other problem, i.e. the access to string memory. Maybe that in IFPS3 more things are possible, but AMC still uses IFPS2.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by LA  2005-07-03 13:35:31 
			
			
			
			
			
			
but I have written small script, which allow to copy info from another database in xml format (the script will be sent via e-mail). 
Could you please let me know how I should verify if some property exists (or doesn't exist)?
for ex., if I have the ff code:
Code: Select all 
SetField(fieldSize,CurItem.GetItemNamed('Size').Value);
but this item doesn't include item named 'size'. I am getting the error. How it can be avoided?
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								antp 							 
						Site Admin 			
		Posts:  9769 Joined:  2002-05-30 10:13:07Location:  Brussels
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by antp  2005-07-03 14:26:02 
			
			
			
			
			
			if CurItem.GetItemNamed('Size') <> nil then
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by LA  2005-07-03 15:20:12 
			
			
			
			
			
			yes, it works. thank a lot.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								LA  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by LA  2005-07-03 15:23:11 
			
			
			
			
			
			sorry, corrected previous msg:
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								antp 							 
						Site Admin 			
		Posts:  9769 Joined:  2002-05-30 10:13:07Location:  Brussels
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by antp  2005-07-03 21:49:13 
			
			
			
			
			
			It is not possible to do that unfortunately.