Search found 358 matches

by Padawan
Tue Dec 12, 2023 1:28 pm
Forum: Switch
Topic: Job Submission via API - help please!!
Replies: 2
Views: 16834

Re: Job Submission via API - help please!!

I haven't done job submission to Switch myself, but looking at your code I see that you set the Content-Type and Content-Length headers. When working in nodejs I personally use a library to calculate these when I work in nodejs. From what I can find online you don't have to specify them when you wor...
by Padawan
Fri Nov 17, 2023 7:41 am
Forum: Flows
Topic: HTTP request (square brackets in JSON conflicts with Switch variables)
Replies: 6
Views: 12205

Re: HTTP request (square brackets in JSON conflicts with Switch variables)

You can escape square brackets in switch variables by duplicating the opening brackets. Can you try this? '{ "model": "gpt-4-1106-preview", "messages": [[ { "role": "user", "content": "Write a poem about flowers" } ], "temper...
by Padawan
Fri Oct 13, 2023 10:17 am
Forum: LEGACY scripting
Topic: Delay Indesign Saving a Document
Replies: 5
Views: 26170

Re: Delay Indesign Saving a Document

I have used the following line in the past for font activation with extensis

$.sleep(10000)
(Unit is milliseconds)

You might want to try freddys suggestion first, if it works it won't need delays.
by Padawan
Sun Sep 24, 2023 11:35 am
Forum: PitStop Server
Topic: Image compression
Replies: 2
Views: 3900

Re: Image compression

It can indeed change the image compression. You can change the behavior by adding the "Override default image recompression" action before the action which is changing the images.
by Padawan
Mon Sep 04, 2023 8:19 am
Forum: Switch
Topic: Number of pages of InDesign-file
Replies: 6
Views: 10539

Re: Number of pages of InDesign-file

You can lower the indesing saving time for all pages by lowering the preview resolution. But that may be a problem if you use the preview.
by Padawan
Tue Aug 29, 2023 1:20 pm
Forum: Switch
Topic: Number of pages of InDesign-file
Replies: 6
Views: 10539

Re: Number of pages of InDesign-file

I think there is page information in the XMP? This Switch variable gives the highest page number in my test: [Metadata.Integer:Path="xmp:PageInfo/*[last()]/xmpTPg:PageNumber"] In InDesign this is of course not always equal to the amout of pages since you can start a document with any page ...
by Padawan
Fri Aug 25, 2023 11:58 am
Forum: Switch
Topic: Script Expression
Replies: 1
Views: 3718

Re: Script Expression

See my reply here
viewtopic.php?t=4744
by Padawan
Fri Aug 25, 2023 11:57 am
Forum: LEGACY scripting
Topic: Error in script expression when using setPrivateData
Replies: 2
Views: 3797

Re: Error in script expression when using setPrivateData

Script expressions only have read access to the switch api.

If you want to set private data using a script expressions, then you can use the data mapper app. There you set the tag in the app and calculate the value using a script expression.
by Padawan
Thu Jun 29, 2023 12:04 pm
Forum: Node.js scripting
Topic: Database Values as NodeJS Parameters
Replies: 7
Views: 18629

Re: Database Values as NodeJS Parameters

Then I think the best option is to have some small reproducible sample and report it to Enfocus Support. Another workaround you could try: put the requesting of the property in a try catch, and if there is an exception, wait for 1 second or so and then request the property again. Even if the workaro...
by Padawan
Fri Jun 23, 2023 5:27 pm
Forum: PDF Creation
Topic: Adobe Preset
Replies: 8
Views: 20448

Re: Adobe Preset

Is it possible that you are on Windows and Illustrator was started manually (not by Switch)?

On windows InDesign/Illustrator/Photoshop need to be started by Switch, otherwise the the communication with Switch won't work.
by Padawan
Wed May 31, 2023 6:51 pm
Forum: Appstore
Topic: Problem with File Pool Cleanup
Replies: 8
Views: 10664

Re: Problem with File Pool Cleanup

Hi Jan, the weird thing is, I can only use the folder picker to set the path, I can't set the path inline. What am I missing? I think it should be possible to add the path Jan suggests in the windows folder picker dialog. If you still can't access the location this way, then I think it's best to ch...
by Padawan
Mon May 15, 2023 12:08 pm
Forum: Flows
Topic: Illustrator Package
Replies: 1
Views: 3341

Re: Illustrator Package

This is a list of Illustrator commands which you can use in scripting: https://ten-artai.com/illustrator-ccver-22-menu-commands-list As you can see, the package command is not in the list. It is necessary to do all the separate steps in scripting. So the script should get the list of links, place th...
by Padawan
Tue Apr 11, 2023 4:13 pm
Forum: Node.js scripting
Topic: Job.Createdatabase
Replies: 2
Views: 6659

Re: Job.Createdatabase

Is it possible that you are not using the latest version of Subflow? Version 4 introduced support for JSON datasets and should fix this.
by Padawan
Sat Mar 11, 2023 1:35 pm
Forum: Flows
Topic: Script doesn't work in InDesign configurator
Replies: 4
Views: 4383

Re: Script doesn't work in InDesign configurator

The rules to write adobe scripts in Switch are documented here:
https://www.enfocus.com/manuals/UserGui ... tions.html

I suspect the script will work if you find all references to

Code: Select all

app.documents[0] 
And replace it with

Code: Select all

$doc
by Padawan
Thu Mar 02, 2023 9:55 am
Forum: Applications
Topic: Pitstop Server Action List Multi-line Text With Variables Defined
Replies: 6
Views: 7013

Re: Pitstop Server Action List Multi-line Text With Variables Defined

To my knowledge, there are two ways you can reference it using variables:
- The name of the action list/preflight profile, without extension
- The full path to the action list/preflight profile, including extension