Search found 80 matches

by mkayyyy
Thu Jan 30, 2020 6:13 pm
Forum: Flows
Topic: Flow continuously generate errors
Replies: 6
Views: 6739

Re: Flow continuously generate errors

If Portals proves to pose problems then please report them to the app developer. Let me suggest an alternative: Switch2Switch ( https://www.enfocus.com/en/appstore/product/switch2switch ) Although it was made with a job transfer from one Switch installation to another one in mind it can also be use...
by mkayyyy
Tue Dec 10, 2019 12:59 pm
Forum: Switch
Topic: Switch Fall Edition 2019
Replies: 9
Views: 11642

Re: Switch Fall Edition 2019

The reporting module isn't required for this functionality, we don't have it and it works on our servers.

You just need to make sure Autorefresh on the bottom of the board is turned off when you click on a job
by mkayyyy
Tue Dec 03, 2019 12:23 am
Forum: Action Lists
Topic: Splitting and Reordering Spreads
Replies: 2
Views: 4663

Re: Splitting and Reordering Spreads

If you have PitStop 19 you can use the action “Split Action List” to combine the actions. It will need to go in between Split pages in half and Reorder pages actions. “Split Action List” will allow the Action List to make two passes over the file when you run it. It will first go through and split p...
by mkayyyy
Sat Nov 02, 2019 4:10 pm
Forum: Flows
Topic: SQL Query works in the statement editor, but not when finished
Replies: 5
Views: 5953

Re: SQL Query works in the statement editor, but not when finished

You could define the SQL statement as private data
Image

Then just pass the private data variable into the database variable and that should work
Image
by mkayyyy
Wed Oct 09, 2019 2:54 pm
Forum: LEGACY scripting
Topic: Change value of a node in an xml
Replies: 3
Views: 5187

Re: Change value of a node in an xml

The below script will replace the SKU node with a new SKU node with the value set to "CCSE-9999" // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job is passed as the second parameter. function jobArrived( s : Switch, job : Jo...
by mkayyyy
Mon Oct 07, 2019 11:11 pm
Forum: LEGACY scripting
Topic: Delete sub-folders and ignore all files except jpegs
Replies: 4
Views: 6130

Re: Delete sub-folders and ignore all files except jpegs

mkayyyy, Your script worked beautifully. Thank you for this and the comments are very helpful. I do have a question. What part filters out folders below the root folder level? The script works as expected I am just trying to understand how. Does it have to do with the directory class enumeration vi...
by mkayyyy
Mon Oct 07, 2019 9:27 am
Forum: Flows
Topic: Encode a jpg file -> Base64
Replies: 3
Views: 5651

Re: Encode a jpg file -> Base64

It is a bit safer (because there is no encoding involving) and certainly more efficient to use var imgContents = File.readByteArray( job.getPath()); than to do it in two steps by reading the file as a string and then convert that to a ByteArray. That is a much cleaner solution Freddy, thank you for...
by mkayyyy
Sun Oct 06, 2019 4:13 pm
Forum: LEGACY scripting
Topic: Delete sub-folders and ignore all files except jpegs
Replies: 4
Views: 6130

Re: Delete sub-folders and ignore all files except jpegs

This script should achieve what you're wanting: // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job is passed as the second parameter. function jobArrived( s : Switch, job : Job ) { // Create new directory object from incoming folder p...
by mkayyyy
Fri Oct 04, 2019 3:58 pm
Forum: Flows
Topic: Encode a jpg file -> Base64
Replies: 3
Views: 5651

Re: Encode a jpg file -> Base64

If you have the Scripting Module you could do it with a script like this; // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job is passed as the second parameter. function jobArrived( s : Switch, job : Job ) { // Read contents of incomin...
by mkayyyy
Fri Oct 04, 2019 9:11 am
Forum: LEGACY scripting
Topic: Need help breaking text file with multi lines into individual one line text files
Replies: 4
Views: 6349

Re: Need help breaking text file with multi lines into individual one line text files

Awesome help Mathew, thank you very much. Not to be too greedy, but can you edit add function to remove blank lines as well? :oops: No problem, sure that's pretty straight forward: // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job i...
by mkayyyy
Thu Oct 03, 2019 11:03 pm
Forum: LEGACY scripting
Topic: Need help breaking text file with multi lines into individual one line text files
Replies: 4
Views: 6349

Re: Need help breaking text file with multi lines into individual one line text files

Just replied open-automation/Lobby but thought I'd put it here as well. This script will output the text files as you're wanting: function jobArrived( s : Switch, job : Job ) { // Construct file object from path of incoming job var inFile = new File(job.getPath()); // Open the file and read contents...
by mkayyyy
Fri Sep 27, 2019 9:11 am
Forum: Applications
Topic: Switch 2019 Spring Edition
Replies: 11
Views: 16867

Re: Switch 2019 Spring Edition

After checking the Switch system requirements for Switch 2019, I noticed that 2012 Server R2 is no longer listed as a supported system. Is anybody using Switch 2019 with 2012 Server R2? If so has anybody ran into any issues?
by mkayyyy
Thu Sep 26, 2019 11:31 pm
Forum: LEGACY scripting
Topic: Webhook Response
Replies: 2
Views: 5064

Re: Webhook Response

Using the constructWebhookResponse entry point in a script should allow for this: function constructWebhookResponse( r : WebhookRequest, response : WebhookResponse, args : Array ) : Boolean { response.statusCode = 200; response.write('{status:"true"}'); return false; } You can change the b...
by mkayyyy
Thu Sep 26, 2019 10:55 pm
Forum: LEGACY scripting
Topic: Add Attribute to XML, with a twist.
Replies: 12
Views: 35076

Re: Add Attribute to XML, with a twist.

actionHero wrote: Thu Sep 26, 2019 7:49 pm Thank you for all the help, it works just as expected now. This is very helpful!
No problem! Glad I could help :)
by mkayyyy
Wed Sep 25, 2019 10:48 pm
Forum: LEGACY scripting
Topic: Add Attribute to XML, with a twist.
Replies: 12
Views: 35076

Re: Add Attribute to XML, with a twist.

To get the script to fail the whole file if one of the ISBNs don't exist I went with this which seems to work: // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job is passed as the second parameter. function jobArrived( s : Switch, job ...