Jump to content
Server Maintenance This Week. ×

Using AppleScript to open a scriptwindow


This topic is 2460 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is it possible to use AppleScript to open the Script Workplace, select a particular script and even scroll to a particular line?

I looked through several AppleScript sources (there are not so many...) as well as the Dictionary of FIleMaker Pro Advanced 15, but all examples seem to deal with using the database (i.e. finding and manipulating records), not authoring.

Why would be handy? I have an authoring database where I can store the scripts and scriptsteps of a solution. These are converted from FIlemaker XML using the MBS plugin, not that complicated. Then it's possible to select the scriptsteps that need attention. But locating these scripts in the original solution is quite time consuming, so an AppleScript would save me tons of time.

 

 

Link to comment
Share on other sites

This would open up the Script Workspace, but that's as far as I got.

tell application "FileMaker Pro Advanced"

do menu menu item "Script Workspace..." of menu "Scripts"

end tell

Have you used QuicKeys before? That might be more suited to it. It can mimic both the keyboard and mouse.

You can:

  1. (Manually) copy the script name
  2. choose Scripts > Script Workspace...
  3. Then use the tab key to go to the Search field
  4. Then paste the script name from your clipboard

A Keyboard shortcut can perform the QuicKey shortcut, doing all the necessary steps.

Thoughts?

 

Link to comment
Share on other sites

AppleScript is a Macintosh Operating System application. Why use it for something that is built in FileMaker. i.e. the script step "Open Script Workspace", which will do what you want.

There a bunch of key combinations available in FileMaker. It is also possible to add or change them by using the Accessibility in the System Preferences

On 7/30/2017 at 1:40 AM, typewriter said:

AppleScript to open the Script Workplace

AFAIK, this isn't possible.

On 7/30/2017 at 1:40 AM, typewriter said:

These are converted from FIlemaker XML using the MBS plugin, not that complicated. Then it's possible to select the scriptsteps that need attention. But locating these scripts in the original solution is quite time consuming, so an AppleScript would save me tons of time.

Take a look at the Clip Manager available https://www.myfmbutler.com/en/products/clip-manager-for-mac/6

I use it for my archive of fields, scripts and custom functions. 

Lee

Link to comment
Share on other sites

Are you aware that in Version 16 it handles AS different? You need to go in to into the Accounts and Privileges and check the box Allow Apple Events.

Accounts and Privilages.png

  • Like 1
Link to comment
Share on other sites

9 hours ago, Lee Smith said:

I wished I had had your Profile Information before I answered you question. I probably would have not posted the AS part.

Oh well, that's my fault. I hadn't taken the time to update the profile. Thanks for the feedback.

I would be pleased to see additional authoring functions in FMPA17. Like the ability to open a particular script like I mentioned in my post. But displaying the ID's of layouts, scripts and fields in listings would also make life a little easier for people who need to take care of other developer's creations.

This consumes some screen real estate, but that that is no probem anymore.

By the way, the Open Script Workspace... command in combination with copy/paste works pretty well.

And for processing the FIleMaker XML, I'd recommend any developer to take a good look at the MBS plugin ...

Link to comment
Share on other sites

This topic is 2460 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.