Page 1 of 1

Error message "No movie found for current script"

Posted: 2013-06-02 04:25:31
by al0203
I have copied some information from FieldUrl to a custom field created named NArchivo. There was not problem in this operation but when I try to find Duplicates instead of using de Field Url, using de Custom Field NArchivo it returns me the error:
"No movie found for current script limitation settings (Movie to include: Selected)"

I tried to copy the contain of the custom field NArchivo to the field Source and I get the same error.

Code: Select all

program NewScript;

var
  OtroCurTitle: string;

begin
  OtroCurTitle:=GetCustomField('NArchivo');
  SetField(FieldSource, OtroCurTitle);
end.

Posted: 2013-06-02 10:14:28
by antp
I do not think it is related to the script itself, but rather to the fact that you "ask" to execute the script on selected movies (and there are none) rather than the whole list.
On the right there is a choice "movie to include" - check that it is on the right value.
The default behaviour is also different if you call the script window from Movie -> Get info from script (F6) - rather for a selection of movies, for getting info from the web - or from Tools -> Scripting (Shift+F6) - rather for the whole list, for the kind of task that you do here.

Posted: 2013-06-02 10:19:34
by al0203
antp wrote:I do not think it is related to the script itself, but rather to the fact that you "ask" to execute the script on selected movies (and there are none) rather than the whole list.
On the right there is a choice "movie to include" - check that it is on the right value.
The default behaviour is also different if you call the script window from Movie -> Get info from script (F6) - rather for a selection of movies, for getting info from the web - or from Tools -> Scripting (Shift+F6) - rather for the whole list, for the kind of task that you do here.
After a lot of checking I found out that it was a problem of AMC. Yesterday I had a problem when I closed the Pc and that must corrupted something in AMC. I uninstalled and reinstalled AMC and now it works properly and it doesn't give the error message.
Thank you.

Posted: 2013-06-02 21:02:53
by antp
I doubt it is a problem of AMC, and I do not see how uninstall/reinstall would solve it. It is rather than no movie was selected (or not catalog loaded) and that somehow the next time you tried it, it appied to the whole list rather than the selected movies (e.g. because it remembers the last choice, which was reset when you reinstalled).

Posted: 2013-06-03 10:24:29
by al0203
antp wrote:I doubt it is a problem of AMC, and I do not see how uninstall/reinstall would solve it. It is rather than no movie was selected (or not catalog loaded) and that somehow the next time you tried it, it appied to the whole list rather than the selected movies (e.g. because it remembers the last choice, which was reset when you reinstalled).
I found out that the problem was in the program and not in the file, because I run some scripts that I knew that it worked in older files and it gave me the same error. And when I reinstalled AMC all begin to work again.
The problem that I had with the Pc is that I lost the power. In that moment I was running AMC, but I already saved the file. The real thing is that after the reinstallation I've run a lot of times the same script and never gave again that error. Before I reinstalled AMC, I turned of the Pc and AMC; and when I run again AMC the error message appeared again.
When you turn of a Pc suddenly, you don't know what estrange problems you will find.

Posted: 2013-06-03 11:43:07
by antp
I didn't say that the problem was in the catalog file, but in the settings.
Reinstalling the program did a reset of the settings, but the option could also be changed as I suggested.

Posted: 2013-06-05 20:57:43
by al0203
antp wrote:I didn't say that the problem was in the catalog file, but in the settings.
Reinstalling the program did a reset of the settings, but the option could also be changed as I suggested.
OK

When I import from media files AMC takes the file name cutted without the extension and put it in OriginalTitle field. Is there any way to make it take the complete name with the extension?

If I want to see if the file exist I need to compare the hole archive name with de name that apear in the url, but to take the extenxion is not possible
Another solution it would be if there is a function like copy that cut the string from the end like copyb(string,4) it would remove the last 4 characters=extension.

Posted: 2013-06-05 22:03:36
by antp
ChangeFileExt(string, '') will return the string without the extension

Posted: 2013-06-05 22:04:19
by al0203
antp wrote:ChangeFileExt(string, '') will return the string without the extension
Thank you

Posted: 2013-06-06 03:29:16
by al0203
antp wrote:ChangeFileExt(string, '') will return the string without the extension
Can you run scripts inside an script like a subrutine?. I mean, if you have to run 3 or 4 scripts in a raw, can you make an script just containing the name of this scripts an it will run one after the other?

Posted: 2013-06-06 09:21:36
by antp
Not possible yet so easily (changes would be required in the scripts), but it is possible that the feature gets added some day.