Unexplained modifications in VLC script code

Previously working VLC scripts have been rendered unusable by unexplained code modifications such as:

	set _name to «class AANA»
	set _time to (get «class AADU») 
	set _timeViewed to (get «class AACT») 

Any explanation and any solution?

My thanks in advance.

Do you get an error message? If so, what?

What are you trying to get these properties from? It looks like they require a ‘current item’.

Full code should include the tell block as well.


tell application "VLC"
	set _name to (get name of current item)
	set _time to (get duration of current item)
	set _timeViewed to (get current time)
	set b to it
end tell

If this still doesn’t work, then probably you have deleted the application “VLC” bundle from your Mac. Or, this bundle is corrupted. I think, the solution is deleting the corrupted application, then reinstalling this free application from official site.

And… make new installed VLC.app read-only, then lock it. To not delete it someway again.

Hello, Mockman and KniazidisR
Thank you very much for your quick and effective help. :smiley:

I tried to follow the instructions in the VLC dictionary to re-declare the altered variables, but the compiler didn’t allow it because of the errors produced by the declarations (set _name to (get name of current item, etc) ““expected end of line but found identifier.”

Trying to find a solution I found a user with the same problem 9 years ago. “Something weird is happening. I swear when I opened one of my applescripts before, it rightfully said “current time” with no problems. But when I opened it again, it said <>, and won’t let me type current time instead.” https://superuser.com/questions/602313/applescript-to-get-name-with-vlc-2-0-should-work-but-doesnt

After removing the VLC version and replacing it by installing the version downloaded from the official VLC website, it was possible to fix the corrupted code and compile it with satisfactory performance.

I have followed the instructions regarding making VLC.app attributes read-only and then locking them to try to prevent similar situations from occurring.

This is an example that it is possible that an already compiled script can be corrupted by an application, something unsuspected for me.

Greetings and thanks for the help provided with your knowledge.