wplate Posted August 4, 2004 Posted August 4, 2004 Here is a snippet of my calculation contained in the Open Script command... "&city=Somerville&state=MA&country=United States" it goes to the browser as "&city=somerville&state=ma&country=united states" I wish to preserve the text case as the user types it. How?
wplate Posted August 7, 2004 Author Posted August 7, 2004 I meant "Open URL" not Open Script. Anyone have an idea for this one?
Fenton Posted August 7, 2004 Posted August 7, 2004 AppleScript preserves the case. It's a little tricky, because it uses the "open location" command, which FileMaker doesn't support; neither does the Finder. But this works (someone else came up with "loginwindow" idea). OS X only. set theURL to cell "theURL" tell application "loginwindow" to open location theURL
mschummer Posted August 26, 2004 Posted August 26, 2004 Thank you, Fenton, for the tip. How do you make this line work? set theURL to cell "theURL" I have replaced "theURL" with the address of the calculation field that holds the URL. This address was in the form of Table::FieldName. It didn't work. Do I have to specify the database as well? Or is there another way to specify a cell?
Fenton Posted August 27, 2004 Posted August 27, 2004 If it's a related field you either have to use syntax that allows AppleScript to get the related field into a variable first, or go to a layout of the related table (where the field is native), or put the related field on the current layout (can be hidden). But the simple Table Occurrence Name::Field Name (it's not necessarily the table name) won't work if the field's not on the layout. That's probably what's wrong.
mschummer Posted August 27, 2004 Posted August 27, 2004 Thank you. Just putting the field on the layout did the trick. However, the "cell" always refers to the first record and not the currently selected one. Would you know if there is a way to specify that the selected record be chosen instead? Otherwise I would have to resort to creating a new layout displaying only the record of choice which is extremely cumbersome given the large number of URL calls I make.
Fenton Posted August 27, 2004 Posted August 27, 2004 Oops. I was only paying attention to the Open part. This assumes you're on the right layout, and the related field is on it. tell current record of window 1 set theURL to cell "TO::theURL" end tell tell application "loginwindow" to open location theURL
mschummer Posted August 30, 2004 Posted August 30, 2004 Thank you so much, Fenton. You saved me hours of banging my head against the wall.
Recommended Posts
This topic is 7651 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 accountSign in
Already have an account? Sign in here.
Sign In Now