How to create dual (Console, Form) packaged project

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Heinrich
Posts: 1
Last visit: Sun Mar 03, 2024 6:42 am

How to create dual (Console, Form) packaged project

Post by Heinrich »

Hello,

I want to create a packaged tool which, if called with no parameter, displays a form.
But i also want to support a kind of automation: If i call the project with f.e. -nogui Parameter, no form will open. In this case output should go to console.
Is this possible?
It is not about the Parameters, it is about Console Output with Packager.

Thanks in advance,
Heinrich

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Studio 5.8.207
Operating system: Win10 21h01
PowerShell version(s): V5 64bit

*** Please add details and screenshots as needed below. ***

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: How to create dual (Console, Form) packaged project

Post by Alexander Riedel »

A Windows application has no console. Well, at least not by default. There is an API to create one and attach one, but that would be complicated and cumbersome to do with PowerShell.
A console application can display a form, but the you always get a console behind it somewhere. If you don't mind, that's the way to go.
But for simplicities sake, I would split this up. Create a silent starter app that, based on parameters (or the absence thereof) starts either the form application or the command line tool.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.