Search found 208 matches

by Padawan
Sun Sep 08, 2019 10:53 am
Forum: Scripting
Topic: Concurrent execution...?
Replies: 1
Views: 129

Re: Concurrent execution...?

When you check the progress pane, does the script show as a normal script or a light script? When switch sees a script finishes fast it considers it a light script and starts more of them concurrently. If switch currently doesn't see it as a light script, then you might get a performance improvement...
by Padawan
Wed Aug 14, 2019 1:16 pm
Forum: Flows
Topic: XML string to PDF File
Replies: 10
Views: 635

Re: XML string to PDF File

Ok, I used the earlier mentioned code and created a flow with it, you can find it in the attached zip. The flow looks like this: https://i.ibb.co/yfm3Jfv/screenshot.png Basically: - An XML Pickup to attach your xml file as metadata - A script to extract the part of the xml which is the PDF and save...
by Padawan
Tue Aug 13, 2019 5:55 pm
Forum: Flows
Topic: XML string to PDF File
Replies: 10
Views: 635

Re: XML string to PDF File

Most likely the XPath expression is incorrect. Would it be possible to share your XML file? Then we can tailor an example specific to the structure of your XML file.
by Padawan
Sun Aug 11, 2019 3:53 pm
Forum: Switch
Topic: How are missing font/image pop ups defeated in Illustrator?
Replies: 1
Views: 433

Re: How are missing font/image pop ups defeated in Illustrator?

Do you see the popups with the official Illustrator configurator with no extra scripts? If yes, then double check that you are using a supported version of Illustrator. You can find the supported versions via menu Help/Manage configurators in Switch and searching for Illustrator. If you are using a ...
by Padawan
Tue Aug 06, 2019 11:55 am
Forum: Switch
Topic: Delete specific files from SFTP
Replies: 3
Views: 304

Re: Delete specific files from SFTP

Using default Switch tools the only way to rename a folder on an FTP server is to: - Download the folder from the FTP - Rename it - Upload it again to the FTP If you want to rename the folder on the FTP itself, then you need an external script or command line tool which is able to rename the FTP fol...
by Padawan
Sun Aug 04, 2019 6:56 pm
Forum: Switch
Topic: "Sort files in job" Element
Replies: 1
Views: 190

Re: "Sort files in job" Element

Can you try to set it like this? Sort key 1: Number Number index 2 Sort key Number means that it will search for numbers in the filename. Number index 2 means it will look for the second number in the filename and use that for the sorting. This means that: For filename "A1B2C3.pdf", "2" is the secon...
by Padawan
Wed Jul 31, 2019 9:09 am
Forum: Switch
Topic: Delete specific files from SFTP
Replies: 3
Views: 304

Re: Delete specific files from SFTP

You'll need to call an external script or command line tool to accomplish this.

There has been a similar discussion in the past:
viewtopic.php?f=11&t=92

(I haven't tried this myself, I just remembered the old topics)
by Padawan
Mon Jul 29, 2019 8:50 am
Forum: Scripting
Topic: Convert Date Format - Missing Leading Zero's
Replies: 2
Views: 390

Re: Convert Date Format - Missing Leading Zero's

Hi,

Can you try to replace
var date = new String (+year + "-" + +month + "-" + +day);
with
var date = new String (year + "-" + month + "-" + day);
?

The extra plus signs make that Switch interprets the string as number and removes the leading zero's.
by Padawan
Thu Jul 25, 2019 4:30 pm
Forum: Scripting
Topic: setGlobalData issue
Replies: 6
Views: 435

Re: setGlobalData issue

I really hope that some day I will be able to stop make stupid mistakes like this. Usually I find them before I finish the project, but this one slipped thru :)

Thanks Freddy!

If this is not the issue, then I'm getting curious to the issue Loic is having.
by Padawan
Thu Jul 25, 2019 10:13 am
Forum: Scripting
Topic: setGlobalData issue
Replies: 6
Views: 435

Re: setGlobalData issue

I did some tests and I noticed that when I try to read the global data in the same script instance as I store it that it can't access it (Switch 2019). But the next script element is able to read it. Code: function jobArrived( s : Switch, job : Job ) { var testScope = "testScope"; var testTag = "tes...
by Padawan
Thu Jul 25, 2019 9:00 am
Forum: Scripting
Topic: Get job count for entire flow
Replies: 8
Views: 606

Re: Get job count for entire flow

Now that I think of it, I think you can cleanup the jobs which you manually removed via Switch Designer via menu File/Cleanup Application data (or restarting Switch Server). Can you try that?
by Padawan
Thu Jul 25, 2019 7:14 am
Forum: Scripting
Topic: Get job count for entire flow
Replies: 8
Views: 606

Re: Get job count for entire flow

I think that's a question you better ask to Enfocus Support.
by Padawan
Wed Jul 24, 2019 8:55 pm
Forum: Scripting
Topic: Get job count for entire flow
Replies: 8
Views: 606

Re: Get job count for entire flow

Based on your original description you don't need to buy any module. You say: "Is there a way (via scripting or otherwise) to get a count of all current jobs being processed in a flow? " You can get all current job information using the functionality the core module provides. If you would need infor...
by Padawan
Wed Jul 24, 2019 9:10 am
Forum: Scripting
Topic: Get job count for entire flow
Replies: 8
Views: 606

Re: Get job count for entire flow

Have you worked with Switch dashboards before? If not, then I would advise you to check the documentation on them: https://www.enfocus.com/manuals/UserGuide/SW/19/home.html#en-us/common/sw/concept/co_dashboards_widgets_overview.html They allow to give you a visual overview of all the jobs in all of ...
by Padawan
Thu Jul 18, 2019 8:19 pm
Forum: Scripting
Topic: read text from *.txt-files and save it to variables
Replies: 5
Views: 608

Re: read text from *.txt-files and save it to variables

Ok, some things are off: You are using a script expression, so you don't need the job arrived entry point. You can just write your code, store the output in a variable and in the last line type the variable name with a semicolon. Job.getvariableasstring() expects a switch variable as string, so that...