1. Richard Slapka
  2. Valentina Studio
  3. Воскресенье, Март 01 2020, 08:15 PM
  4.  Подписаться через 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
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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.
Комментарий
There are no comments made yet.
Richard Slapka Ответ принят
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.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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).
Комментарий
There are no comments made yet.
Richard Slapka Ответ принят
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?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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?
Комментарий
There are no comments made yet.
Richard Slapka Ответ принят
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.
Вложения
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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:
Ссылки
  1. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:form_editor:launch_app#applescript
Комментарий
There are no comments made yet.
Richard Slapka Ответ принят
Hi Sergej, you made a great job! Great appreciation! :D
Thank you, guys!
Комментарий
There are no comments made yet.
Lynn Fredricks Ответ принят
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.
Комментарий
There are no comments made yet.
Richard Slapka Ответ принят
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'
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Richard,

Yes, fixed it, thank you!
Комментарий
There are no comments made yet.
  • Страница :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories