August 4, 200421 yr 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?
August 7, 200421 yr 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
August 26, 200421 yr 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?
August 27, 200421 yr 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.
August 27, 200421 yr 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.
August 27, 200421 yr 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
August 30, 200421 yr Thank you so much, Fenton. You saved me hours of banging my head against the wall.
Create an account or sign in to comment