Search found 80 matches

by mkayyyy
Mon Jan 18, 2021 3:06 pm
Forum: Applications
Topic: Activation "AWS S3 Download"
Replies: 9
Views: 21861

Re: Activation "AWS S3 Download"

Apologies for the delayed reply, glad you were able to sort it in the end!
by mkayyyy
Mon Jan 18, 2021 3:04 pm
Forum: Flows
Topic: Use regex in condition with variables
Replies: 5
Views: 5441

Re: Use regex in condition with variables

To use a regular expression as the right-hand side condition you need to use the Matches or Does not match Comparison operators
by mkayyyy
Thu Dec 17, 2020 9:18 am
Forum: Switch
Topic: Run Switch as a service on windows with Adobe + Tilia programs
Replies: 2
Views: 4342

Re: Run Switch as a service on windows with Adobe + Tilia programs

Switch talks to Tilia Phoenix using a REST API so if the REST API is running Switch can communicate with it
by mkayyyy
Wed Dec 16, 2020 7:08 pm
Forum: Applications
Topic: Activation "AWS S3 Download"
Replies: 9
Views: 21861

Re: Activation "AWS S3 Download"

I ran into the same issue with the AWS S3 Download app

The only way I ended up getting it to work was by using the script version from here: https://github.com/open-automation/switch-aws
by mkayyyy
Tue Sep 29, 2020 10:49 pm
Forum: Flows
Topic: Incoming JDF same filename
Replies: 4
Views: 5420

Re: Incoming JDF same filename

I've had a similar issue recently. I've been working on flows that have to move and process files within approx 2 seconds once they're stable. However I've had numerous times where changes to the file system took a few minutes or longer to be detected. I've been working on a Node.js Switch Script th...
by mkayyyy
Thu Sep 17, 2020 6:29 pm
Forum: Flows
Topic: [SOLVED] Check for odd number of pages
Replies: 3
Views: 4617

Re: Check for odd number of pages

abonsey wrote: Thu Sep 17, 2020 2:59 pm FYI
Got there in the end

[Switch.Calculation:Expression="([Stats.NumberOfPages]%2)"]
Ah! Can't believe I didn't think of that
by mkayyyy
Thu Sep 17, 2020 1:00 pm
Forum: Flows
Topic: [SOLVED] Check for odd number of pages
Replies: 3
Views: 4617

Re: Check for odd number of pages

Off the top of my head I can't figure out doing it through Define conditions with variables, but doing it fully in a Script expression on a connection would be done like this:

Code: Select all

var numberOfPages = (new FileStatistics(job.getPath())).getNumber("NumberOfPages");

(numberOfPages % 2 == 0);
by mkayyyy
Wed Sep 09, 2020 11:00 am
Forum: LEGACY scripting
Topic: loop xml nodes?
Replies: 3
Views: 5782

Re: loop xml nodes?

To get to the "code" nodes you need to use this Xpath expression: /Orders/Order/Product/code Then to loop through them your for loop needs to start from 0 and you need to use the getFirstChild() function to be able to get to the value of the node. See below code that loops through logs the...
by mkayyyy
Wed Aug 19, 2020 5:55 pm
Forum: Node.js scripting
Topic: Node JS debug
Replies: 2
Views: 3796

Re: Node JS debug

What I have found is that everytime I update the main.js file, I have to go into switch scripter relink main.js, and restart the flow for the changes to be applied. Does that sound right? That's correct. I've found that whilst working on a script leaving it open in SwitchScripter will save you havi...
by mkayyyy
Mon Jun 29, 2020 5:06 pm
Forum: Imposition
Topic: Tilia Phoenix HTTP Error
Replies: 2
Views: 9538

Re: Tilia Phoenix HTTP Error

Just been reading through the release notes and this issue has been resolved in Switch 2020 Spring
ENFS-24484 HTTP 4xx request responses produce error logs in Messages
by mkayyyy
Thu Jun 25, 2020 10:29 am
Forum: Imposition
Topic: Tilia Phoenix HTTP Error
Replies: 2
Views: 9538

Re: Tilia Phoenix HTTP Error

I reported this issue to Tilia Labs a few months ago, they said it's an issue that will be resolved in Switch 2020 Spring

I'm yet to install 2020 Spring though to check if has been fixed however
by mkayyyy
Tue Jun 16, 2020 7:28 pm
Forum: LEGACY scripting
Topic: ninox API query Endpoint URI Encoding
Replies: 6
Views: 7865

Re: ninox API query Endpoint URI Encoding

You can use the encodeURIComponent static function to do this

Code: Select all

HTTP.encodeURIComponent("{\"Query\":\"1 + 2\"}");
by mkayyyy
Mon Jun 15, 2020 4:29 pm
Forum: Preflighting
Topic: Unit of measure
Replies: 4
Views: 7677

Re: Unit of measure

Try passing in the unit of measurement after the measurement to your Variable Set.

For example "20 in" and when the Variable Set is evaluated it will convert the value to mm: https://gyazo.com/31bda5031af3946fa8397c5240540c44
by mkayyyy
Fri May 15, 2020 3:50 pm
Forum: Flows
Topic: Flow groups disappearing
Replies: 3
Views: 4389

Re: Flow groups disappearing

We used to regularly have this issue too, since we updated to Switch 2019 Fall we haven't seen it happen
by mkayyyy
Fri Mar 06, 2020 9:13 am
Forum: LEGACY scripting
Topic: Get part of an API Response(JSON)
Replies: 6
Views: 9956

Re: Get part of an API Response(JSON)

You will need to use JSON.parse() function so that you can get to the id:

Code: Select all

var parsedResponse = JSON.parse(theHTTP.getServerResponse().toString('UTF-8'));
parsedResponse.id;