Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with scripting action needed

Featured Replies

I have a very limited experience with AppleScript and need your help.

In my (chemical) Compounds.fp7 file, I have a FM script which copies the content of a container field, Structure (picture), and calls, via AppleScript, another app, CS ChemDraw Ultra, to perform calculations on the Structure. The result of the calculation (e.g. Molecular Formula in the example below) returns into an another field (MolFormula) of Compounds.fp7. For example, if the Structure field contains benzene structure (a sort of hexagon, you remember?), the MolFormula field will be populated with "C6H6" etc.

tell application "CS ChemDraw Ultra"

activate

open file "Macintosh HD:Users:mse:Documents:FileMaker:Matrix2:Template"

if enabled of menu item "Paste" then

do menu item "Paste"

set theMolformula to Molecular Formula of selection

end if

quit saving no

end tell

tell application "FileMaker Developer"

activate

set cell "MolFormula" of current record to theMolformula

end tell

CS ChemDraw Ultra can also generate correct chemical name from structure (menu item "Convert Structure to Name"). However, in this case the situation is different: to generate names CS ChemDraw Ultra calls an external modul (so, - do menu item "Convert Structure to Name" - is inevitable) and the result returned is the structure and its name selected together. By clicking ChemDraw window outside the selection, it is possible to separate them manually to the structure and the text. The text can next be selected and transfered to FMP file.

Question: Is it possible to script this process of separation/selection? With a tiny hope for success, I am attaching for your kind attention the CS ChemDraw Ultra (AppleScript) Dictionary.

Thank you in advance for your time and consideration confused.gif

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.