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.

FM calling a VBScript instead of AppleScript

Featured Replies

  • Newbies

Hi, I have a FileMaker 6 solution on the Mac that exports a large number of htm files via xsl/xml export. I have created an AppleScript called by FM that changes the name of the files as it exports. This is below and it works very well. However, now I am migrating to a Window computer. Everything works, except of course for the AppleScript. Does anyone know how I can do what the AppleScript script does below but using VB (assuming that VB is what I should use)? I guess I need some who knows VB and perhaps enough to AppleScript to understand below.

copy cell "NZSCO99_5_ID" of current record to htmName

tell application "Finder"

set name of file "Macintosh HD:Documents:Ben:Work:Websites:Labour Market:Holder:1.htm" to htmName & ".htm"

end tell

Also I use 'Perform AppleScript' in FM scripting to call the AppleScript - do I use 'Perform Script' to call a VBScript on a Windows computer?

FM can't natively execute VBScript. You have 2 choices:

- either keep the VBscript external and when you execute it, pass the necessary variables on (htmName)

- or generate the syntax through scripted substitutes (placing the value of the NZS field directly in the VBscript). But then you need to create a physical VBscript so you can execute it. This can be a bit of a challenge in 6 without a file plugin.

I've written a couple of articles for FileMaker Advisor on this subject, you might want to check them out first.

The VBscript itself is very simple:

Set fs = CreateObject("Scripting.FileSystemObject")

fs.MoveFile "c:folderfile.htm", "c:foldernewName.htm"

Set fs = Nothing

The challenge is in creating the syntax *with* your variables, create the physical VBscript and execute it.

  • Author
  • Newbies

Thanks Wim. What are the names of the articles you suggest I read?

My first thought is that this is not going to be as simple as using AppleScript with FM to export and rename multiple files.

There is another alternative...use WinBatch, which more than replaces Applescript on the Windows platform. It has really extensive file and folder manipulation capabilities and is very easy to use. It can also issue VB commands through its Control and ODBC extenders. web page

Steve

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.