Jump 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.

Featured Replies

Hi--

I have the following AS I'm trying to use in a script to download audio mp3's from my jott account. Here's what I have so far, under Send Event:

"set the target_URL to " & jotts::listenURL & "¶set the destination_file to " & ""'Macintosh HD/Users/jeffrey/Downloads/'"" & jotts::Title & "mp3"" & "¶tell application " & ""URL Access Scripting"" & "¶download target_URL to file destination_file replacing no" & "¶end tell"

I then specify the Application as Apple Script Utility.

But when I run this nothing happens.

I then tried to run the same thing in AS itself, using real url's instead of the fields, and I get an error saying "Bad name of file".

Does anyone know what I'm doing wrong here?

  • Author

I found that when using AS, you have to use :'s instead of /'s. I also added a calc field to add ID number of the file and ".mp3", for the filename, in the field specification to make the whole thing easier to read. So I've now fixed the script to read:

"set the target_URL to " & jotts::listenURL & "¶set the destination_file to " & ""Macintosh HD:Users:jeffrey:Downloads:jotts: & "" & jotts::addmp3 & "¶tell application " & ""URL Access Scripting"" & "¶download target_URL to file destination_file replacing no" & "¶end tell"

This results in the following:

set the target_URL to http://jott.com/JottAudio.ashx?id=somebunchofnumbers

set the destination_file to "Macintosh HD:Users:jeffrey:Downloads:jotts: & "somebunchofnumbers.mp3"

tell application "URL Access Scripting"

download target_URL to file destination_file replacing no

end tell

This still just opens AS Utility and does nothing.

  • Author

Ok. Got a little farther still.

So I decided to just run this as Perform AppleScript step.

So I pasted the same thing in as a calculated script:

"set the target_URL to " & jotts::listenURL & "¶set the destination_file to " & ""Macintosh HD:Users:jeffrey:Downloads:jotts: & "" & jotts::addmp3 & "¶tell application " & ""URL Access Scripting"" & "¶download target_URL to file destination_file replacing no" & "¶end tell"

So now I'm getting this:

A ":" can't go after this indentifier.

This occurs in the first use of a field:

jotts::listenURL

So now I'm really confused. There is a way to use a field in a script, yes?

  • Newbies

Are you using FileMaker Pro Advanced? If so, what does the AppleScript calculation look like in the Data Viewer? Does it look like the AppleScript in your original post?

  • Author

Ah, no it doesn't. I should have posted my solution.

The answer was to have the path be expressed with ":", which is what AS likes.

Hence, my finished as looks like this, and works perfectly:

"set the target_URL to "" & jotts::listenURL & ""¶set the destination_file to " & ""Macintosh HD:Users:jeffrey:Downloads:jotts:mp3s:" & jotts::addmp3 & "¶tell application " & ""URL Access Scripting"" & "¶download target_URL to file destination_file replacing no" & "¶end tell"

Where jotts::listenURL == "http://jott.com/JottAudio.ashx?id=" & jotts::ID

and jotts::addmp3 == jotts::IDShort & ".mp3""

The final result looks like this:


set the target_URL to "http://jott.com/JottAudio.ashx?id=somebunchofnumbers"

set the destination_file to "Macintosh HD:Users:jeffrey:Downloads:jotts:mp3s:somebunchofnumbers.mp3"

tell application "URL Access Scripting"

download target_URL to file destination_file replacing no

end tell

Create an account or sign in to comment

Important Information

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

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.