Search found 294 matches

by JimmyHartington
Wed Oct 04, 2023 4:24 pm
Forum: Node.js scripting
Topic: Calculations with Switch private data
Replies: 5
Views: 19330

Re: Calculations with Switch private data

I have tried to clean up the code: let ImposeRoll: number = parseFloat(await job.getPrivateData("ImposeRoll")); let BleedRoll: number = parseFloat(await job.getPrivateData("BleedRoll")); let Width: number = parseFloat(await job.getPrivateData("Width")); let ImposeRollPr...
by JimmyHartington
Wed Oct 04, 2023 3:36 pm
Forum: Node.js scripting
Topic: Calculations with Switch private data
Replies: 5
Views: 19330

Calculations with Switch private data

Hi In a flow I needed to calculate how many times a step and repeat imposition could be repeated on 965 mm. I could not get my math to work with Switch calculations, so I decided to write a script to calculate and return a new private data key with the number I needed. But it took me way to long bec...
by JimmyHartington
Thu Sep 28, 2023 6:00 pm
Forum: Flows
Topic: document jobs running through a flow
Replies: 2
Views: 9185

Re: document jobs running through a flow

For this purpose I use the free program FlowSpy.
https://www.enfocus.com/en/appstore/product/flowspy
by JimmyHartington
Tue Sep 26, 2023 12:16 pm
Forum: Flows
Topic: Scan barcodes (QR) and output as textfile
Replies: 6
Views: 15469

Re: Scan barcodes (QR) and output as textfile

I have had some issues using Pitstops scan QR-code function. It did not catch all. If so, Jimmy, did you report them? It's still a good idea to give nna's PitStop technique a shot, Magnus, as it doesn't miss all QR codes. Codes may be missed for various reasons, including rotation (which can be tak...
by JimmyHartington
Tue Sep 26, 2023 11:25 am
Forum: Flows
Topic: Select spot colors based on a text file
Replies: 6
Views: 16351

Re: Select spot colors based on a text file

It works using RegEx. So I have made a script, which reads a text-file with a list of the spot colors separated by a newline. It is manipulated into the format "(spot1|spot2|spot3)" and set on the job as Private Data. And the Private Data is then used in the Pitstop Variable used for selec...
by JimmyHartington
Mon Sep 25, 2023 10:49 pm
Forum: Flows
Topic: Select spot colors based on a text file
Replies: 6
Views: 16351

Re: Select spot colors based on a text file

I will try the regex method and report back
by JimmyHartington
Mon Sep 25, 2023 10:51 am
Forum: Flows
Topic: Select spot colors based on a text file
Replies: 6
Views: 16351

Re: Select spot colors based on a text file

Hi Jan

Thanks for the answer.
The problem is not to get the list to a variabel in Switch.
But more that Select Spot Color does not support to put use a Pitstop variabel as the list.
by JimmyHartington
Fri Sep 22, 2023 2:04 pm
Forum: Flows
Topic: Select spot colors based on a text file
Replies: 6
Views: 16351

Select spot colors based on a text file

I need a good idea. I would like to be able to select all spot colors, which are listed in a text-file. This way a customer can add colors to the text-file and the action list in the Switch flow will dynamically remapped these spot colors to one spot color. But in Pitstop Pro I can not make the list...
by JimmyHartington
Thu Sep 21, 2023 2:48 pm
Forum: Flows
Topic: Use color picker to set background color?
Replies: 3
Views: 3871

Re: Use color picker to set background color?

May I present another solution.
Do like when TV shows vertical video on a 16:9 TV.

Image

This action list scales the pdf to A4. https://d.pr/f/lMRKEb+
Copies the image to the background.
Scales the image non-proportinally to fit A4.
Blurs the image.
by JimmyHartington
Thu Sep 21, 2023 2:23 pm
Forum: Switch
Topic: Length of variable
Replies: 4
Views: 6086

Re: Length of variable

Thanks Magnus for the example.
In my current use case I will use the other idea with scaling the content, which overlaps the media box.
by JimmyHartington
Thu Sep 21, 2023 9:21 am
Forum: Switch
Topic: Length of variable
Replies: 4
Views: 6086

Re: Length of variable

I have an action list, which places a string (variable from Switch) onto the first page. If the number of characters of the string is larger than 90 I would like to set the font size to another value. And since Loic Agnon showed the conditional variables in Pitstop I would like to use them to set th...
by JimmyHartington
Tue Sep 19, 2023 10:57 pm
Forum: Flows
Topic: Release files sorted by time stamp
Replies: 2
Views: 5179

Re: Release files sorted by time stamp

Are you allowed to rename the files? Maybe temporarily. Then you could add the date/time as prefix. Use the app File sorter and spacer to sort and release. https://cdn-www.enfocus.com/sites/default/files/media/images/appstore/product_documentation/1666186900/documentation_-_folder_apps_v4_english.pdf
by JimmyHartington
Tue Sep 19, 2023 2:16 pm
Forum: Switch
Topic: Length of variable
Replies: 4
Views: 6086

Length of variable

I can not seem to find out how to get the length (number of characters) of a variable.
Is there a built in way in Switch to do this?
Or do I have to use scripting?
by JimmyHartington
Fri Sep 08, 2023 1:52 pm
Forum: Node.js scripting
Topic: Logging of variable
Replies: 6
Views: 7725

Re: Logging of variable

So you can get around this by using a variable: await job.log(LogLevel.Info,'Encoded URL: "%1"',[URLtoEncode]); Thanks patej. This method works. await job.log(LogLevel.Info,'Encoded URL: "%1"',[encodedURL]); https://d.pr/i/qIgkzv+ So now the finished code is like this: async fun...
by JimmyHartington
Fri Sep 08, 2023 1:48 pm
Forum: Node.js scripting
Topic: Logging of variable
Replies: 6
Views: 7725

Re: Logging of variable

As a workaround you can do the following: let replacements = ["%1", "%2", "%3", "%4", "%5", "%6", "%7", "%8", "%9"]; await job.log(LogLevel.Info, encodedURL, replacements); I tried to add this code to the scri...