Apple script for contacts?
iPhone does not search anything besides first name, last name & company in contacts.
Since I dont always remember people's name, I want to search for them using job title or even text in their notes.
Is there any solution I can search completely in contacts, one solution I worked out is to export all contacts from Address Book as lists in pdf format & copy that pdf to Dropbox - I need Applescript to automate this every week?
Any help?
With this script you can search for all fields of address book.
The result is going to be posted to the clipboard.
Make your own modifications !
tell application "Finder" to set mycontainer to container of (path to me) as text
set scriptlib to load script (mycontainer & "_hubionmac's AddressBook-scripts-lib.scpt") as alias
tell scriptlib
run
set these_fields to getfield2process("Which field I should check?", "ShowAll", false)
set unique_list to {}
repeat with this_person in getitem_2process()
repeat with this_field in these_fields
repeat with a in getValueList(this_field, this_person)
if a is not in unique_list then
set unique_list to unique_list & a
end if
end repeat
end repeat
end repeat
set AppleScript's text item delimiters to return
set unique_list to unique_list as text
set AppleScript's text item delimiters to ""
set the clipboard to unique_list
display dialog "All values of field \"" & these_fields & "\" in clipboard" giving up after 4
end tell
This script was borrowed from:
http://www.macupdate.com/info.php/id/33894/hubi's-address-book-scripts
Similar Messages
-
Apple script for Message box when Mail app Compose Window Opens
Hi there
I'm trying to make mail app remind me to choose the right emaill address to send from since I have several email addresses. Is there a way I can make or write an apple script for a message box to pop up whenever mail app's compose window opens up.
I can do for the case when I actally click the compose button when I'm on mail app by using UI scripting. But when it comes to hyperlinks which opens up the compose window, it fails.
I just want a script to see whether the compose window is open and if open pop up a message box.
Thanks
Best regards
Zam Shabeer ThahirTaoChitpol wrote:
By the way, the problem happens with the account of MS Exchange service, I don't know if this is the cause of the problem.
I think yes. The encoding is being corrupted somewhere, probably Exchange. There is nothing you can change on the iPad other than the OS languagel, to see if that helps. You can also tell Apple at
http://www.apple.com/feedback/ -
Apple Script for deleting podcasts
I subscribe to a lot of podcasts, but I don't want to keep them in my iTunes library after I'm done listening to them. Is there an Apple Script for automatically deleting podcasts? Thanks.
Thanks - once I'm in Automator and select Music, I don't see any options for finding Podcasts. Any suggestions which item/step I should select next in Automator? Thanks.
-
Apple Script For Opening External EML File With Apple Mail
Hi folks,
I am working with Apple Script for implementing numerous function related to Mail App.
I am using the following Apple Script lines for opening the mails which are in Mail app for each modes.
View Mode : open theMsg
Reply View Mode : reply theMsg opening window yes
Reply All Mode : reply theMsg opening window yes reply to all yes
Forward Mode : forward theMsg opening window yes
I want to know how we can open external eml file in different view modes (View, Reply, Reply All and Forward) using Apple Script or Apple Event programmatically with a similar mechanism available through script in Mail App.
Thanks in advance. Regards
NisarI'm not sure what you're doing here, but this isn't anything I recognize as compilable applescript. what is this 'mode' thing you're talking about.
at any rate, if you have a loose emlx file sitting around somewhere you can simply open it in mail (use the 'open' command and the file specification for the emlx file) and work with it appropriately. if you're talking about an actual eml file (e.g. from Outlook Express) you'd have to GUI script Mail's 'import mailbox' command (the applescript handler for importing mail only works with Mail.app mailboxes) -
I have Photoshop CS5. I downloaded the script for contact sheets. It doesn't work. How do I do it?
Adobe - Photoshop : For Windows : Photoshop CS5 Optional Plugins
Adobe - Photoshop : For Macintosh : Photoshop CS5 Optional Plug-Ins (Mac)
Optional Automate Plug-ins:
NOTE: We strongly encourage the use of the CS5 Optional Automate Plug-Ins Installer over attempting to manually install any of the following Optional Automate Plug-ins:
• Contact Sheet II
• Picture Package (ContactSheetII)
• Web Photo Gallery (WebContactSheetII) plus presets
• Script for Layer Comps to Web Photo Gallery
INSTALLATION INSTRUCTIONS
Refer to the included ReadMe file that has plug-in descriptions and installation instructions.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note these also work in the perpetual CS6 Windows version not the Subscription CS6 version. Some may work on the Mac however Picture Package(Contact sheet II) will not work on the MAC for Mac CS6 is 64Bit only and there was only a 32Bit plug-in for Mac CS6. There are 32bit and 64bit versions for windows. I install these manually.... -
Can I use 1 apple id for contacts and one apple id for find my iphone
My family has multiple deivces on using the same apple id for store stuff and to find my iphone. How can I put a different apple id on my phone so our contacts won't get merged.
Yes you can. Changing your ID won't get rid of any of your previous purchases. You just won't be able to redownload them from iCloud. (They are permanently tied to the ID you used to purchase them and you can't switch IDs and redownload under the new ID for 90 days - see http://support.apple.com/kb/HT4627). So be sure to transfer them to your iTunes library by connecting your phone to your computer, opening iTunes and going to File>Devices>Transfer Purchases. That way you can sync them back at any time without worrying about having to redownload them.
-
Hai all,
i am trying to insert footnote and its contents for a particular xml element in "Adobe Indesign cs2" thru apple script. But i'm facing some problem. I'm able to select the xml element and its contents and i can insert footnote for that element and i can cut that contents but i couldn't paste this contents in footnote. I have tried with the following code:
tell application "Adobe InDesign CS2"
tell active document
set theRoot to (item 1 of XML elements)
end tell
end tell
myLoopLoop(theRoot)
property myLoLoV : {}
property myHoHoV : {}
on myLoopLoop(myElement)
tell application "Adobe InDesign CS2"
tell active document
set moreElement to every XML element of myElement
repeat with x from 1 to (count of moreElement)
set em1 to item x of moreElement
select em1
if (name of markup tag of em1 is "informalexample") then
set em2 to em1
select text of em2
tell insertion point 1 of em1
set myfootnote to make footnote
end tell
tell application "Adobe InDesign CS2"
set myselection to selection
cut (selection of active document)
end tell
tell application "Adobe InDesign CS2"
tell insertion point 1 of myfootnote
paste into myfootnote
set text of em2 to myfootnote
end tell
end tell
end if
tell me to myLoopLoop(item x of moreElement)
end repeat
end tell
end tell
end myLoopLoop
Can anyone help me out to sort this problem?
Thanks
anbu
I Mac Mac OS X (10.4.8) Intel based Machi all
any help
thanks
anbu -
In FCP you can scrub though a video in the viewer by 1 second intervals by holding shift + arrow key (left=back, right=forward). I really like this shortcut.
Anyone have any script for QT to make it do the same thing?
Apple should add it on the next version. It will be super helpful and better integrated with FCP.
BlakeYes, but in FCP when you hit shift+arrow every time you hit the arrow it scrubs either 1 second forward or 1 backward. This is very helpful if I know I want a clip to start at and exact point and go for exactly 5 (6,9,25) seconds. I have to do this a lot in my work. In QuickTime it just moves you frame by frame, which is perfect for certain situations but I would really like to be able to do what I can do in FCP also.
Blake -
Apple Scripting for Microsfot Power Point 2011
Hi,
I am having problem with following apple script. This is working fine with Office 2004 but when i am using office 2011 then on action is changing to «class BCOa». Can any one please help me in this. I will be very thankful
tell application "Microsoft PowerPoint"
set btnAbout to make new command bar control at command bar ¬
"CPS" with properties {control type:control button, button style:button caption}
-- Set button style in "with properties" block
set width of btnAbout to 60
set name of btnAbout to "About"
set *on action* of btnAbout to "cpsHandleAbout"
set tooltip text of btnAbout to "About CPS for PowerPoint"
end tellHm, not sure if this helps, but perhaps... first create this command button by hand...
then run
tell application "Microsoft PowerPoint"
get properties of command bar control "About" of command bar "CPS"
end tell
this returns the properties of this button...
something like:
{class:command bar button, begin group:false, built in:true, name:"About", description text:"", enabled:true, height:22, help context ID: 0, help file:"", id:2520, entry_index:1, left position:674, parameter:"", priority:3, tag:"", tooltip text:"&About", top:324, control type:control button, visible:true, width:28, button face is default:false, face id:23, button state:button state up, button style:button automatic}
If the button uses a build in command you will get to know the id of this command...
e.g. the ID is 23 (open file)
make new command bar control at command bar ¬
"CPS" with properties {id:23}
and this would create such a new button...
But I am not sure who to get a list of all action ids... -
Can anyone make an Apple Script for me?
I'm looking for an Apple Script so that when I press cmd+F1 on my Macbook Pro Retina it turns the brightness to 0 instantly. Rather than having to hold F1 down to make the brightness go down to 0.
Is this something that is even possible?
Thank YouThere is evidently no direct way to do this, but there is an indirect way:
Download an app called SleepDisplay: Download SleepDisplay for Mac - Put your display to sleep instantly. MacUpdate.com
put SleepDisplay in your Applications folder
open Automator.
Select service for type of document
at the top, for service receives, select no input, and after in, any application
in the column on the left, select Utilities
in the next column, drag Launch Application over to the right, and select SleepDisplay for the app
close the window with the red circle in the left upper corner, and give the service a name, like Dark.
go to system preferences > keyboard > shortcuts
select services in the box on the left, and scroll down in the box on the right until you find the service you just created. select that service.
when you select it, a white oval should appear that says "add shortcut". Type in the shortcut you want to use. I couldn't get ⌘F1 to work, but control-option-⌘-D did work. It must be a unique shortcut, not already in use. -
Would like separate Apple ID for Contacts/iMessage
I have an iPhone and my son has an iPod Touch - both currently iOS 6.1.3
We share my Apple ID so we can share Music, Apps, etc.
What I would like to have separate is the Contacts and iMessage (FaceTime, too).
Is it possible to set up another Apple ID for this purpose?
Will we both need to set up a separate ID for each of our Contacts and iMessages, while keeping our original ID to share?
My husband wants to change to an iPhone as well, and we would like to do the same process with him.
Thank you!whitneypoff wrote:
I have an iPhone and my son has an iPod Touch - both currently iOS 6.1.3
We share my Apple ID so we can share Music, Apps, etc.
What I would like to have separate is the Contacts and iMessage (FaceTime, too).
Have a look here...
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l -
Separate Apple ID for Contacts/iMessage
I have an iPhone and my son has an iPod Touch - both currently iOS 6.1.3
We share my Apple ID so we can share Music, Apps, etc.
What I would like to have separate is the Contacts and iMessage.
Is it possible to set up another Apple ID for this purpose?
Will we both need to set up a separate ID for each of our Contacts and iMessages, while keeping our original ID to share?
My husband wants to change to an iPhone as well, and we would like to do the same process with him.
Thank you!Create a NEW account for your son using these instructions. Note the the minimum age is 13. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
Then use that ID for:
Settings>Messages>Send and Receive
Settings> iCloud
Settings>FaceTime
Continue to use the common ID for Settings>iTunes and App stores -
Apple script for 10.4 - works in OSX but not older
Hi I have a script which I'm using on my current system 10.9 it runs in excel and it goes something like this:
tell application "Microsoft Excel"
-- put the complete set of data into a list of lists (i.e., 2 dimensions -> columns of rows)
tell active sheet to set myData to value of used range
-- recipient email
set myRow1 to 1
set myCol1 to 1
set Address to item {myCol1} of item {myRow1} of myData
-- recipient name
set myCol4 to 4
set rName to item {myCol4} of item {myRow1} of myData
The above is just a small snippet from the script. However I try running this on apple 10.4 apple script and it does not work. I'm trying to save my computer time from have to this minimal task on an older mac I have but I'm experiencing some problems. Does the active sheet not work in apple mac 10.4? What am I missing? Any help would be greatly appreciated.Hi Ohms238,
I found this Apple developer page that talks about changes made in each version of OSX. It will require some work, but you can go through and see what changes are relevant to your script.
But I would actually recommend running pieces of your code separately to see exactly what parts don't work and then rewrite just those portions. -
Hello there. How do I create an apple script that switches between the default printers? I am using 9.2.2. I am not familar with apple scripts in OS9. Thanks
Try starting with the script posted on this page.
(15380) -
Can anybody fix this apple script for me so all the responses work
iv been working on a jarvis wake up script and iv continued to add on commands to if theResponce parts of the script but now most of them wont work and i get a syntax if i dont have like 8 end if's at the end of the script could somebody please overview it, fix the script and resubmit it to me in the comments. will be so grateful if somebody fixes this pleasee.!!!!
set theHours to hours of the (current date)
if theHours > 18 then
say "good evening sir"
else if theHours > 12 then
say "good afternoon sir"
else if theHours > 6 then
say "good Morning sir"
else if theHours > 0 then
say "get out of bed sir!"
end if
say "It is " & getTimeInHoursAndMinutes() using "Tom"
on getTimeInHoursAndMinutes()
set timeStr to time string of (current date)
set Pos to offset of ":" in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
-- Get the "minute"
set Pos to offset of ":" in timeStr
set theMin to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
--Get "AM or PM"
set Pos to offset of " " in timeStr
set theSfx to characters (Pos + 1) through end of timeStr as string
return (theHour & ":" & theMin & " " & theSfx) as string
end getTimeInHoursAndMinutes
set CityCode to 1098081
set t_format to "C"
set v_format to "S"
set a_format to "Y"
set IURL to "http://weather.yahooapis.com/forecastrss?w=" & CityCode
set file_content to (do shell script "curl " & IURL)
--looking for the line with actual condition
set theText to text ((offset of "yweather:condition" in file_content) + 1) thru -1 of file_content
set sub_1 to text ((offset of "\"" in theText) + 1) thru -1 of theText
set actual_condition to text 1 thru ((offset of "\"" in sub_1) - 1) of sub_1
set sub_1a to text ((offset of "temp=" in sub_1)) thru -1 of sub_1
set sub_1b to text ((offset of "\"" in sub_1a) + 1) thru -1 of sub_1a
set actual_temp to text 1 thru ((offset of "\"" in sub_1b) - 1) of sub_1b
if t_format is equal to "C" then
set actual_temp to (5 / 9) * (actual_temp - 32) as integer
end if
set theText to text ((offset of "yweather:forecast" in file_content) + 1) thru -1 of file_content
set sub_2 to text ((offset of "\"" in theText) + 1) thru -1 of theText
set today_min_temp to word 9 of sub_2
set today_max_temp to word 12 of sub_2
if t_format is equal to "C" then
set today_min_temp to (5 / 9) * (today_min_temp - 32) as integer
set today_max_temp to (5 / 9) * (today_max_temp - 32) as integer
end if
set sub_3 to text ((offset of "text" in sub_2) + 1) thru -1 of sub_2
set sub_4 to text ((offset of "\"" in sub_3) + 1) thru -1 of sub_3
set today_forecast to text 1 thru ((offset of "\"" in sub_4) - 1) of sub_4
set sub_5 to text ((offset of "yweather:forecast" in sub_4) + 1) thru -1 of sub_4
set sub_6 to text ((offset of "\"" in sub_5) + 1) thru -1 of sub_5
set tomorrow_min_temp to word 9 of sub_6
set tomorrow_max_temp to word 12 of sub_6
if t_format is equal to "C" then
set tomorrow_min_temp to (5 / 9) * (tomorrow_min_temp - 32) as integer
set tomorrow_max_temp to (5 / 9) * (tomorrow_max_temp - 32) as integer
end if
set sub_7 to text ((offset of "text" in sub_6) + 1) thru -1 of sub_6
set sub_8 to text ((offset of "\"" in sub_7) + 1) thru -1 of sub_7
set tomorrow_forecast to text 1 thru ((offset of "\"" in sub_8) - 1) of sub_8
if a_format is equal to "Y" then
say "The current conditions in Perth are " & actual_condition & " ,and the current temperture is " & actual_temp & " degrees"
end if
if v_format is equal to "L" then
say "Today it will be : " & today_forecast & ". Temperature: between " & today_min_temp & " and " & today_max_temp & " degrees .
Tomorrow we are expecting it to be: " & tomorrow_forecast & ". Temperature: between " & today_min_temp & " and " & today_max_temp & " degrees " using "Tom"
else
say "Today it will be : " & today_forecast & ", between " & today_min_temp & " , and " & today_max_temp & " degrees .
Tomorrow we are expecting it to be: " & tomorrow_forecast & ", between " & tomorrow_min_temp & " ,and " & tomorrow_max_temp & " degrees " using "Tom"
say "will that be all sir?"
tell application "SpeechRecognitionServer" to set theResponse to listen for {"get my mail ", "yes", "notes", "repeat", "Music", "Sleep in"}
if theResponse is "Sleep in" then
delay 6
say "Time to get up sir,or you will be late"
tell application "SpeechRecognitionServer" to set theResponse2 to listen for {"Ok pat im getting up"}
if theResponse2 is "Ok pat im getting up" then
set volume 35
tell application "iTunes"
set the sound volume to 0
play user playlist "Wake up"
repeat 10 times
if sound volume is less than 40 then
set sound volume to (sound volume + 10)
delay 2
end if
end repeat
end tell
if theResponse is "Music" then
set volume 20
tell application "iTunes"
set the sound volume to 0
play user playlist "Wake up"
repeat 10 times
if sound volume is less than 60 then
set sound volume to (sound volume + 10)
delay 2
end if
end repeat
end tell
if theResponse is "yes" then
delay 1
set theOptions to {"very good, sir, have a nice day"}
set theChoice to some item of theOptions
say theChoice displaying theChoice with waiting until completion
end if
if theResponse is "get my mail " then
tell application "Mail" to launch
end if
if theResponse is "notes" then
tell application "Stickies" to launch
end if
if theResponse is "repeat" then
set CityCode to 1098081
set t_format to "C"
set v_format to "S"
set a_format to "Y"
set IURL to "http://weather.yahooapis.com/forecastrss?w=" & CityCode
set file_content to (do shell script "curl " & IURL)
--looking for the line with actual condition
set theText to text ((offset of "yweather:condition" in file_content) + 1) thru -1 of file_content
set sub_1 to text ((offset of "\"" in theText) + 1) thru -1 of theText
set actual_condition to text 1 thru ((offset of "\"" in sub_1) - 1) of sub_1
set sub_1a to text ((offset of "temp=" in sub_1)) thru -1 of sub_1
set sub_1b to text ((offset of "\"" in sub_1a) + 1) thru -1 of sub_1a
set actual_temp to text 1 thru ((offset of "\"" in sub_1b) - 1) of sub_1b
if t_format is equal to "C" then
set actual_temp to (5 / 9) * (actual_temp - 32) as integer
end if
set theText to text ((offset of "yweather:forecast" in file_content) + 1) thru -1 of file_content
set sub_2 to text ((offset of "\"" in theText) + 1) thru -1 of theText
set today_min_temp to word 9 of sub_2
set today_max_temp to word 12 of sub_2
if t_format is equal to "C" then
set today_min_temp to (5 / 9) * (today_min_temp - 32) as integer
set today_max_temp to (5 / 9) * (today_max_temp - 32) as integer
end if
set sub_3 to text ((offset of "text" in sub_2) + 1) thru -1 of sub_2
set sub_4 to text ((offset of "\"" in sub_3) + 1) thru -1 of sub_3
set today_forecast to text 1 thru ((offset of "\"" in sub_4) - 1) of sub_4
set sub_5 to text ((offset of "yweather:forecast" in sub_4) + 1) thru -1 of sub_4
set sub_6 to text ((offset of "\"" in sub_5) + 1) thru -1 of sub_5
set tomorrow_min_temp to word 9 of sub_6
set tomorrow_max_temp to word 12 of sub_6
if t_format is equal to "C" then
set tomorrow_min_temp to (5 / 9) * (tomorrow_min_temp - 32) as integer
set tomorrow_max_temp to (5 / 9) * (tomorrow_max_temp - 32) as integer
end if
set sub_7 to text ((offset of "text" in sub_6) + 1) thru -1 of sub_6
set sub_8 to text ((offset of "\"" in sub_7) + 1) thru -1 of sub_7
set tomorrow_forecast to text 1 thru ((offset of "\"" in sub_8) - 1) of sub_8
if a_format is equal to "Y" then
say "The current conditions in Perth are " & actual_condition & " ,and the current temperture is " & actual_temp & " degrees"
end if
if v_format is equal to "L" then
say "Today it will be : " & today_forecast & ". Temperature: between " & today_min_temp & " and " & today_max_temp & " degrees .
Tomorrow we are expecting it to be: " & tomorrow_forecast & ". Temperature: between " & today_min_temp & " and " & today_max_temp & " degrees " using "Tom"
else
say "will that be all sir?"
tell application "SpeechRecognitionServer" to set theResponse3 to listen for {"get my mail ", "yes", "notes", "Music"}
if theResponse3 is "Music" then
set volume 20
tell application "iTunes"
set the sound volume to 0
play user playlist "Wake up"
repeat 10 times
if sound volume is less than 60 then
set sound volume to (sound volume + 10)
delay 2
end if
end repeat
end tell
else
if theResponse3 is "get my mail " then
tell application "Mail" to launch
end if
if theResponse3 is "yes" then
delay 1
set theOptions to {"very good, sir, have a nice day"}
set theChoice to some item of theOptionsWhat you do in this situation, is split the file into parts.
Start with:
set theHours to hours of the (current date)
if theHours > 18 then
say "good evening sir"
else if theHours > 12 then
say "good afternoon sir"
else if theHours > 6 then
say "good Morning sir"
else if theHours > 0 then
say "get out of bed sir!"
end if
Add in a few lines of code to this file and see what happens.
add the on run, this would be clearer. It is the default on unit to run.
on run
set theHours to hours of the (current date)
if theHours > 18 then
say "good evening sir"
else if theHours > 12 then
say "good afternoon sir"
else if theHours > 6 then
say "good Morning sir"
else if theHours > 0 then
say "get out of bed sir!"
end if
end run
Now, it is time for debugging.
It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log statement
2) Click on Run
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
end run
Maybe you are looking for
-
ITunes Sync with win 8.1
My iphone will no longer complete the syncing process on my desktop. After it syncs the contacts and calendar, I get a message that the computer is no longer authorized. I have reauthorized it, deauthrorized and reauthorized it, I called Apple and wa
-
Is there any adf or jsf component that produces same features as image map does in html
-
Dissociate default printer driver from the report viewer
Hello, I have a problem in reports visualization. I set the report paper size via the code: _printOptions.PaperSize = CrPaperSizeEnum.crPaperSizePaperCsheet; The problem is when i visualize it it's truncated to the printer default paper size. How cou
-
I seem to have two choices to try and help both my Windows and my Mac users to see my demonstration videos: 1) export to Flash and try to get 500+ people to understand that they have two files and have to have both and to open the skin file to be abl
-
How can i update to x lion for free (i bought my iMac after 6/6)
Hey there.... I bought my new iMac after 6/6/2011 from isuare in Greece and apple sent me an e-mail to upgrade my software for free.... How can i do this...... Please help me.....