Page 1 of 1
					
				Some new little scripts requested...
				Posted: 2003-02-07 04:11:36
				by Guest
				I would like some scripts to make these jobs:
1) Change some or better all fields caps
example: THIS IS THE TITLE >> This it the Title
or something like that
2) Put the actors one for line
I read something about this, but not seen a real script.
Thanks,
Andrea
			 
			
					
				
				Posted: 2003-02-07 08:22:58
				by antp
				To change the case, put this between the begin/end of a new script :
SetField(fieldOriginalTitle, AnsiUpFirstLetter(AnsiLowerCase(GetField(fieldOriginalTitle))));
And to remplace linebreaks by commas (for examples) :
SetField(fieldActors, StringReplace(GetField(fieldActors), #13#10, ', '));
			 
			
					
				
				Posted: 2003-02-07 17:52:37
				by Andrea
				antp wrote:To change the case, put this between the begin/end of a new script :
SetField(fieldOriginalTitle, AnsiUpFirstLetter(AnsiLowerCase(GetField(fieldOriginalTitle))));
And to remplace linebreaks by commas (for examples) :
SetField(fieldActors, StringReplace(GetField(fieldActors), #13#10, ', '));
I did it - the first give me some "violation address" error, the second seems did nothing...
Andre
 
			
					
				
				Posted: 2003-02-07 19:38:43
				by antp
				That is 
really not normal
I tryed both before posting and they were woring 
 
You used the function Tools -> Scripting ?
 
			
					
				
				Posted: 2003-02-08 15:50:08
				by Guest
				I did it...
			 
			
					
				
				Posted: 2003-02-08 21:17:38
				by antp
				Did you try it on another movie list or when selecting only few movies ?
			 
			
					
				
				Posted: 2003-02-09 21:35:56
				by Guest
				I need it because I have more than 1000 movies... if it were less, I did manually  

 
			
					
				
				Posted: 2003-02-09 21:44:08
				by antp
				I mean, does it happen with all movies or only with some ?
If it is not too big, could you send me your list so I can see if the problem occurs here too ?
(Which version of Windows do you have ?)
			 
			
					
				
				Posted: 2003-02-12 14:44:54
				by frenchfrog_2
				Hello,
I find out why you got the access violation error, I did some test and you got it when the field is empty, so you have to make sure that the field you want to change is not empty. I modify the script a bit to have the first letter of each words in the fields original title and translated title in caps :
program FindReplaceCaps;
begin
  SetField(fieldOriginalTitle, AnsiUpFirstLetter(AnsiLowerCase(GetField(fieldOriginalTitle))));
  SetField(fieldOriginalTitle, AnsiMixedCase(GetField(fieldOriginalTitle),' '));
  SetField(fieldTranslatedTitle, AnsiUpFirstLetter(AnsiLowerCase(GetField(fieldTranslatedTitle))));
  SetField(fieldTranslatedTitle, AnsiMixedCase(GetField(fieldTranslatedTitle),' '));
end.
Hope this help...
			 
			
					
				
				Posted: 2003-02-12 15:18:56
				by antp
				Ok, if it crashes when the string passed to an Ansi... function, it is a bug, I'll try to correct that 
