1 person found this helpful
The thing is that you can't include #targetengine inside JSXBIN. Remove #targetengine from script, export your script to JSXBIN open new script and do this:
app.doScript("/*paste your JSXBIN file here*/");
You will have to delete line breaks in your JSXBIN file or put slash (\) on the end of each line.
Hope that helps.
Thanks for the tip Marijan, it worked!
Just another question: I tried to put the slash at the end of every lines like this:
dlg.buttons_group.enabled = false;\
var folder_path = folder.absoluteURI;\
var folder_contents = folder.getFiles();\
but while debugging it showed me errors so I deleted line breaks and it went good.
Did I do something wrong?
What's the story behind those slashes?
Is there a way to handle all this within just one file?
No, you don't have to put shlases on JSX file. You have to put slashes on JSXBIN file. Here is the sample:
Now convert it to JSXBIN:
Now, open new JSX file and form it like this:
Notice slash on the end of the line. You have to put it on each end of line, or you delete linebreaks to get one long line of code.
And that's it.
Ok, now it works!
why when I launch the script from ID it automatically open the ExtendToolkit?
I just tested some sample script and it works just fine.
Does it give you some error?
No it doesn't, I tested the script before converting it in binary code and it works right.
The only "strange" thing I do is writing a log file in a folder I create inside user's "Documents" folder.
The rest is common JScript.
I used $.write() in a function for my debugging and that force ETK to open obviously, that was the problem.
If you want to I can send you the script for a test, I just tested it on mac cause the client works with that...