Changing the "Loop Preview Option" with a script
Copy link to clipboard
Copied
Hello,
I'm writing a script for After Effects, where I want to change the option "Loop Preview" (red).
In the Scripting Guide I found these functions to edit the preference file:
- app.preferences.savePrefAsBool(sectionName, keyName, value[, prefType])
- app.preferences.savePrefAsFloat(sectionName, keyName, value[, prefType])
- app.preferences.savePrefAsLong(sectionName, keyName, value[, prefType])
- app.preferences.savePrefAsString(sectionName, keyName, value[, prefType])
But the data type of the Looping Option in the Prefs file "Adobe After Effects 23.0 Prefs.txt" doesn't fit with any of the functions above (01000000 is looping off; 00000000 is looping on). I already tried to use String as data type, but it didn't work, because then the numbers would be in quotation marks. It was no problem to edit the other preview options, where the values are in quotation marks.
Can anyone help me with my problem? Is it a bug or did I overlook something? I'm new to coding, so I don't know that much about it.
Best regards
Fabian
Have something to add?

