FastScripts 3.0 Sneak Peek

Hi Fredrik - interesting idea! It’s probably also in the “someday maybe” realm but I’ll keep in mind the idea of other triggers. I tend to think that Keyboard Maestro is better suited for the use cases where a wide variety of triggers is desired.

Fair enough. One note on display message…

If messages overlap in timing, it would be nice if the new message would first destroy/hide the old one. Though I am tempted to repeat the same message in all 9 display positions if I really wanted to get the user’s attention. :slight_smile:

So far, my scripts are running well in v3.0b29.

Glad to hear things are working well so far! As far as the messages go, the new message should always overlay the old one if it’s there. I think longer term it might be better if the app treats each of the screen locations as a separate “queue” kind of like the way macOS system notifications appear in a column and you can dismiss them individually.

I have had a few great bug reports and will have a b30 update to share soon.

I remember, long before smart devices with touchscreen. I use wacom tablet to
execute commands. I could draw shapes on tablet and different commands was executed. Apple’s trackpad is very useful device and doing click + drag with 3 fingers is not default setting. Maybe its possible to use modified key + draw shape on trackpad to execute shortcuts. (commands) :slight_smile:

ex.

command + draw (c shape on trackpad) = current application :slight_smile:

ex.

In Autodesk Maya they use hotbox, https://github.com/luckylyk/hotbox_designer
UI interface to execute commands.

Only ideas… :slight_smile:

Thanks to everybody who has taken time to give the FastScripts beta a try. Here is an update that addresses several issues noted by folks from this forum, and some other fixes:

https://red-sweater.com/fastscripts/FastScripts3.0b30.zip

Here’s the complete list of changes:

  • Restore support for loading 3rd party script libraries from scripts
  • Fix a bug that prevented some dialogs presented by scripts from being activated when run
  • Added various niceties to the script running process that were previously only in FastScripts itself
  • Enable symlink support in script trees by default
  • Work around a bug in which an asynchronous request kicked off by a script might not have time to complete because the script runner task quits

There are a couple finishing touches I am already planning on doing, including:

Improve performance of repeatedly invoked scripts
Provide a mechanism for canceling running scripts to avoid runaway scripts

Please continue to let me know if there is anything substantially misbheaving or missing from the app. I will probably open the beta to a wider pool soon, and hope to finish up and ship the app to the general public later this month.

1 Like

I’m seeing one issue with 30.0b30. I’m running macOS 10.15.7 with a MBP hooked up to a larger screen, not mirrored. Large screen is positioned above the laptop screen. On the laptop screen, I can see the FastScripts menu icon as if it is enabled, but clicking on it does nothing. There are other third-party icons next to it, such as Adobe Creative Cloud. They all respond.

The FastScripts icon behaves as expected on top on the external monitor. But regardless of which monitor is “active” with a foreground application, the FastScripts icon on the laptop screen will not respond.

Hi Daniel,

Regarding FS scriptability, it would be great to have a command that returns the entire list of scripts, respecting hierarchy on disk.

:wink:

Thank you Ray, I don’t have a multi-monitor setup but I’m going to see if I can reproduce this by setting up my iPad as an external display. I’ll let you know what I Find!

Hi @ionah - FastScripts’s hierarchy is scriptable, though just looking at it now I see I missed one item when renaming the “script library” terms to “script collection” (to avoid confusion with AppleScript script libraries).

Currently you can access the top level node of the hierarchy by asking FastScripts for its “top level script libraries” … this will continue to work in future updates but I’ll change the name to “top level script collections”.

Every “script collection” in FastScripts reprsents a folder/container node in the hierarchy, which can contain “script items” which are the scripts at that level, and “script collections” which are the subfolders, effectively, at that level.

With these commands you should be able to obtain a hierarhical list of all the scripts FastScripts knows about. Let me know how it goes!

Hi @redsweater,

 tell application id "com.red-sweater.FastScripts" -- FastScripts
	script libraries of script library "Finder" of script library "Applications" of top level script library 1
end tell

With this line of code here is what I’m getting:
capture 003

And here is the folder contents:
capture 002

A command like all script items of script library "Finder" of script library "Applications" of top level script library 1 would be more efficient.
It should return a list or a record containing every property of a script item.
With a particularity for the shortcut: an empty string when it’s missing so we can make predicates without the need to loop on every item.

Thanks @ionah - do I understand you currently that you mean you wish the command returned AppleScript structs instead of a reference to items? I have to admit I’m a little foggy on how I wojld change the scripting implementation to achieve this. If anybody else reading has advice for how to make this support more canonical, I’m interested to hear it. Thanks!

Exactly.

The ones I’m thinking about are a bit busy these days…
:wink:

Last I looked, how to a vanilla record wasn’t at all obvious.

1 Like

@ShaneStanley,
Sad to hear this.

@redsweater
In this case, my request has to be changed:
When building the list of all scripts in a library, if a script has been added in the corresponding Finder folder after the last time the FS menu was triggered, the command invoke will fail saying the script item is missing. It it possible to fix this?

Thanks @ionah - could you clarify a little what you mean by the new requests? How are you getting a reference to the newly added script if FastScripts doesn’t list it as a script item? Is there a simple example of script code that doesn’t work the way you expect, that I can use to test with? Thanks!

@redsweater

1-make a duplicate of any script in the Finder
2-don’t use FS menu
3-run this snippet from your script editor:

tell application id "com.red-sweater.FastScripts"
	invoke script item "Your duplicate script's name" of script library "Some sub-folder if any" of script library "Some App" of script library "Applications" of top level script library 1
end tell

4-you should get an error -1728 (unable to get script item…/…)
5-now click on the FS icon in the menu bar to open the menu
6-don’t run the script from there
7-run the above script from your script editor: it should run well.

Thank you for the details! I will make a note of this and try to get it fixed for the next beta update. I think I can arrange for the same “just in time” updates to the hierarchy that happen when you click the menu or use a keyboard shortcut, to happen when invoking via script, too.

Hey folks - getting pretty close to a public beta (casting a wider net than this forum). I really appreciate all the early feedback. I’ve just updated the beta to 3.0b31 which includes a substantial overhaul to the way I handle triggering scripts from keystrokes. I am now getting back to the “roots” of FastScripts, trying to make response time as quick as possible. To that end I’m reusing script runner processes to avoid the overhead of launching a separate process every time you invoke a script. Should be a noticeably better experience especially for quick, repetitive script operations.

You can download 3.0b31 here by selecting “Check for Update” from the FastScripts 3 beta, or by downloading directly here:

https://redsweater.com/fastscripts/FastScripts3.0b31.zip

Thanks again!
Daniel

Sounds good. Any chance of a command to quit the process so the next run script launches a new one? I’m thinking in terms of flushing cached libraries and frameworks, as well as cleaning up from ASObjC’s tendency to leak memory like a sieve.

I’ll definitely consider that, but bear in mind that quitting FastScripts and relaunching it will cause all the associate script running processes to be terminated and recreated. I think what I’ll probably end up doing is trying to fairly aggressively “age out” the script runners so that there is always one available, but maybe they only run a few scripts before they get terminated and a fresh one takes its place.