Search found 99 matches
- Thu Dec 09, 2021 5:33 pm
- Forum: Node.js scripting
- Topic: stdout as opaque dataset, how does it work?
- Replies: 5
- Views: 5061
stdout as opaque dataset, how does it work?
With the new version of Switch it's possible to run an executable with "Execute command" and have the stdout written to the file as opaque dataset. This is documented here: https://www.enfocus.com/manuals/UserGuide/SW/21.1/home.html#en-us/common/sw/reference/r_execute_command.html I would ...
- Thu Dec 09, 2021 5:12 pm
- Forum: Node.js scripting
- Topic: Cannot find module
- Replies: 2
- Views: 2112
Re: Cannot find module
Deactivating the Icon didn't work. I wrote another script with the "axios" package and "form-data" and this one worked perfectly so I'm guessing "libxmljs2-xsd" doesn't run on the version of nodeJS installed with switch. There is really no good package to validate XML a...
- Mon Dec 06, 2021 3:14 pm
- Forum: Node.js scripting
- Topic: Cannot find module
- Replies: 2
- Views: 2112
Cannot find module
Hey there, this is my first SwitchScript with Node.js envolved. I want to use a third party package from npm that can validate XML against a XSD. I picked this one https://www.npmjs.com/package/libxmljs2-xsd. My code: const xsd = require('libxmljs2-xsd'); const fs = require('fs'); async function job...
- Mon Dec 06, 2021 12:53 pm
- Forum: Switch
- Topic: WebHooks / HTTP Listener dosn't work after Switch 21 Update
- Replies: 2
- Views: 2327
Re: WebHooks / HTTP Listener dosn't work after Switch 21 Update
Thanks for the support. I deactivated HTTP and HTTPS WebHooks in the settings which forces Switch to restart. Then I activated it again (restart again) and then it worked. I restarted Switch and the Server itself multiple times but this didn't solve the problem. Now everything workes fine and I'am g...
- Fri Dec 03, 2021 8:57 pm
- Forum: Switch
- Topic: WebHooks / HTTP Listener dosn't work after Switch 21 Update
- Replies: 2
- Views: 2327
WebHooks / HTTP Listener dosn't work after Switch 21 Update
Hi there, we just updated Switch to the latest Version 21. So far everything went fine. All Flows are up and running. :!: But our WebHooks seem not to work anymore. Also the SwitchHttpListener.exe shows up in task manager from time to time but keeps disappearing afterwards. I noticed that in the set...
- Thu Oct 07, 2021 1:48 pm
- Forum: LEGACY scripting
- Topic: Write PDF from base64-String
- Replies: 1
- Views: 5840
Re: Write PDF from base64-String
Okay that was dumb I just found the solution... I need to use "fromBase64" instead of "utf-8".
Code: Select all
var ba = new ByteArray( base64Label, "fromBase64");
- Thu Oct 07, 2021 1:44 pm
- Forum: LEGACY scripting
- Topic: Write PDF from base64-String
- Replies: 1
- Views: 5840
Write PDF from base64-String
I get a PDF as bases64 and just need to write a pdf from that. How can I make this in a Legacy Script? My code so far: function jobArrived( s : Switch, job : Job ) { const base64Label = "JVBERi0xLjQKJeLjz9MKMyAwIG9i............"; const path = job.createPathWithName("DPDLabel.pdf"...
- Tue Jul 27, 2021 8:41 am
- Forum: LEGACY scripting
- Topic: How to parse XML Response from Chili Publish API in Switch Legacy Scripter
- Replies: 2
- Views: 5978
Re: How to parse XML Response from Chili Publish API in Switch Legacy Scripter
I tried this with the Chili Publish Flow Element and action documentCreatePDF. ATM it's not working. Chili Support works on this ticket. We haven't updated switch. Because it's risky and we ain't got the time and capacity to fix everything of those old flows. Thanks Freddy.👍🏻 I will use a Nodejs ser...
- Mon Jul 26, 2021 8:11 pm
- Forum: LEGACY scripting
- Topic: How to parse XML Response from Chili Publish API in Switch Legacy Scripter
- Replies: 2
- Views: 5978
How to parse XML Response from Chili Publish API in Switch Legacy Scripter
Hey folks, how can I parse the XML from a "theHTTP.getServerResponse()"-string. Looks like this. So need to enter the "key" element. "<apiKey succeeded="true" key="MYNEWAPIKEY" validTill="2021-07-27 03:56:15Z" superAdmin="false" />&quo...
- Tue May 04, 2021 11:00 pm
- Forum: LEGACY scripting
- Topic: How to POST a file to an API (Content-Type: multipart/formdata)
- Replies: 9
- Views: 21062
- Thu Apr 22, 2021 7:42 am
- Forum: LEGACY scripting
- Topic: Get E-Mails as .eml?
- Replies: 1
- Views: 2708
Get E-Mails as .eml?
Is it possible to write a Script to connect to a pop3 and get new mails and save it as ".eml"?
- Thu Apr 22, 2021 7:34 am
- Forum: Switch
- Topic: Receive E-Mails as ".eml" possible?
- Replies: 1
- Views: 2584
Receive E-Mails as ".eml" possible?
Hi there,
as far as I know when using the incoming E-Mail Node we receive a Folder with a txt or when specified the attachments
Is it somehow possible to receive the E-Mail itself as ".eml"?
Thanks in Advance for any hint.
as far as I know when using the incoming E-Mail Node we receive a Folder with a txt or when specified the attachments
Is it somehow possible to receive the E-Mail itself as ".eml"?
Thanks in Advance for any hint.
- Thu Dec 10, 2020 3:15 pm
- Forum: LEGACY scripting
- Topic: Merge two text files
- Replies: 2
- Views: 6725
Merge two text files
Hello, I need to run a OCR on PDF Files. I want to use Tesseract. Tesseract need pictures so I build a Flow to convert PDF to JPEG and read them with OCR. Tesseract spits out txt files. I then want to read in those text Files in my script and use RegEx to sort them by specific identifiers and finall...
- Fri Nov 20, 2020 10:59 am
- Forum: LEGACY scripting
- Topic: Select a file from the beginning of a flow
- Replies: 20
- Views: 20702
Re: Select a file from the beginning of a flow
Okay this worked for me now: var dataset = job.getDataset( "OpaqueJson" ); var jsonFilePath = dataset.getPath(); var jsonFileObj = File.read( jsonFilePath ,'utf-8'); var orderJson = JSON.parse( jsonFileObj ); Bildschirmfoto 2020-11-20 um 10.57.01.png Bildschirmfoto 2020-11-20 um 10.57.22.p...
- Fri Nov 20, 2020 10:25 am
- Forum: LEGACY scripting
- Topic: DPD SOAP API
- Replies: 10
- Views: 14299
Re: DPD SOAP API
We've been integrating with DPD as well (Portugal), and it will be different, but maybe some of this can be helpful. DPD Portugal still doesn't have a REST API, as far as I know, so we've been using SOAP as well. We ended up using a script (still legacy) to build the XML file, according to the docu...