Jump to content

AppleScript Help


dalenis
 Share

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

Recommended Posts

  • Newbies

Hi all,

I'm having a bit of a problem here with getting data into the correct DataBase. I have two DataBase Files open and I'm using the script below which states to use this DataBase "weather.fp5" but for some reason if the second DataBase is the front most window it tries to use that one.

Any thoughts or work arounds?

tell application "FileMaker"

activate

try

activate database "Macintosh HD:Users:dalejmartin:Desktop:weather.fp5"

on error

open "Macintosh HD:Users:dalejmartin:Desktop:weather.fp5"

end try

set theRecord to create new record

try

Thanks,

Dale

Edited by Guest
Link to comment
Share on other sites

I'm using Filemaker Developer 7.

This works for me with multiple databases open

tell application "FileMaker Developer"

tell document "YourDatabaseFileNameHere"

tell layout "YourReferencedLayoutNameHere"

set therecord to create new record

end tell

end tell

end tell

Edited by Guest
Link to comment
Share on other sites

Hi all,

I'm having a bit of a problem here with getting data into the correct DataBase. I have two DataBase Files open and I'm using the script below which states to use this DataBase "weather.fp5" but for some reason if the second DataBase is the front most window it tries to use that one.

No workarounds required, but you do need to write your script properly. There is no "activate database" command. You need to use "go to window". If the correct file is not open you can use open database to open the file.

tell application "FileMaker"

activate

try

go to window "weather.fp5"

on error

open "Macintosh HD:Users:dalejmartin:Desktop:weather.fp5"

end try

set theRecord to create new record

Edited by Guest
Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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