Search found 33 matches

by foxpalace
Fri Dec 01, 2023 9:13 am
Forum: Node.js scripting
Topic: REST API GET/POST calls within Switch workflow via "Script Element"
Replies: 2
Views: 13423

Re: REST API GET/POST calls within Switch workflow via "Script Element"

Hi,
so really I don't know what you mean, this?
https://www.enfocus.com/en/learn/switch#scripting
I use in very much Scripts axios for API-Calls

Michael
by foxpalace
Wed Oct 25, 2023 10:45 am
Forum: Node.js scripting
Topic: Update Values in xml files
Replies: 5
Views: 8832

Re: Update Values in xml files

Hi, whitout npm install path und fs-extra no chance
by foxpalace
Fri Sep 08, 2023 12:54 pm
Forum: Node.js scripting
Topic: Logging of variable
Replies: 6
Views: 6376

Re: Logging of variable

Hi

Code: Select all

await job.log(LogLevel.Info, "Url to encode: " + URLtoEncode);
by foxpalace
Wed Jun 07, 2023 2:57 pm
Forum: Node.js scripting
Topic: Database Values as NodeJS Parameters
Replies: 7
Views: 19199

Re: Database Values as NodeJS Parameters

Hi, [Database.Text:SQL="SELECT #columnName FROM #tableName WHERE #columnValue = '[Job.PrivateData:Key="adID"]'",Connection="FileMaker-Database"] should it not be: [Database.Text:SQL="SELECT " + columnName + " FROM " + tableName + " WHERE " ...
by foxpalace
Wed Oct 05, 2022 8:34 pm
Forum: Node.js scripting
Topic: error importing axios in typescript script folder
Replies: 6
Views: 5359

Re: error importing axios in typescript script folder

yes freddy, i have the same errors with other modules - on one mac no problem, other mac problem
by foxpalace
Fri Sep 30, 2022 3:40 pm
Forum: Node.js scripting
Topic: catch (err) -> err.message
Replies: 1
Views: 2639

catch (err) -> err.message

Hi, i have this code from documentation: try { dosomething } catch (err) { job.fail('PDF error: %1'); //job.fail('PDF error: %1', [err]); //grmpf err unknown } why do I get this error, when I use the line whit [err]? michael@macpro seitenmelder % SwitchScriptTool --transpile . Error: Failed to trans...
by foxpalace
Fri Sep 30, 2022 3:29 pm
Forum: Node.js scripting
Topic: node.js debugger setup
Replies: 3
Views: 3288

Re: node.js debugger setup

by foxpalace
Wed Aug 25, 2021 3:06 pm
Forum: Node.js scripting
Topic: Curl Switch Script Example
Replies: 2
Views: 4358

Re: Curl Switch Script Example

Hi,
look at the first posting of this forum - sorry page :)
viewtopic.php?f=26&t=3959
by foxpalace
Thu May 27, 2021 2:43 pm
Forum: Node.js scripting
Topic: Stats.NumberOfPages
Replies: 8
Views: 12415

Re: Stats.NumberOfPages

Hi Laurentd,

today ist May 27th, System requirements is uptodate, but I can't download 2021 spring. I would like to update my Switch-Dev-Version :)
by foxpalace
Mon May 17, 2021 3:38 pm
Forum: Node.js scripting
Topic: Stats.NumberOfPages
Replies: 8
Views: 12415

Stats.NumberOfPages

Hi,
how do I get the Switch-Stats-Values in NodeJS?
Greeting
Michael
by foxpalace
Wed Feb 24, 2021 12:09 pm
Forum: Node.js scripting
Topic: switchScriptTool --pack
Replies: 6
Views: 6761

Re: switchScriptTool --pack

remember - if you are using a Icon in that Script - the pack would only work, when the icon-name is the same as the script
by foxpalace
Tue Feb 23, 2021 8:04 pm
Forum: Node.js scripting
Topic: Connect to MSSQL - to ODBC or not to ODBC?
Replies: 2
Views: 4355

Re: Connect to MSSQL - to ODBC or not to ODBC?

Hi,
iiiiiiih ms... ;)
I would prefer mssql

Code: Select all

npm install mssql
https://www.npmjs.com/package/mssql
Good examples with promise - for MariaDB I use mysql2
by foxpalace
Mon Jan 25, 2021 2:15 pm
Forum: Node.js scripting
Topic: Text to XML using Node.js in Switch Scripter
Replies: 5
Views: 8943

Re: Text to XML using Node.js in Switch Scripter

Hi,
yes, because you use legacy Script and not TypeScript.
Greetings
Michael
by foxpalace
Thu Jan 21, 2021 5:03 pm
Forum: Node.js scripting
Topic: PowerSwitch 2020 Fall and TypeScript
Replies: 1
Views: 3179

PowerSwitch 2020 Fall and TypeScript

Hi, am I doing something wrong or is there a little Bug (FeatureRequest?). When I use "npm install something" I loose the code completion for the Switch-Commands - is it the same with you? I open the Terminal in VSC and i am located in my project where the main.ts is (done like here is not...
by foxpalace
Tue Jan 19, 2021 2:23 pm
Forum: Node.js scripting
Topic: Text to XML using Node.js in Switch Scripter
Replies: 5
Views: 8943

Re: Text to XML using Node.js in Switch Scripter

Hi, I need in short a similar Script and I have to learn more TypeScript. So I think this is rudimentary, but it did what you need import fs from "fs"; async function jobArrived(s: Switch, flowElement: FlowElement, job: Job) { let dateiname = await job.getName(); let dateipfad = await job....