Jump to content

Script Workspace Secrets and Tips


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

Recommended Posts

[Content moved by OP from "FileMaker 14 Script Workspace" forum]

Man alive, how long have FM developers pined for something like this!!!

One thing about the Script Workspace is that it continues to reveal its secrets the more you work with it.  Here are a few tips that make scripting faster and more fun to boot:

1.  How do you insert a Comment line?  The obvious way, of course, is to type a hash (aka "number/pound/octothorp") sign (simultaneous right pinky on the Shift key — left middle finger on the 3, or some equivalent thereof on other keyboard layouts), then type your comment.  But try this instead:  Hit Space, followed by Return, then comment away.  (Space drops down a list of all available steps, with # at the top, pre-selected as the default.)  If you're at all dexterously challenged, this might be the easier way, and is my favorite discovery so far!

2.  It's not just the obvious initialisms that are supported (GTRR, PSOS, etc.), but every single command can be entered by typing its initials:  afb gets you "Allow Formatting Bar," sec gets you "Set Error Capture," and so on down the list.

3.  You know that you want to insert some sort of window adjustment step, but can't remember which one (Adjust Window? Move/Resize Window? Make Window Go Away?) or the exact name of the command?  Type "window" — even just "w" will do — and you'll get the list of script steps with "window" in them as autocomplete suggestions.  You don't have to type from that actual start of the desired step for autocomplete to work; it'll work with any word in the command.

4.  It's a bit hidden, but you can edit the syntax-highlighting colors if you don't like the defaults.  Find it under "View > Syntax Coloring…" when you're in the Script Workspace.  That's right, now you can kill hours each day tweaking the colors to your heart's content.  It's an OCD dream come true!

5.  While we've always been able to run a script directly from the Manage Scripts window — or was it from the Edit Script window?  how fast I forget — it's now possible to simultaneously open the script debugger and run a selected script all via a single button in the Script Workspace window.

6.  Scripts remain backward and forward compatible with previous versions.  Specifically, blank lines added in the FM14 Script Workspace simply become empty comment lines when opened in 13 or earlier.  (And while I'm at it, hooray for blanks lines!)  But, perhaps even cooler, all those empty comment lines you've previously added to your scripts to space things out are displayed as blank lines when opened in 14!

BTW, I see that Martha Zinc has posted a nice intro video on the new Script Workspace among the "Unboxing FileMaker 14" videos over at the Soliant site. Check it out!

Got other tips you've discovered?  Post 'em here.

Mark

  • Like 3
Link to comment
Share on other sites

Important to know: deactivate script step(s) inside a script now to be found in top Menu 'Edit' - deactivate

or simple shortcut:

cmd AND  " / "   (slash)

Edited by B.Fehr
  • Like 1
Link to comment
Share on other sites

One thing that's not really documented, but that you pick up on after a bit of time spent in the workspace, is how scripts open in tabs. Specifically, just clicking once on a script name in the sidebar will open it in its own tab in a somewhat transient fashion.  If you then single-click on a different script name, that one will replace the first one in that same tab, and so on.  This is nice when you just want to quickly review a script or perhaps peruse multiple scripts in serial fashion, as you don't have to keep closing tabs explicitly.  

To open a script in a somewhat more persistent manner, in its own dedicated tab, double-click its name in the sidebar.  Then it will neither replace any other open tab, nor will it be replaced by opening another script. A script so opened has to be explicitly closed by closing the tab (saving or discarding any changes, of course).  So, to open multiple scripts in separate tabs, remember to double-click their names.  (Editing a script that's been opened in the first, temporary manner will also make the tab into a persistent one.)

Link to comment
Share on other sites

Oh, I almost forgot this one, but it's a really nice feature:

You can close the Script Workspace with any number of open tabs (edits must be saved, however), then reopen it later, and all of the same scripts/tabs will still be open.  In fact, you can close your file . . . quit FileMaker . . . go on a 6-month cruise . . . and when you return and reopen the file, Script Workspace will still remember which scripts were last open in which tabs.  Cool or what?!

I like to leverage this feature to keep several utility scripts open more or less permanently.  For example, following FileMakerStandards.org practices, I use a "Changelog" script to document file change history; having it always open right there in my Script Workspace encourages me to actually use it and not get lazy about documentation.  I also tend to keep a script with snippets open as well.

This was a pleasant discovery; kudos to the development team for thinking of this!

Mark

Link to comment
Share on other sites

  • 2 weeks later...

Just started using it, and have a few questions/comments:

  • Is there a keyboard command which drops you into the sub-editor for a particular script step (e.g. clicks the little gear icon on the right)?   Double-click does not work, and the obvious keyboard commands (Enter, Command-Enter, Return, Command-Downarrow) etc don't work.
  • Determining which script is in the Menu is now hidden, you have to say View/Show Scripts Menu Management to see the checkboxes.  Unfortunately, new scripts still default to having that checkbox checked, which I dislike.
  • Copy & Paste: i copied and pasted a block of scripts from FM14 to FM13 and it worked: that was nice.

 

 

 

Edited by xochi
typos
Link to comment
Share on other sites

  • 3 weeks later...

Can you search in a script yet? That would be nice!

​Not currently, Bailey.  You can filter the scripts list in the left sidebar, or the steps list in the right pane, but no search (or search-and-replace) in the script itself.  I wouldn't be surprised to see that show up in the future; the potential utility (especially with the "-and-replace" part!) is obvious.  They've taken pains to point out in user group meetings that this is just v. 1.0, and that they focused on what they thought would give the biggest bang for the buck.

  • Like 1
Link to comment
Share on other sites

  • Newbies

Oh how I wish there was a way to change the font (especially the font *size*)! Now that the script editor is at least a little more like a text editor it feels like it should be supported -- in fact, why not just add it to the syntax coloring dialog?

And while we're at it, would be nice to be able to tweak the font in calculation dialogs too.

Sadly, my eye's aren't what they used to be ;-)

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Can you search in a script yet? That would be nice!

currently I print script to PDF  ( mac, 'open in preview') and search the PDF.  No line numbers but helpful at times.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

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