Packaged Scripts with arguments?

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 14 years and 1 month 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
pengst
Posts: 9
Last visit: Thu Sep 04, 2014 10:56 pm

Packaged Scripts with arguments?

Post by pengst »

Hello!
When I package a form or a script to an exe-file:Is it possible to work with arguments?For example I start the exe with "script.exe -first -second".How can I work with the arguments in the script?Thanks, Paul
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaged Scripts with arguments?

Post by davidc »

Yes you can access command line arguments by using the $CommandLine variable. It will return the complete argument string passed to the executable, so you will need to parse it.

David
David
SAPIEN Technologies, Inc.
User avatar
pengst
Posts: 9
Last visit: Thu Sep 04, 2014 10:56 pm

Packaged Scripts with arguments?

Post by pengst »

That's great! Thanks.
I see the packager has a lot of additional functions. Is there a complete documentation with all variables an perhaps other things about the packager?Thanks, Paul
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaged Scripts with arguments?

Post by davidc »

We are working on updating the documentation. Since we add more and more to the packager as time progresses, the documentation tends to lag behind.
Sorry for any inconvenience,

David
David
SAPIEN Technologies, Inc.
User avatar
pengst
Posts: 9
Last visit: Thu Sep 04, 2014 10:56 pm

Packaged Scripts with arguments?

Post by pengst »

No problem. At the moment I'm happy with the $CommandLine and the $ConsoleOutput.
When in future there will be a documentation it would be great!Paul
User avatar
coreyhynes
Posts: 9
Last visit: Thu Nov 14, 2013 9:37 am

Packaged Scripts with arguments?

Post by coreyhynes »

Do you have an example of these, I've not been able to get them to work.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaged Scripts with arguments?

Post by davidc »

We currently don't have an example, but keep an eye on our blog.

What version of PrimalForms are currently running and what packager settings did you use?

Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaged Scripts with arguments?

Post by davidc »

We just posted a blog on how to use the command line arguments with script packages. The blog post also includes some functions that parse the arguments for you.

View the blog here: http://www.sapien.com/blog/2010/02/09/p ... arguments/

Daviddavidc2010-02-10 10:29:16
David
SAPIEN Technologies, Inc.
This topic is 14 years and 1 month 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.