JavaScript command and object reference

Advanced Renamer forum
#1 : 12/04-20 20:08
John
Posts: 2
Hello,

looking at the guide, i only find little information about accessible JavaScript objects (like "app") and the object's methods. Is there any complete reference?

Best
John
#2 : 12/04-20 21:02
David Lee
Posts: 1125
www.advancedrenamer.com/user_guide/method_script

Important resources:
JavaScript Reference
JavaScript Guide

However best method is a Google search for "JavaScript" and the topic you need help with. I find hits at www.w3schools.com most helpful.
#3 : 13/04-20 07:59
John
Posts: 2
Reply to #2:
Hey David,

as far as I understand, these resources are not Aren-specific. For example, I cannot find documentation about the "app.log()"- function there. I know that this one is self-explanatory, but I want to know what to search for.

As a workaround, I just searched for the global object and listet all properties:

"""
var global = typeof global !== 'undefined' ?
global :
typeof self !== 'undefined' ?
self :
typeof window !== 'undefined' ?
window :
{};

for (field in global){
app.log(field);
app.log(global[field]);
}
"""

This gives me:

"""
currentItem, currentIndex, itemCount, prevItem

SetCurrentItem
function SetCurrentItem() {
[native code]
}

SetCurrentIndex
function SetCurrentIndex() {
[native code]
}

function parseTags() {
[native code]
}

function getItem() {
[native code]
}

function log() {
[native code]
}

Maybe there is nothing else to be found.

Best
John

#4 : 13/04-20 13:25
David Lee
Posts: 1125
Reply to #3:
You are only enumerating properties and methods of the "app" object. Try looking at an instance of the "item" object as well.

However it's easier just to type "app." or "item." in a script window. This will bring up a drop-down completion list.

Not all features have found their way into the User Guide - for example app.log and the Script Console. It's worth searching the What's New section of the Download page for additional information: www.advancedrenamer.com/whatsnew