Skip to main content
NSi4.com
Participant
February 8, 2024
Answered

Difficulty Running .NET Core App in Background on macOS for InDesign Extension

  • February 8, 2024
  • 8 replies
  • 1757 views

Hello Adobe Developers community,

 

I’m encountering an issue with an InDesign extension that my team and I have developed. Our extension relies on a .NET Core application to handle HTTPS calls and IDML parsing. While this setup works smoothly on Windows, we’re facing challenges on macOS.

The problem arises because the script responsible for launching the .NET Core DLL waits for the command to finish, preventing it from running in the background. As a result, our extension on macOS isn’t functioning as intended.

 

Attempts Made:

  • We have tried launching the .NET Core DLL using AppleScript and the do shell script command, both with and without methods to run it in the background.

 

Request for Assistance:

We would greatly appreciate any insights, suggestions, or solutions from the community on how to effectively run the .NET Core app in the background on macOS to support our InDesign extension.

 

Additional Details:

  • Operating System: macOS
  • InDesign Version: 16.0, 17.0, 18.0
  • .NET Core Version: 3

 

Thank you in advance for your help and expertise!

This topic has been closed for replies.
Correct answer NSi4.com

1.
Is it possible to change the app in charge of processing with "ignoring application responses" or BridgeTalk to another app that is not InDesign? InDesign may be able to proceed at the expense of that app.

 

2.
> doScript and the shell script functions successfully when executed independently
What exactly would be the result of this? Will the DLL keep running and InDesign accept other operations?

 

3.
Can the principal-agent relationship between jsx and .NET Core apps be reversed? That is, the main process is .NET Core app, and jsx is executed from there.


Thank you again for your continued assistance.

 

To close this, what I did is to compile my .Net Core DLL for osx-x64, used Platypus to create a .app for macOS with no interface, and set it to run in the background without getting the focus from the app it's calling it.

 

These are the links that help someone to do that:

 https://www.xamboy.com/2020/05/28/net-core-application-macos-packaging-and-notarization

https://www.cnet.com/tech/computing/keep-applications-from-stealing-focus-when-opening-in-os-x

 

So now that I have an .app I select the file as you proposed and execute it.

 

Thanks again.

8 replies

Legend
February 8, 2024

In other words, if you could run do shell script without waiting for a response, would that solve the problem?

 

It might succeed if the following points are taken care of.

  1. Clearly specify the application to tell
  2. Place the tell block in a ignoring application responses block
ignoring application responses
	tell application id "com.adobe.InDesign"
		do shell script your_shell_script
	end tell
end ignoring

 

NSi4.com
NSi4.comAuthor
Participant
February 9, 2024

I tried this but my JSX script still waits for the dll to finish.

 

Attaching JSX (as a picture) and a screenshot when I run it.

As you can observe, InDesign is currently unresponsive. If I forcibly terminate the dotnet process responsible for running ja.dll, the script proceeds as expected, and I receive the 'Done' alert.

 

On Windows, my script initiates the execution of that dll, allowing it to remain active in memory for subsequent use whenever our extension necessitates its functionality.

Inspiring
February 8, 2024

need to update the Operating System:

macOS Monterey version 12.7.3 (running as a guest in VirtualBox, hosted in a Windows PC)