Search found 16 matches

by BuckXUK
Fri May 06, 2016 1:29 pm
Forum: Scripting
Topic: Filter XML node by type then use IF THEN
Replies: 11
Views: 5365

Re: Filter XML node by type then use IF THEN

Hi Andrew

Yes, you can do all this with scripting. You'll just need the right XPath syntax to identify your target Extrinsic node.
by BuckXUK
Mon Mar 09, 2015 3:51 pm
Forum: Scripting
Topic: xls to csv script
Replies: 4
Views: 2818

Re: xls to csv script

Just as an option I am successfully using a command line tool called xlsx2csv to perform these types of conversions in Switch.

Just Google xlsx2csv.

Hope this helps.
by BuckXUK
Mon Mar 09, 2015 2:22 pm
Forum: Scripting
Topic: Help with RegEx
Replies: 10
Views: 5931

Re: Help with RegEx

Actually, this is what you need to use in Switch:

[^A-Z-]+[^a-z-]?[a-z-](?=[0-9]{6}).*

Positive look behinds are a no-go as well as negative ones.

I hope this helps.
by BuckXUK
Mon Mar 09, 2015 1:53 pm
Forum: Scripting
Topic: Piping commands using Execute command or process.execute...
Replies: 1
Views: 1614

Piping commands using Execute command or process.execute...

Hello I've been trying (unsuccessfully) to pipe commands from one command line tool to another using either the Execute command element or (preferably) the process.execute function in the scripting API. Has anyone been successful in doing this within the scripting API? When I try to pipe a command, ...
by BuckXUK
Mon Mar 02, 2015 4:55 pm
Forum: Scripting
Topic: Help with RegEx
Replies: 10
Views: 5931

Re: Help with RegEx

Hi

This works for me, using a fixed length positive look-behind:

(?<=[A-Z]{7}-[a-z]{5}-).*$
by BuckXUK
Fri Nov 22, 2013 3:34 am
Forum: Scripting
Topic: Anyone have the correct syntax to remove a directory…?
Replies: 3
Views: 1904

Anyone have the correct syntax to remove a directory…?

Hi Dwight Thanks for the response and I can report your 2nd option works. I had declared the variableName in the exact same way as your syntax outside the if/else block that does the removal, but setting it inside the conditional block with your syntax sorted it out. Thanks again. William Buckingham
by BuckXUK
Thu Nov 21, 2013 8:04 pm
Forum: Scripting
Topic: Anyone have the correct syntax to remove a directory…?
Replies: 3
Views: 1904

Anyone have the correct syntax to remove a directory…?

Hello all I'm trying to find the right syntax to remove a directory using the rmdir option in the Utility>Dir class. I've tried every possible syntax variation I can think of and cannot get this option to work. This is the error I receive: Error in line 76 of script : TypeError. 'rmdir' undefined or...
by BuckXUK
Thu Jun 20, 2013 9:52 pm
Forum: Scripting
Topic: Possible to summarize arrays…?
Replies: 2
Views: 1638

Possible to summarize arrays…?

Hi Dwight Thanks for the reply and suggestion. Unfortunately my source array is more complicated and I need to be able to summarize on multiple values. Here is what my array rows look like: ["1040771_300g_DL_4-4_13.pdf","300g","DL","1040773,2] ["1040769_300g_A...
by BuckXUK
Wed Jun 19, 2013 11:18 pm
Forum: Scripting
Topic: Possible to summarize arrays…?
Replies: 2
Views: 1638

Possible to summarize arrays…?

Hello everyone I have a script that does some fairly complicated sorting of production files by pushing segments of file names into an array and sorting on those values to determine the order to SendToData for output. I have a request to be able to provide a production report for a given file proces...
by BuckXUK
Mon May 13, 2013 12:38 pm
Forum: Scripting
Topic: How to use s.sleep in a loop...
Replies: 3
Views: 2247

How to use s.sleep in a loop...

Hi Freddy and thanks for the response. I was actually afraid that was what happened with a SendToXXX function. Can you advise the following then please? Since Switch uses FIFO will each of the files that are sent to the single output receive their unique job numbers in the order specified by the arr...
by BuckXUK
Fri May 10, 2013 7:51 pm
Forum: Scripting
Topic: How to use s.sleep in a loop...
Replies: 3
Views: 2247

How to use s.sleep in a loop...

Hi everyone Can anyone out there advise how I can correctly use the s.sleep function to delay each iteration of a loop that sends a sorted list of files from an array to a single path? I'm not having any luck at all using it inside the loop. Does it perhaps need to be positioned outside the loop? An...
by BuckXUK
Wed May 08, 2013 12:32 am
Forum: Scripting
Topic: Script with iterating database call...
Replies: 1
Views: 1040

Script with iterating database call...

False alarm...I have it working.



Sorry.
by BuckXUK
Tue May 07, 2013 11:48 pm
Forum: Scripting
Topic: Script with iterating database call...
Replies: 1
Views: 1040

Script with iterating database call...

Hi Everyone I'm trying to build a script element that will evaluate a directory of jobs, pull key values out of each included file's name and look up two values in a database to determine the file's sort priority. I'll then push that priority to an array for sorting and releasing the jobs into the f...
by BuckXUK
Thu May 31, 2012 7:45 pm
Forum: Scripting
Topic: Script Expression or Script...?
Replies: 5
Views: 3699

Script Expression or Script...?

Dwight I did so and was completely perplexed at what the correct syntax should be based on the manual. Ben at Enfocus suggested the following: Process.execute( ["cmd","/C",ren, theOldName, theNewName] ); However I can't get that to work within the loop function you kindly provide...
by BuckXUK
Thu May 31, 2012 5:07 pm
Forum: Scripting
Topic: Script Expression or Script...?
Replies: 5
Views: 3699

Script Expression or Script...?

Dwight Thanks for that. It has me most of the way there. I note from some earlier posts by you and Ben Schumeth at Enfocus that possibly I could use a Windows ren function using the Process class instead of copying the file. This would actually be ideal as some of these files are quite large and the...