Using Filemaker fields in Apple Script
Hello,
I need help for getting the textof a textfield and the phonnumber of a filemaker file into the following AS
tell application "BluePhoneElite 2"
-- send using any available (in-range) device
-- a device can also be specified by name or bluetooth address
send message theSMSText to theRecipient ¬
using the first device whose available is true
end tell
thanks
g.g.
I have a similar problem trying to get data from any field into an AppleScript variable.
Something like *set phoneNumber to cell "Phone Number" of current record* works fine if you are using the script from a layout that has this field on it.
But I have a lot of fields on different layouts and I want to have access to all fields in the table, no matter what layout they are on, or what layout is currently active.
And I want to do this without having to specify on what layout each field is located.
In the past (FileMaker 6) I used something like *set phoneNumber to (cell "Phone Number" of current record of database 1)* but this is no longer working in FileMaker 9.
So I was thinking to use something like *set phoneNumber to cell "Phone Number" of current record of table "Table Name"* but that doesn't seem to work.
The only thing that seems to work is *set phoneNumber to cell "Phone Number" of current record of layout "Layout Name"* but as I said, I don't want to specify the layout for each field.
Any ideas anyone?
Message was edited by: khasmir
Similar Messages
-
Using c++ variable in apple script
Hi all,
I am just calling the apple script from my indesign plugin.
I need to pass the c++ variable to apple script for opening a file
This in my apple Script which i have embedded in c++ code
tell application "TextEdit"
activate
open "Users:User1:Library:Preferences:Adobe Indesign:Version 5.0:MathEQ.txt"
end tell
The filepath "Users:User1:Library:Preferences:Adobe Indesign:Version 5.0:MathEQ.txt" is stored in the C++ variable char* textFileName.
I need to use the variable textFileName in apple script which has the path.
How to go about it?
Thanks
SakthiI have a similar problem trying to get data from any field into an AppleScript variable.
Something like *set phoneNumber to cell "Phone Number" of current record* works fine if you are using the script from a layout that has this field on it.
But I have a lot of fields on different layouts and I want to have access to all fields in the table, no matter what layout they are on, or what layout is currently active.
And I want to do this without having to specify on what layout each field is located.
In the past (FileMaker 6) I used something like *set phoneNumber to (cell "Phone Number" of current record of database 1)* but this is no longer working in FileMaker 9.
So I was thinking to use something like *set phoneNumber to cell "Phone Number" of current record of table "Table Name"* but that doesn't seem to work.
The only thing that seems to work is *set phoneNumber to cell "Phone Number" of current record of layout "Layout Name"* but as I said, I don't want to specify the layout for each field.
Any ideas anyone?
Message was edited by: khasmir -
Hi all,
I am trying to add content of field (Tax VAT) in sap script and put into another symbol using following command
/:SUMMING program symbol INTO sum symbol
but after running me22n tcode to display the PO error occured
<b>Overwriting a protected field</b>Error analysis
The program tried to assign a new value to the field "<SM_SUM>" even though
it is protected against changes.
I am modifying medruck std PO script and using standard prog. for it i.e. SAPFM06P.
Please tell me wheather it is necessary to make sum symbol dynamically define in SAPFM06P and how to do this.
with regards
Rajvinder SahniHi...
If you need to summ numbers or do any operation, in your SAP Script you can call subritunes and do all the operations you need.
On your SAP script write:
/: PERFORM subrutine IN PROGRAM Zprogram
/: USING &PAR1&
/: CHANGING &PAR2&
/: ENDPERFORM
PS: You can use as many USING AND CHANGING as you need.
And the zprogram goes;
FORM subrutine TABLES t_in STRUCTURE itcsy
t_out STRUCTURE itcsy.
data: par1 type n.
Read the value on PAR1
READ TABLE t_in WITH KEY 'PAR1'.
CHECK sy-subrc = 0.
PAR1 = t_IN-value.
DO WHATEVER YOU NEED TO DO
ADD 1 TO PAR1.
SEND THE VALUES BACK
READ TABLE t_OUT WITH KEY 'PAR2'.
t_sal-value = PAR1 .
MODIFY t_OUT INDEX sy-tabix.
ENDFORM.
Hope this helps,
Gabriel -
Help with moving contact info using Apple Script in Address Book
Hi folks,
I wonder if someone can help? I imported a few hundred contacts via a Gmail created vCard into my Address Book. The problem is that instead of inserting the email addresses into one of the email fields for each record, it has inserted the email address into the Notes field as follows: "EmailAddress: [email protected]".
I would like help to write an Apple Script that will search my contacts in Address Book, find those with "EmailAddress:" in the notes field, cut the email address that follows it, and pastes it into the Work Email field, carries out the operation for the whole address book and saves the changes.
Can anyone help me write a script for this. I've not used Apple Script before so this will be my first attempt!
Thanks in advance,
ayworldThis should work:
tell application "Contacts"
activate
set thePeople to every person whose note contains "EmailAddress:"
set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
repeat with thePerson in thePeople
set nn to thePerson's note
make new email at end of emails of thePerson with properties {label:"Notes", value:text item 2 of nn}
end repeat
save
end tell
It will leave the entry in notes and make the label of the new email 'Notes"
Normally when I post an AppleScript like this I tell the user to test it out before using it on the actual data but in this case I don;t know how you'd do that given there is only one Contacts and only one Contacts database.
Just make sure you have a backup just in case. I tried it here on some dummy entries in my Contacts and it worked OK.
Again this totaly relies on the data you presented. The Notes field has to be in the format
EmailAddress:[email protected]
for this to work.
regards
Message was edited by: Frank Caggiano - If you select all the text in the box, then right click and select Make new AppleScript the script will open in the AppleScript editor. Just make sure you get all the text it is easy to drop the first or last char when selecting. -
Sending email using apple script...
I have created a watch folder using apple script that when a file is dropped on it, it automatically opens, formats, and sends out a custom email.
What I don't understand is, how can I include multiple variables in the "content" section (also known as the body section of the email)? I want to put custom type in the content section that says "There is a file awaiting your review." I also would like to choose an email signature from my mail program to use. Third, I would like to include the name of the file that is being sent....
I found that by doing {content:iteminfo} I could get the file name...If I do {content:"There is a file awaiting your review."} I could get the custom type I wanted....
BUT, I can't figure out how to get BOTH of them together in ADDITION to adding a custom email signature...
I know there are some really smart people out there...Any tips?I can't figure out how to get BOTH of them together
This is just standard AppleScript text concatenation with the &:
... {content: "There is a file awaiting your review: " & iteminfo}
Here you can see I'm concatenating a literal string (enclosed in quotes) and a variable. You can extend this ad infinitum.
As for the signature:
tell theMessage to set message signature to signature "My Sig"
(which assumes you have a signature named 'My Sig'. Adjust as necessary. -
I use Adobe Photoshop CS4_Bridge _Photo Downloader to import images from CF Cards into my 11" Mac Book Air. I have an issue with the Text files
that seem to accompany each and every image that I do not need. How do I stop Apple Script (which I assume is the culprit in this case) from interferring with this process.Your iWeb Site is stored not on your iDisk, but on a file named Domain.sites in your ~/Home/Library/Application Support/iWeb/ Folder.
If , for whatever reason, you wipe your HD and/or lose this file (Get a new computer, Re-Install your OS, Stolen Laptop, Crashed HD, Etc.) without backing-up your Domain.sites file then you will have to re-build your iWeb sites from scratch again.
Of course you can edit your Published HTML files in a different program such as Dreamweaver or even Text Edit. You just can't edit Published HTML files in iWeb. Not at this time at least.
Use iWebBackup to backup your Domain file to a Blank CD or DVD. Backing up your Domain file to another folder on your computer is not fully backing it up. If your computer gets stolen you still lost the file but if you have your Domain file burned onto a CD you have a backup!
Download iWebBackup Here
You can use iWebExtender to automatically consolidate your files into one folder and delete multiple images.
http://iWebFAQ.com -
Can I use Apple Script to press a button?
Is there some way I can create an Apple Script to run and press a button in another application, or create a "plug-in" type script for the program to make the button into a something that can be used by a keyboard shortcut?
I ask because I have an application that I can use to operate my digital camera, however, the button that Auto-Focuses then Shoots a photo does not have a keyboard shortcut. This is a problem because I also have the App "Snatch" on my iPhone, and, long story, short, I discovered I could use Snatch on my laptop on an Ad-Hoc network from about 1,000 feet away, maybe more. If I could find a way of making the "AF and Shoot" button into a keyboard shortcut, or create a script that could be triggered by a keyboard shortcut to press the button, I could use Snatch to control my camera remotely, far better then any part I would by from Nikon, or a third-party (Trust me, I have used a lot of them, and this method beats them all, save for the fact that I can't use bulb.)
Anyway, thanks for any input, if any.Even if an application is not scriptable, you can generally use [GUI Scripting|http://www.macosxautomation.com/applescript/uiscripting/index.html] to press a button. For example, using Canon's RemoteCapture DC software, the script below will press the "Release" button of the main window:
tell application "RemoteCapture DC" to activate
tell application "System Events"
tell process "RemoteCapture DC"
click button 4 of window "RemoteCapture DC"
end tell
end tell
If you then put the above script in the AppleScript menu in the menu bar, you should be able to use a third party application, like Quicksilver, to assign a keyboard shortcut to it.
Message was edited by: Pierre L. -
Find raster Image & Vector image in adobe indesign using apple script?
Find raster Image & Vector image in adobe indesign using apple script?
Find raster Image & Vector image in adobe indesign using apple script?
-
Concat apps that use Apple Script
I have been using Split and Concat 2.5 for joining downloaded files. Around the time I upgraded to OS10.4.9 it began to refuse to open; instead the dock icon just bounced a few times and stopped. I tried the Application, but it still would not open. Similar symptoms were observed with MacHacha (all versions to 3.2) and Catenator 1.1.0. I reloaded the original programs, deleted what preferences I could find, and repaired permissions, all to no avail. JigSaw works OK, so I suspect the issue is with Apple Script. Any suggestions?
Thanks,
Geoff
Mac OS X (10.4.10)This is what the logs for Split and Concat and MacHacha read:
2007-07-19 19:24:18.307 MacHacha[813] CFLog (21): Error loading /Users/geoff/Library/QuickTime/YV12ImageDecompressor.qtx/Contents/MacOS/YV12Ima geDecompressor: error code 4, error number 0 (Library not loaded: /Library/Frameworks/YV12ImageDecompressorGlue.framework/Versions/A/YV12ImageDec ompressorGlue
Referenced from: /Users/geoff/Library/QuickTime/YV12ImageDecompressor.qtx/Contents/MacOS/YV12Ima geDecompressor
Reason: image not found)
2007-07-19 19:25:43.201 Split&Concat[817] CFLog (21): Error loading /Users/geoff/Library/QuickTime/YV12ImageDecompressor.qtx/Contents/MacOS/YV12Ima geDecompressor: error code 4, error number 0 (Library not loaded: /Library/Frameworks/YV12ImageDecompressorGlue.framework/Versions/A/YV12ImageDec ompressorGlue
Referenced from: /Users/geoff/Library/QuickTime/YV12ImageDecompressor.qtx/Contents/MacOS/YV12Ima geDecompressor
Reason: image not found)
It seems that QuickTime is an issue but I am not sure what this all means. Thanks for your suggestion and any explanation would be more than welcome.
Geoff -
Can I use "apple script" to auto input xml file to final cut pro and auto export mp4 file?
Now, I'v a lot of final cut pro x 's xml, I want to use ""apple script" or other method to auto input xml and output mp4 in final cut pro x . How can I finish it?
Where did the XML come from? What did it consist of?
-
Apple Script to rename images using CSV file
Hello, I have build a website using a Woocommerce for Wordpress. The site is going to have over 1200 images and they need to be renamed appropriately for each product. I've never used Apple Script before but after hours and hours of searching I have noticed people with similar issues have managed to solve the problem using AppleScript.
I have attached a screenshot of the CSV file first 20 files - also the images are all saved in a folder with the names _DSC7916 copy 2.jpg etc etc.
Hopefully my issue makes sense,In applescript it goes something like this:
this all assuming the CSV file is a plain text file with a comma delimiting
the old and new filenames on a given line. If you have another structure
you need to give specifics so this can be modified
set theCSVData to paragraphs of (read "/path/to/theCSVFile.csv")
set {oldTID, my text item delimiters} to {my text item delimiters, ","}
repeat with thisLine in theCSVData
set {oldFileName, newFileName} to text items of thisLine
tell application "System Events"
set name of file oldFileName of folder "path/to/folder of images" to newFileName
end tell
end repeat
set my text item delimiters to oldTID
Note that I've made a lot of assumptions about your csv file, any or all of which may be wrong. please clarify as needed. -
Can I use the audio input to trigger a hot key or apple script?
Hello All,
I am looking for a solution to use a FireWire audio interface to record in multiple tracks in garage band. I am looking to have each track queue up a hot key or a apple script when that track is receiving audio and when the audio stops. for instance if person one is speaking the hot key is activated and stops when they are done talking. And when person 2 starts on a different channel a separate hot key is activated. Is there any way to do this?
ThanksI realize you are asking specifically about 'defaults', but as they concede in 'man defaults', it may not be the best tool for editing properties in "complex" structures, such as those buried in dicts within arrays, etc.
As an alternative, it looks like in 10.5, '/usr/libexec/PlistBuddy' is now a part of the standard install - 'PlistBuddy' may be more useful for this sort of task.
For example:<pre>
/usr/libexec/PlistBuddy -c "set Test:0:Name zzzz" /path/to/file.plist</pre> -
Install and uninstall of dmg file using Apple script in Mac 10.6 and higher version.
Hi ,
Could anyone please help me to write a Apple script to Install dmg file and do clean uninstall in Mac 10.6.8 and higher version.
My requirement is:
When i run script : it has to install the dmg file which is located inside one desktop folder say 'New Folder'
I need to do clean unistall when i run the script: i need to delete the folder in ~/Library- locate folder say 'CPSPCSHOWSERVER'' move to trash and from Terminal type in command "rm -r ~/.CPS' to completely delte this folder.
Really appreciated all ur help!!
Thanks,
KT.http://macfidelity.de/2008/08/30/how-to-mount-a-dmg-from-terminal-in-mac-os-x/in dex.html
http://osxdaily.com/2011/12/17/mount-a-dmg-from-the-command-line-in-mac-os-x/
http://hints.macworld.com/article.php?story=20030614230204397
http://www.commandlinefu.com/commands/view/2031/install-an-mpkg-from-the-command -line-on-osx -
XML Comment in Indesign using Apple script.
Hi all,
How to find the selected XML element is commented in indesign and get XML comment value in thru apple script. Any Ideas?
-JacinthaYou can have as many comments as you want so they require you to state the index of the comment in your reference.
Assuming you have an object reference for the XML element, you would replace "associated XML element of selection" with that.
tell application "Adobe InDesign CS3"
set myComments to {}
if every XML comment of associated XML element of selection is not {} then
set end of myComments to value of every XML comment of associated XML element of selection
end if
return myComments
end tell
if you know there's only going to be one comment then,
tell application "Adobe InDesign CS3"
if every XML comment of associated XML element of selection is not {} then
set myComment to value of XML comment 1 of associated XML element of selection
end if
return myComment
end tell
~Mike -
Please help!! Using Apple Script in Automator for Quicktime
I would like to add some metadata to a batch of quicktime movies and then make the files unable to be altered and re-saved so that I can post them on the web. If I open a movie in quicktime and run the following apple script I can then perform save as of movie A into movie B and movie B cannot be altered.
tell application "QuickTime Player"
set saveable of movie 1 to false
-- save self contained
end tell
I would love to be able to do this on a batch level in automator however I cannot figure out how to pass automator items to the apple script so that their saveable can be set to false, and after this I cannot figure out how to have to movies re-saved so the changes will take effect.
Any help at all would be greatly appreciated.how are you passing files to apple script? as finder items?
the following should work then
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on run {input, parameters}
tell application "Finder"
repeat with cur_file in input
set fname to (name of (get info for cur_file) as text)
tell application "QuickTime Player"
open file (cur_file as text)
set saveable of document 1 to false
tell application "Finder" to set new_item to (path to desktop as string) & fname
save self contained document 1 in new_item
delay 1
close document 1
end tell
end repeat
end tell
end run
</pre>
the above will dump the modified files onto your desktop and give them the same names they had before. You can adjust that as you like of course.
Maybe you are looking for
-
Opening Nikon NEF NX Files in CS3 in iMac
I have just replaced my 2006 iMac which was running on OSX Tiger 10.4.11 with an iMac running OSX 10.6.4 Snow Leopard. I have installed my legit.CS3 version 10.00. I use a Nikon D300 and have loaded Nikon Capture/Transfer/ViewNX version 1.5.2 which I
-
The backup was not performed because an error occured while copying files to the backup disk
I continually see the error message "The backup was not performed because an error occured while copying files to the backup disk" when my time capsule attempts to backup. I have been receiving this message since 14/08/13. I have attempted to locate
-
I am making an application that takes an apartment number and number of occupants in that apartment and then displays a number of statistics. So far I haven't had much problem except on a what is probably a very simple problem. I have two buttons, an
-
Pre-printed defective or excess tags in SAP
What is the process of creating defective or excess tag where printing cannot be done in the a location?
-
Question Regarding metadata modeling
hi you can please tell me the meaning and roll of metadata modeling Thanks Regards Gurkiran