Search found 16 matches

by reprokaiser
Thu Jan 26, 2012 3:43 pm
Forum: LEGACY scripting
Topic: How to create a Dataset using a script?
Replies: 4
Views: 8116

How to create a Dataset using a script?

Hi Robert,



thanks for the help! I figured it out and the solution is up and running now. It's incredible what can be done by scripting Switch.



Kind regards,



Peter
by reprokaiser
Wed Jan 25, 2012 11:24 am
Forum: LEGACY scripting
Topic: How to create a Dataset using a script?
Replies: 4
Views: 8116

How to create a Dataset using a script?

Hi All, I'm trying to create an external dataset (just like the ones created by a Submit Point, or an XML Pickup tool). In the manual it is repeatedly stated that an external dataset can't be altered, but it's possible to create a new one. I'm able to construct and save an XML document, then I can p...
by reprokaiser
Wed Jan 25, 2012 11:06 am
Forum: LEGACY scripting
Topic: Adobe Illustrator Javascript and Unique Name Prefixes
Replies: 2
Views: 12449

Adobe Illustrator Javascript and Unique Name Prefixes

Hi, you should use the variables provided by Switch. This is because Illustrator doesn't really 'know' that it's driven by another application, so it behaves like an ordinary desktop software. Please see the Switch documentation about Javascript for Adobe applications. Review your whole code like th...
by reprokaiser
Wed Jan 25, 2012 10:50 am
Forum: LEGACY scripting
Topic: new Dataset for UngroupJob
Replies: 3
Views: 6798

new Dataset for UngroupJob

As to my knowledge, your only option is to wait for a set period of time, then assemble the folder. Since you don't know the resulting file number at the time of ungrouping, you would have to compute it after the preflight. It' not impossible, just you have to feed the resulting value (the count of ...
by reprokaiser
Wed Aug 31, 2011 2:49 pm
Forum: LEGACY scripting
Topic: Renaming by script expression - why does it process the job multiple times?
Replies: 0
Views: 5861

Renaming by script expression - why does it process the job multiple times?

Dear All, I'm trying to rename files using an outside counter for renaming files in PowerSwitch. There is a small XML file on drive c:, which stores the actual slot number: ------ 0 ------ .. and each of the incoming files get the slot number from here, then the counter increased and saved for later...
by reprokaiser
Mon Jul 18, 2011 5:59 pm
Forum: LEGACY scripting
Topic: How to use timerFired() and sendTo() together properly?
Replies: 2
Views: 7112

How to use timerFired() and sendTo() together properly?

Dear All, I'm struggling with a problem for some days, but no avail. Basically I want to check a folder for time to time, and sort the arrived files based on name and creation time. I think this is what timerFired() is for – the problem is that I can't send the files out. It's not really clear to me...
by reprokaiser
Thu Jul 14, 2011 3:33 pm
Forum: LEGACY scripting
Topic: Replacing values in an XML by a script
Replies: 8
Views: 14836

Replacing values in an XML by a script

Hi Bens,



thanks for the quick reply, it's working perfectly!



Kind regards,



Peter
by reprokaiser
Wed Jul 13, 2011 11:15 pm
Forum: LEGACY scripting
Topic: Replacing values in an XML by a script
Replies: 8
Views: 14836

Replacing values in an XML by a script

Dear All, after Bens quite nice primer on creating an XML file it's mostly clear how to author such a file. However, I ran into a problem using those methods: how can I actually change a value in an existing XML by using a script? After studying the manual and the reference I can't help just to acqu...
by reprokaiser
Wed Jun 15, 2011 10:55 am
Forum: LEGACY scripting
Topic: Querying data from XML using node names
Replies: 2
Views: 7464

Querying data from XML using node names

Hi Robert,



thanks for the quick help, it's working fine. I've never ever figured it out alone.



Kind regards,



Peter
by reprokaiser
Tue Jun 14, 2011 9:42 pm
Forum: LEGACY scripting
Topic: Querying data from XML using node names
Replies: 2
Views: 7464

Querying data from XML using node names

Hi All, I'm struggling with a problem for awhile. It's clear how to fetch specific data from an external dataset in PowerSwitch, but what if the data is a 'moving target'? Example: var theDataset = job.getDataset("pi4"); // external dataset added by Callas pdfToolbox var theOutputIntent = ...
by reprokaiser
Tue Apr 26, 2011 11:34 am
Forum: LEGACY scripting
Topic: Formatting date using Javascript
Replies: 5
Views: 11752

Formatting date using Javascript

Hi dkelly,



many thanks for the answer. I wonder is it possible to use this very handy compact form in case of any file, not just the 'job' itself?



Kind regards,



Peter
by reprokaiser
Fri Apr 22, 2011 8:40 pm
Forum: LEGACY scripting
Topic: Formatting date using Javascript
Replies: 5
Views: 11752

Formatting date using Javascript

Hi dkelly, thanks for the quick reply. I know that I can fabricate a string using methods like you showed, just I thought that there is a built-in feature to do that, much more easily. Please take a look into the Scripting Reference (search: formatting, then click on the link: Formatting, then scrol...
by reprokaiser
Fri Apr 22, 2011 7:24 pm
Forum: LEGACY scripting
Topic: Formatting date using Javascript
Replies: 5
Views: 11752

Formatting date using Javascript

Dear Sirs, please help me format date information using Javascript in PowerSwitch. I'm trying to present directory data to users in a form which is comfortable them to use. Currently all I can do is to show them the ISO formatted data (1998-12-23T12-43-45), which is fine, but is a bit too much for n...
by reprokaiser
Wed Apr 06, 2011 10:15 pm
Forum: LEGACY scripting
Topic: Injecting files using a Script
Replies: 6
Views: 14508

Injecting files using a Script

Hi dkelly, thanks for the answer! Yeah, I though about file.remove(), and now I see the difference. One more question, if you don't mind. Why there isn't a file.rename() function available? How can I rename a file (not the job) using a script? Do I need to go around the circle like getting a tempora...
by reprokaiser
Tue Apr 05, 2011 8:05 pm
Forum: LEGACY scripting
Topic: Injecting files using a Script
Replies: 6
Views: 14508

Injecting files using a Script

Hi Bens,



thanks for the enlightement! Just one more question: what's the difference between job.sendToNull() and job.remove() ? Both of them effectively delete the remaining file, don't they?



Thanks in advance, kind regards,



Peter