1. Richard Slapka
  2. Valentina Studio
  3. Sunday, March 01 2020, 08:15 PM
  4.  Subscribe via email
Hi,
here is what I would like to do, but not sure, if I can...
I have Mac with Valentina Studio v.10. I would like to create a form with a button on it. Clicking a button will run a script (AppleScript, Javascript) which will open Word document and fill some text parts with data from database. The point is, if I can even run any script from a form.

Thanks for any idea.

Richard
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Richard,

No, it is impossible to execute external applications from forms.
We will consider adding such functionality - running AppleScript, bash script, it would be helpful.
As a downside, this feature will not be available in the Mac App Store distribution of Valentina Studio.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
Richard Slapka Accepted Answer
Hi,

I can't believe this! :o I supposed, that every developers software supports scripting at these days. Even more, your product is over ten years on the market and nobody asked for this funcionality yet? ;)
Well, the thing is, I switched from Windows & MS Access to Apple and I was searching for similar product to MS Access. One of them was FileMaker, which has quite different philosophy. Valentina was the second, it was very similar to Access, it has forms, reports, but I didn't checked, if it supports scripting - I though, it is obvious :-)

Anyway - refer to your answer, how would you implement this feature? Any timeframe?

Thanks for you answer.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
Sergey Pashkov Accepted Answer
Hello Richard,

Forms were added two years ago, nobody asked for this functionality (executing external scripts) so far.
It should be available in the next build, no exact date yet (a few weeks, I suppose).
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
Richard Slapka Accepted Answer
This would be perfect! Few weeks are great!
How will I update my installation, if (as you wrote) it wouldn't be accessible from Apple Store?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 4
Sergey Pashkov Accepted Answer
Are you using Valentina Studio from the Mac App Store? Just to clarify, version 10 is not there yet, only on site.
Valentina Studio in the Mac App Store is limited by the macOS sandbox and using the AppleScript requires adding a security entitlement.
It may be harder to pass the app review with this entitlement, but we'll try.

Also, it is necessary to specify which applications we'll be sending messages to. What apps are you interested in? Only Word?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 5
Richard Slapka Accepted Answer
Yes, I have version 10.0.1, most probably downloaded form your site. I didn't know, there is a difference. Thanks for explanation.
I would definitely send data to Word, Mail app, Finder app, Contacts app, Calendar app, probably an Excel, and if it is possible to "MyDraw" or "draw.io". These last two are graphics programs (using them instead of MS Visio).
I am wondering, it has to be explicitely listed all programs, which might be considered for scripting? I though you would create some API, which will retrieve all available scriptable programs, with their classes, properties, etc. Similar to built-in Script Editor, which retrieves all available applications.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 6
Sergey Pashkov Accepted Answer
For the Mac App Store - yes, it is necessary to have such a list, here's the example:
https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AppSandboxTemporaryExceptionEntitlements.html

But for the non-MAS version, it is not required, at least for now.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 7
Sergey Pashkov Accepted Answer
Hello Richard,

The functionality necessary to run macOS automation scripts from forms was added in version 10.1.
On this page you can find a few examples on how to use it:
References
  1. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:form_editor:launch_app#applescript
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 8
Richard Slapka Accepted Answer
Hi Sergej, you made a great job! Great appreciation! :D
Thank you, guys!
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 9
Lynn Fredricks Accepted Answer
Hi Sergej, you made a great job! Great appreciation! :D
Thank you, guys!


Hi Richard,

When you have the chance, we'd like your feedback on this new feature and also if you'd share any applications of it you might be willing.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 10
Richard Slapka Accepted Answer
Hi, once I make some working form, will share it. For the very first moment, yes, it works. Just a note - in an example how to open a Word document there is a typo. You used these ' parenthesis instead of this `
`tell application "Microsoft Word"
activate
make new document
end tell'
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 11
Sergey Pashkov Accepted Answer
Hello Richard,

Yes, fixed it, thank you!
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 12
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.