Search found 10 matches

by jskibbie
Fri Apr 03, 2015 8:33 pm
Forum: Scripting
Topic: Including files
Replies: 8
Views: 5499

Re: Including files

MoodyBro, thanks for that info. I'll have to try that out.

Freddy, I've requested this before, and I'm still interested in this feature. Please add me: jskibbie@schawk.com.

Thanks.
by jskibbie
Mon Mar 30, 2015 7:30 pm
Forum: Scripting
Topic: RegExp Lazy Quantifiers
Replies: 1
Views: 1589

RegExp Lazy Quantifiers

Is there a way to do a lazy quantifier in Switch using .*? When I try to isolate the value "Some Value" from the string below using the lazy quantifier .*? I don't get any match. var str = 'Some Value / Some Other Value / Yet Another Value /'; re = /(.*?)\s\//; job.log (-1, re.search(str) ...
by jskibbie
Wed Feb 26, 2014 11:01 pm
Forum: Scripting
Topic: JSON web service
Replies: 2
Views: 2494

JSON web service

Dwight-



Thanks for the quick reply. Unfortunately, the web service's only supported data format is JSON.



I'll be sending in my 'wish' request for some built-in JSON support to Enfocus. In the meantime, I guess I'll go with the eval method I've already tried out.



Thanks.

Jim
by jskibbie
Wed Feb 26, 2014 9:34 pm
Forum: Scripting
Topic: JSON web service
Replies: 2
Views: 2494

JSON web service

I'm writing a ScriptElement that is using cURL to generate an HTTP POST to a web service. The response from the web service is a string representing a JSON object. I need to be able to parse the response to continue on with my script. The response looks something like this: { "error": { &q...
by jskibbie
Fri Sep 06, 2013 7:21 pm
Forum: Scripting
Topic: URL Encode
Replies: 4
Views: 2411

URL Encode

Thanks Dwight! That's exactly what I was looking for. I made a slight modification to use a regular expression vs. switch/case, I'm posting it here for grins. Users can modify the switch/cases or the regular expression to add/delete characters to be encoded. Also, I found out from Enfocus Support th...
by jskibbie
Thu Sep 05, 2013 1:42 am
Forum: Scripting
Topic: URL Encode
Replies: 4
Views: 2411

URL Encode

I got this to work by using a separate shell script and passing theValue as an argument. Then, escaping of the argument value seemed to work correctly. I'd love it if someone had a solution that didn't involve the need for the separate shell script file so this could be all encapsulated inside of Sw...
by jskibbie
Wed Sep 04, 2013 9:54 pm
Forum: Scripting
Topic: URL Encode
Replies: 4
Views: 2411

URL Encode

Something like this kind of works, but when there are escaped characters in the string, I get weird results: var theValue = "Hello World"; var args = new Array(); args[0] = "/usr/bin/python"; args[1] = "-c"; args[2] = "import urllib; print urllib.quote_plus('"...
by jskibbie
Wed Sep 04, 2013 9:09 pm
Forum: Scripting
Topic: URL Encode
Replies: 4
Views: 2411

URL Encode

I have a flow where I need to post data to a webservice. The variable data needs to be URLencoded in case there are characters that would otherwise break the URL. For example: "Hello World" would need to be converted to "Hello+World" or "Hello%20World" where the space c...
by jskibbie
Tue Mar 05, 2013 5:56 pm
Forum: Scripting
Topic: How to modify JDF XML file
Replies: 1
Views: 1704

How to modify JDF XML file

I have a JDF XML file that I'm going to be receiving in Switch. The goal of the automation will be to take that JDF file, modify it, and hand it off to a downstream device (in this case, Esko Automation Server). By modifying the JDF, I mean that I need to remove several nodes, and insert several new...
by jskibbie
Tue Jul 31, 2012 7:09 pm
Forum: Scripting
Topic: Call a webservice from switchscripter
Replies: 5
Views: 4271

Call a webservice from switchscripter

I am also struggling with the syntax for a SOAP request. I'm trying to connect to a proofHQ API (http://api.proofhq.com/home). The documentation says their entry point is "https://www.proofhq.com/soap". The WSDL is at https://www.proofhq.com/soap?wsdl I'm trying to perform the method named...