Search found 364 matches
- Fri Dec 06, 2024 8:32 am
- Forum: Switch
- Topic: [Bug] logger fails to log message with %
- Replies: 1
- Views: 11075
Re: [Bug] logger fails to log message with %
The % signs are intended to be used as placeholders for variables. This is mainly used to do logging in different languages. You can find more information on the intended behavior in the documentation: https://www.enfocus.com/manuals/DeveloperGuide/SW/24.1/home.html#en-us/common/swscr/reference/re_s...
- Fri Oct 04, 2024 9:54 am
- Forum: Switch
- Topic: Running Powershell scripts
- Replies: 7
- Views: 19120
Re: Running Powershell scripts
If you wish to run a powershell script from Run Command in Powershell mode, then you have to build it in the same way as you would when starting a powershell script from another powershell script. Meaning that you have to place a "&" before the path to the script to be executed. & ...
- Sun Sep 08, 2024 10:52 am
- Forum: Flows
- Topic: Private Data in XML Request
- Replies: 8
- Views: 12985
Re: Private Data in XML Request
If I'm not mistaken you can escape Switch variables by duplicating the opening bracket.
By example
is seen as
in a single line text with variables
By example
Code: Select all
[[test]
Code: Select all
[test]
- Sat Aug 17, 2024 2:29 pm
- Forum: Node.js scripting
- Topic: Usign xpath trough script
- Replies: 1
- Views: 15623
Re: Usign xpath trough script
You cannot use modules in script expressions which are not included in Nodejs itself. The correct way to read xml files is to use the native Switch modules, you can find more information in the documentation: https://www.enfocus.com/manuals/DeveloperGuide/SW/22.1/home.html#en-us/common/swscr/referen...
- Mon Aug 12, 2024 8:26 am
- Forum: LEGACY scripting
- Topic: pdfgrep - Execute command result as Private data
- Replies: 2
- Views: 16905
Re: pdfgrep - Execute command result as Private data
Execute command can save the stdout to a dataset, but not to private data. It also does not use a shell, so piping and redirecting doesn't work without an intermediate shell file. If you use the free app Run command, then you can save to private data and you can use redirecting and piping. That will...
- Wed Jul 03, 2024 3:05 pm
- Forum: Appstore
- Topic: Failed to connect to the Enfocus Appstore
- Replies: 6
- Views: 17133
Re: Failed to connect to the Enfocus Appstore
Enfocus reported to me it is fixed now
- Tue Dec 12, 2023 1:28 pm
- Forum: Switch
- Topic: Job Submission via API - help please!!
- Replies: 2
- Views: 31084
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...
- Fri Nov 17, 2023 7:41 am
- Forum: Flows
- Topic: HTTP request (square brackets in JSON conflicts with Switch variables)
- Replies: 6
- Views: 28499
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...
- Fri Oct 13, 2023 10:17 am
- Forum: LEGACY scripting
- Topic: Delay Indesign Saving a Document
- Replies: 5
- Views: 54406
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.
$.sleep(10000)
(Unit is milliseconds)
You might want to try freddys suggestion first, if it works it won't need delays.
- Sun Sep 24, 2023 11:35 am
- Forum: PitStop Server
- Topic: Image compression
- Replies: 2
- Views: 13176
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.
- Mon Sep 04, 2023 8:19 am
- Forum: Switch
- Topic: Number of pages of InDesign-file
- Replies: 6
- Views: 22296
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.
- Tue Aug 29, 2023 1:20 pm
- Forum: Switch
- Topic: Number of pages of InDesign-file
- Replies: 6
- Views: 22296
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 ...
- Fri Aug 25, 2023 11:58 am
- Forum: Switch
- Topic: Script Expression
- Replies: 1
- Views: 9869
Re: Script Expression
See my reply here
viewtopic.php?t=4744
viewtopic.php?t=4744
- Fri Aug 25, 2023 11:57 am
- Forum: LEGACY scripting
- Topic: Error in script expression when using setPrivateData
- Replies: 2
- Views: 19128
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.
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.
- Thu Jun 29, 2023 12:04 pm
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 33138
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...