Search found 23 matches

by foxpalace
Wed Feb 24, 2021 12:09 pm
Forum: Node.js scripting
Topic: switchScriptTool --pack
Replies: 6
Views: 1058

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: 456

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: 4
Views: 1102

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: 637

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 noticed - Poi...
by foxpalace
Tue Jan 19, 2021 2:23 pm
Forum: Node.js scripting
Topic: Text to XML using Node.js in Switch Scripter
Replies: 4
Views: 1102

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.get(Access...
by foxpalace
Tue Jan 19, 2021 1:54 pm
Forum: Node.js scripting
Topic: Text to XML using Node.js in Switch Scripter
Replies: 4
Views: 1102

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

Hi,
has your inputfile always the same structure?
by foxpalace
Mon Jan 18, 2021 12:52 pm
Forum: Node.js scripting
Topic: api call with https
Replies: 2
Views: 736

Re: api call with https

Hi Freddy,
you made my day :)
I have to learn, to learn, to learn ...

Greetings Michael
by foxpalace
Sat Jan 16, 2021 2:45 pm
Forum: Node.js scripting
Topic: api call from flow
Replies: 6
Views: 1654

Re: api call from flow

Hi,
can you post, what you changed?
by foxpalace
Sat Jan 16, 2021 10:00 am
Forum: Node.js scripting
Topic: api call with https
Replies: 2
Views: 736

api call with https

Hello, whats wrong with this script, when I execute the Script with nodjs on Terminal it works, when I transpile it, the api-call will never run in Switch???? const https = import('https'); async function jobArrived(s: Switch, flowElement: FlowElement, job: Job) { let datei = job.getName(); let ziel...
by foxpalace
Fri Sep 29, 2017 7:23 am
Forum: LEGACY scripting
Topic: Count of Pages in PDF
Replies: 4
Views: 4964

Re: Count of Pages in PDF

Hi Zegwaard,

great - works like a charm :)
by foxpalace
Thu Sep 28, 2017 7:12 pm
Forum: LEGACY scripting
Topic: Count of Pages in PDF
Replies: 4
Views: 4964

Count of Pages in PDF

Hi, I think I am stupid, but how do I count the Pages of an PDF? - mdls won't work - a) via spotlight via launchctl deactivatet b) the flow is too fast - I tried exiftool, but var getPages = ("/usr/bin/perl /usr/local/Cellar/exiftool/10.55/bin/exiftool -\"*Count\" " + OrigFile); s.log(1, "getPages: ...
by foxpalace
Mon Nov 05, 2012 6:35 am
Forum: LEGACY scripting
Topic: question about Process.execute
Replies: 9
Views: 7864

question about Process.execute

Hi - that is now my ready Script. It works for me and I know it could be better (for example OutPutFolder of PDF-Merge). What did the Flow: 1. Rotate Pages 180° (Callas kfpx) 2. Split-PDFs (Callas Action) 3. Rebuild the Pages -> Merge backwards (the Script) Now I can place the new PDF to an other on...
by foxpalace
Sun Nov 04, 2012 12:01 pm
Forum: LEGACY scripting
Topic: question about Process.execute
Replies: 9
Views: 7864

question about Process.execute

Solved: The error was the array - now I build the cli manually: var String befehl = ""/Applications/callas pdfToolbox Server 6/cli/pdfToolbox"" + " " + "--mergepdf" + " " + "-o=/Users/michael/Desktop/bitburg/test/bla.pdf" + " " + Ordner; Process.execute(befehl); That works now :) Thank you all for y...
by foxpalace
Sun Nov 04, 2012 11:15 am
Forum: LEGACY scripting
Topic: question about Process.execute
Replies: 9
Views: 7864

question about Process.execute

Hi Peter, thank you, but I get the same Error: 29> var theExitCode = Process.execute(args); 30> var thestdOut = Process.stdout(); 31> var thestdErr = Process.stderr(); 32> s.log(1, "test: " + theExitCode); 33> s.log(1, "Out: " + thestdOut); 34> s.log(1, "Err: " + thestdErr); Fehler in Zeile 30 des S...
by foxpalace
Sat Nov 03, 2012 9:30 am
Forum: LEGACY scripting
Topic: question about Process.execute
Replies: 9
Views: 7864

question about Process.execute

Hi dkelly,



can you give me an example of Process.stdout and Process.stderr?

I only get: TypeError. 'stdout' undefined or not a function



Gruß

Michael