Search found 182 matches

by Padawan
Fri May 24, 2019 8:32 am
Forum: Switch
Topic: switch client doesn't found switch Server
Replies: 3
Views: 35

Re: switch client doesn't found switch Server

I think that legacy SwitchClient will continue to work for a while, but please note that it is not maintained anymore. It will not be supported on new systems and will receive no bug fixes. It might be a good idea to check the new webclient and if it suits your needs. This new webclient will receive...
by Padawan
Thu May 23, 2019 11:55 am
Forum: Switch
Topic: switch client doesn't found switch Server
Replies: 3
Views: 35

Re: switch client doesn't found switch Server

Can you try this?
- Open Switch preferences on the Internal Communication category
- Set Job Client type to legacy
- restart Switch

That should do it.

Is there a reason that you are still using the legacy SwitchClient instead of the new webclient?
by Padawan
Thu May 23, 2019 9:39 am
Forum: Scripting
Topic: Curl string syntax in 2018 r3
Replies: 3
Views: 52

Re: Curl string syntax in 2018 r3

I quickly adjusted a sample from the documentation to do this: function timerFired( s : Switch ) { var requestProps = {}; requestProps.date_time = "2019-05-21 10:56:08"; requestProps.order_id = "1234-1.1"; requestProps.type = "PRODUCTION_STARTED"; var theHTTP = new HTTP(); theHTTP.setAttachedFile( c...
by Padawan
Thu May 23, 2019 7:21 am
Forum: Scripting
Topic: Curl string syntax in 2018 r3
Replies: 3
Views: 52

Re: Curl string syntax in 2018 r3

Are you aware that you can do http requests directly in Switch scripting? This way you don't have the escape characters nightmare which you have when building a cli command with curl.

https://www.enfocus.com/manuals/Develop ... class.html
by Padawan
Mon May 20, 2019 12:12 pm
Forum: Scripting
Topic: Scope question from a newbie
Replies: 4
Views: 87

Re: Scope question from a newbie

Bens, ihanks! I had to pleasure to have good Jedi Masters :)


(BTW, does that make you Yoda?)
by Padawan
Sun May 19, 2019 12:00 pm
Forum: Scripting
Topic: Scope question from a newbie
Replies: 4
Views: 87

Re: Scope question from a newbie

When you are working with variables, then you have to declare and assign them. var b;// This is the creation (aka declaration) of the variable. It's location in the script defines in which scope the variable is declared b=5;// This is the assignment of the variable, this is the point where you put s...
by Padawan
Thu May 09, 2019 12:57 pm
Forum: PitStop Pro
Topic: how acrobat crop pdf permanently?
Replies: 1
Views: 136

Re: how acrobat crop pdf permanently?

You posted in the PitStop Pro forum, so I assume you mean crop the PDF using the PitStop Pro plugin within Acrobat. In PitStop Pro you can crop a PDF by moving the mediabox (and possibly others) of a PDF. There are some ways to do this: https://www.youtube.com/watch?v=OSerPumSGtI or https://www.enfo...
by Padawan
Thu May 09, 2019 12:51 pm
Forum: PitStop Server
Topic: PDF Review module / errors in preview
Replies: 2
Views: 156

Re: PDF Review module / errors in preview

This is currently not possible. Enfocus has hinted it will become available in a future version.
by Padawan
Thu May 09, 2019 12:47 pm
Forum: Switch
Topic: PitStop Preflight check in Switch with Single-line text with variables defined
Replies: 2
Views: 148

Re: PitStop Preflight check in Switch with Single-line text with variables defined

Using variables you can supply the preflight profile in two ways: - Full path, including extension - Just the name of the profile, without the extension (as displayed in the UI) You are supplying the path to the preflight profile, but not including the extension. If you use the following, then it sh...
by Padawan
Mon Apr 22, 2019 10:00 am
Forum: Scripting
Topic: RegEx replace in Script expression
Replies: 4
Views: 235

Re: RegEx replace in Script expression

Replace does work in Switch javascript, it is a method in the string class : https://www.enfocus.com/manuals/DeveloperGuide/SW/18/home.html#en-us/common/sw/reference/r_string.html I can't try myself now but I think your first script will work when you replace var newname = name.replace(pattern,$2); ...
by Padawan
Tue Apr 09, 2019 11:26 am
Forum: Scripting
Topic: Don't send Login and password in plain text within the url to web service?
Replies: 6
Views: 356

Re: Don't send Login and password in plain text within the url to web service?

From the documentation of the http class: user : String This property contains a user name if authentication is to be used. If authScheme is set to HTTP Basic Authentication, the user and password are Base64 encoded, and the result in the form "Basic [encoded-user-password]" is used for authorizatio...
by Padawan
Mon Apr 08, 2019 8:09 pm
Forum: Scripting
Topic: Don't send Login and password in plain text within the url to web service?
Replies: 6
Views: 356

Re: Don't send Login and password in plain text within the url to web service?

Can you replace

Code: Select all

	theHTTP.addParameter("username", apiUser);
	theHTTP.addParameter("password", apiPass);
with

Code: Select all

	theHTTP.user  = apiUser;
	theHTTP.password = apiPass;
This is the way to define username and password when using Basic Authentication, which you have configured.
by Padawan
Thu Apr 04, 2019 7:36 pm
Forum: Scripting
Topic: Get list of PDF-files from folder to populate drop-down
Replies: 9
Views: 2602

Re: Get list of PDF-files from folder to populate drop-down

Strange. Afaik I always return arrays for drop downs, I'll check again tomorrow.
by Padawan
Thu Apr 04, 2019 5:05 pm
Forum: Scripting
Topic: Get list of PDF-files from folder to populate drop-down
Replies: 9
Views: 2602

Re: Get list of PDF-files from folder to populate drop-down

I suspect that the datatype of your metadata property is text instead of dropdown. Can you check this?