Copy link to clipboard
Copied
Is there someway to have a script's $.writeln output show up in VS Code instead of the ESTK?
Thanks
I suspect the problem is with targetSpecifier. Can you try following:
1. Remove targetSpecifier and engineName from launch.json
2. Select Indesign target and engine from `Select the target application` at the status bar in the bottom.
After selecting the target and starting the script, in the Output window, what is the value of `targetSpecifier`?
Copy link to clipboard
Copied
Hi akiva_atwood ,
from a similar question on InDesign Scripting Forum I know that you are on Mac OS X.
What's your version of VS Code Editor?
If you are executing a $.writeln() what exactly will happen?
Does the ESTK try to launch? Thought, the ESTK cannot run side-by-side with VS Code Editor.
Could you avoid using $.writeln() and switch to a different messaging system?
Write e.g. the result of the argument with toString() to a log file and execute the log after ExtendScript script run.
Regards,
Uwe
Copy link to clipboard
Copied
Can you share what you're seeing when you try to use $.writeln? Does ESTK launch, or do you just see nothing in the output of VSCode?
Also -- there is an issue where the last write may not show up in the output -- so make sure you're executing more than one $.writeln.
Finally -- try the 1.0.1 release of the plugin (release is in progress; should be on the marketplace in a few minutes) and see if anything improves.
Copy link to clipboard
Copied
Haven't been able to get it working. (OSx, VSC 1.33.1, 1.0.1 plugin)
Uninstalled and reinstalled the plugin
1) The setup instructions don't work -- when I click the plugin gear I get
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
]
}
Which is not what the instructions say should be there.
I replace that with the contents from the install instruction == try to run -- and get
Can’t start a session without an active target and engine. Select an active target and engine before trying again.
I add
"engineName":"main",
and it starts ID
And gives an error: TypeError: Cannot read property 'label' of undefined
I've been running scripts from inside ID and getting the $.writeln output in the ESTK for now -- but want to get it working.
Copy link to clipboard
Copied
May be there is some syntax error in your script. Can you try with a sample script(`alert("Hello World");`) first and see if that works? Also in the configuration, ` "program": "${file}"` means that your currently focussed script(.js/.jsx) in the editor window will be executed.
Copy link to clipboard
Copied
just tried that ('alert("hi");')
still get TypeError: Cannot read property 'label' of undefined
Copy link to clipboard
Copied
Can you attach screenshot of whole VSCode window with this error?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I suspect the problem is with targetSpecifier. Can you try following:
1. Remove targetSpecifier and engineName from launch.json
2. Select Indesign target and engine from `Select the target application` at the status bar in the bottom.
After selecting the target and starting the script, in the Output window, what is the value of `targetSpecifier`?
Copy link to clipboard
Copied
worked -- including $.writeln
Thanks
Copy link to clipboard
Copied
Don't forget to mark 8. as correct.
AGup​ you should get a staff badge maybe TriciaLawrence​ can arrange that for you?
Copy link to clipboard
Copied
I would -- but there's no correct option...
Copy link to clipboard
Copied
Yes you're correct, there must be some bug with Jives now.
Copy link to clipboard
Copied
there is nothing wrong... someone changed the thread to a post instead of a question but I have set it back
Copy link to clipboard
Copied
The thread was marked as a discussion and not a question, that's why it didn't have an option to mark as correct.
I changed it to a question and marked the answer as correct.
Magic powers.