Search found 39 matches

by Sunnyland
Fri Oct 02, 2020 9:17 am
Forum: Node.js scripting
Topic: api call from flow
Replies: 2
Views: 312

Re: api call from flow

Thanks Freddy, Yep big learning curve with NodeJS, using callback or Promises. I really had to drill down on what the differences are. I have change the above code and now it uses promises and not callbacks and believe it or not the code is much simpler and now works. Will look forward to the webinar.
by Sunnyland
Wed Sep 16, 2020 8:55 am
Forum: Node.js scripting
Topic: Writing a Dataset JSON
Replies: 2
Views: 329

Re: Writing a Dataset JSON

Thanks for the info,
I also realized that I have set the datasetmodel set to JDF rather than JSON which didn't help my cause. I will convert to XML just try to take the easy way out.
by Sunnyland
Wed Sep 16, 2020 8:31 am
Forum: Node.js scripting
Topic: Writing a Dataset JSON
Replies: 2
Views: 329

Writing a Dataset JSON

So I want to write a JSON dataset. Using await job.createDataset("iqdata",JSONpath,DatasetModel.JDF); and writing this JSON Data { "job": [{ "impositionwidth": "210.0000", "impositionheight": "297.0000", "sectionnumber": 0, "finishedwidth": "210.0000", "finishedheight": "297.0000", "pages": "2", "fo...
by Sunnyland
Tue Sep 01, 2020 10:14 am
Forum: Node.js scripting
Topic: api call from flow
Replies: 2
Views: 312

api call from flow

I am currently trying to make an api call from a flow. I already have a script that works using Javascript but for this I have decided to put my poor NodeJs skills to the test and see how I go. I have failed so far, it appears that the http code is just ignored by switch. I do not get success logs o...
by Sunnyland
Mon Aug 31, 2020 11:29 pm
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

Re: NodeScriptExecutor.js.map

Thanks for that. I have been ignoring the message, it’s good to know that it isn’t affecting anything
by Sunnyland
Mon Aug 31, 2020 10:41 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 1264

Re: Select Dieline and Convert to spot

Ok so there is no button next to user swatch. I may need to uninstall and reinstall pitstop server. All I get is a black square
by Sunnyland
Mon Aug 31, 2020 9:43 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 1264

Re: Select Dieline and Convert to spot

I did try to use remap color but the only option was user swatch and I couldn't figure out where to set the user swatch color
by Sunnyland
Mon Aug 31, 2020 2:08 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 1264

Select Dieline and Convert to spot

I am trying to select a dieline by line thickness and colour and convert to a spot color called "Knife". We have artwork come from several different sources. Some places will use 100% cyan, others will use 100% Magenta and then some will call the knife line Diecut the later is easy to select and cha...
by Sunnyland
Thu Aug 27, 2020 10:28 am
Forum: Node.js scripting
Topic: Set PrivateData in a Function
Replies: 1
Views: 287

Set PrivateData in a Function

So I know how to set private data from within theJobArrived function but can I set private data in another function? I have tried to pass the job variable to the secondary function but this doesn't seem to work. Is it possible, if so what do I need to do?
by Sunnyland
Mon Aug 24, 2020 9:27 am
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

Re: NodeScriptExecutor.js.map

All good. The whole lot is a learning curve for me. This is the launch.json file. { // 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", "config...
by Sunnyland
Mon Aug 24, 2020 12:40 am
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

Re: NodeScriptExecutor.js.map

Sure thing, Please see the contents of my package.json file { "name": "nodejs-job-arrived2", "version": "0.0.0", "description": "NodejsJobArrived2", "main": "main.js", "author": { "name": "" }, "dependencies": { "easy-soap-request": "^3.3.3", "express": "^4.17.1", "fetch": "^1.1.0", "fs-extra": "^9....
by Sunnyland
Mon Aug 24, 2020 12:40 am
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

Re: NodeScriptExecutor.js.map

Sure thing, Please see the contents of my package.json file { "name": "nodejs-job-arrived2", "version": "0.0.0", "description": "NodejsJobArrived2", "main": "main.js", "author": { "name": "" }, "dependencies": { "easy-soap-request": "^3.3.3", "express": "^4.17.1", "fetch": "^1.1.0", "fs-extra": "^9....
by Sunnyland
Sat Aug 22, 2020 3:10 am
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

Re: NodeScriptExecutor.js.map

No I cannot see anything that refeerences Enfocus Swith in the package.json file at all the complete error is as follows Could not read source map for file:///C:/Program%20Files/Enfocus/Enfocus%20Switch/ScriptExecutor/NodeScriptExecutor.js: ENOENT: no such file or directory, open 'c:\Program Files\E...
by Sunnyland
Fri Aug 21, 2020 8:03 am
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 1020

NodeScriptExecutor.js.map

Is anyone else getting this error? ENOENT: no such file or directory, open 'c:\Program Files\Enfocus\Enfocus Switch\ScriptExecutor\NodeScriptExecutor.js.map' From what I can tell NodeScriptExecutor.js is in the folder but I do not have a NodeScriptExecutor.js.map file. Is this something I need to add?
by Sunnyland
Fri Aug 21, 2020 7:16 am
Forum: Node.js scripting
Topic: SOAP Request
Replies: 1
Views: 513

SOAP Request

Have spent the last 6 hours trying to make a SOAP request from switch and NODEJS I have tried to use node soap but I could get it working correctly, so then I have tried to use http it is a simple request var args = "<?xml version='1.0' encoding='utf-8'?>" + "<soap12:Envelope xmlns:xsi='http://www.w...