Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Close Duplicate Finder windows Apps
I sometimes have several duplicate Finder windows open at the same time. I wrote this AppleScript which quickly closes any duplicate windows, leaving only one of each open.
script pruneDupFWins
	-- tested 07/09/12
	-- Enhanced to consider Spotlight windows 09/09/12
	-- Optimized for speed 10/09/12
	--  McUsr 2012 Parts made by Nigel Garvey
	property parent : AppleScript
	property scriptTitle : "Close Duplicate Windows"
	property FinderIcon : a reference to file ((path to library folder from system domain as text) & "CoreServices:Finder.app:Contents:Resources:Finder.icns")
	on run
	local wCount, i, res, res2, fail, prevApp
	script o
	property wlist : {{}, {}}
	property slist : {}
	property klist : {}
	property dlist : {}
	end script
	set fail to false
	try
	tell application id "com.apple.systemevents"
	set prevApp to (name of every process whose frontmost is true and visible is true) as text
	tell application process "Finder" to set o's slist to name of every window
	end tell
	tell application id "com.apple.finder" to activate
	set sCount to count o's slist
	if sCount = 0 then return 0
	
	tell application id "com.apple.finder" to set o's wlist to {name, id} of (every window)
	
	set wCount to count item 1 of o's wlist
	set o's wlist to reverse of my transposeList(wCount, item 1 of o's wlist, item 2 of o's wlist)
	set o's slist to reverse of o's slist
	set i to 1
	repeat sCount times
	set res to my getSingelton(o's wlist, item i of o's slist)
	if res = null then
	else
	if o's klist ≠ {} then
	set res2 to my indexOfItem(item i of o's slist, o's klist)
	if res2 = 0 then
	set end of o's klist to item i of o's slist
	else
	set end of o's dlist to res
	end if
	else
	set end of o's klist to item i of o's slist
	end if
	if i < wCount then set o's wlist to items 2 thru -1 of o's wlist
	end if
	set i to i + 1
	end repeat
	
	set wcl to count o's dlist
	repeat with i from 1 to wcl
	tell application id "com.apple.finder" to close Finder window id (item i of o's dlist as integer)
	end repeat
	
	
	on error e number n
	-- Chris Stone
	set {cr, sep} to {return, "------------------------------------------"}
	set errmsg to sep & cr & "Error: " & e & cr & sep & cr & "Error 
	Number: " & n & cr & sep
	tell application id "com.apple.systemuiserver"
	activate
	try
	display dialog errmsg with title my scriptTitle buttons {"Ok"} default button 1
	end try
	end tell
	set fail to true
	set wcl to 0
	end try
	
	if not fail then
	if wcl > 0 then
	if wcl = 1 then
	set msgText to "I closed " & wcl & " window!"
	else
	set msgText to "I closed " & wcl & " windows!"
	end if
	else
	set msgText to "Nothing to do!"
	end if
	
	tell application id "com.apple.systemuiserver"
	activate
	try
	display dialog msgText with title my scriptTitle buttons {"Ok"} default button 1 with icon my FinderIcon giving up after 1.2
	end try
	end tell
	end if
	tell application prevApp to activate
	return wcl
	end run
	
	to transposeList(ctr, list1, list2)
	-- tested 05/09/12
	script o
	property newL : {}
	property m : list1
	property n : list2
	end script
	local i
	set i to 1
	repeat ctr times
	set end of o's newL to {contents of item i of o's m, contents of item i of o's n}
	set i to i + 1
	end repeat
	return o's newL
	end transposeList
	
	on indexOfItem(theItem, itemsList) -- credit to Emmanuel Levy 
	local rs
	set text item delimiters to return
	set itemsList to return & itemsList & return
	set text item delimiters to {""}
	try
	set rs to -1 + (count (paragraphs of (text 1 thru (offset of (return & theItem & return) in itemsList) of itemsList)))
	on error
	return 0
	end try
	rs
	end indexOfItem
	
	on getSingelton(the_list, item_a)
	set astid to AppleScript's text item delimiters
	-- Nigel Garvey's with a name change
	set AppleScript's text item delimiters to return
	set the_list_as_string to return & the_list & return
	set AppleScript's text item delimiters to return & item_a & return
	if (the_list_as_string contains result) then
	set p to (count paragraphs of text item 1 of the_list_as_string)
	if (p is 0) then set p to 1 -- Catch modern paragraph count for empty text.
	set p to p mod 2
	try
	set otherItem to paragraph (p * 2 - 1) of text item (p + 1) of the_list_as_string
	on error
	return null
	end try
	set AppleScript's text item delimiters to astid
	
	return otherItem
	else
	return null
	end if
	end getSingelton
	
end script
tell pruneDupFWins to run

[kirkmc adds: Looking at the script, I really don't understand much, but I tested it and it works.]
  Post a comment  •  Comments (13)  
  • Currently 3.40 / 5
  You rated: 5 / 5 (10 votes cast)
 
[3,871 views]  View Printable Version
Send e-mail notifications via Find My Friends app in iOS 6 iOS devices
It is now possible to have Find My Friends app send notifications to e-mail addresses.

I like the Find My Friends app, which allows you to see where your friends are located (if they allow you to). With the latest version, in iOS 6, you now have the option to be notified when a friend leaves or arrives at a location.

But you can also set up notifications for yourself, to notify others where you are currently, as well as when you leave or arrive at a location. Additionally, you can send an e-mail automatically when you arrive or leave a location, or send an e-mail showing someone where you are currently

To do this, open Find My Friends, tap Me, then Notify. You can now tap either Immediately, to send an e-mail right away, or At a Location, to send an e-mail when you get to that location. Tap on the To field to enter an e-mail address. If you choose an Apple ID for a friend who has the Find My Friends app, they'll get a notification on their iOS device. But if you enter a different e-mail address - such as one for someone who doesn't have the app, or an iPhone - an e-mail message will be sent. This is nicely formatted, and contains a small map (using Google maps) showing your location.

So if you need to tell someone where you are, and they don't have an iOS device or the Find My Friends app, this e-mail can be a big help.
  Post a comment  •  Comments (2)  
  • Currently 3.38 / 5
  You rated: 3 / 5 (8 votes cast)
 
[7,042 views]  View Printable Version
Opt out of ad tracking on iOS 6 iOS devices
With iOS 6, you can choose to limit (though not entirely disable) ad tracking, by digging deep into settings. Go to Settings > General > About, then scroll down to the bottom and top on Advertising, then toggle Limit Ad Tracking to On.

There's a tiny Learn More link at the bottom of that screen, which explains that this uses a "non-permanent, non-personal, device identifier, that apps will use to give you more control over advertisers' ability to use tracking methods."

[kirkmc adds: I'm not entirely sure how effective it will be, as it's still in its infancy. But it can't hurt.]
  Post a comment  •  Comments (0)  
  • Currently 3.11 / 5
  You rated: 1 / 5 (9 votes cast)
 
[6,228 views]  View Printable Version
Safari 6 ".com" shortcut Web Browsers
Before Safari 6, you could navigate to a URL with having to type ".com". The same can be done in Safari 6 with one extra keystroke.

Entering "apple" in the location bar of Safari 6 will yield you Google search results for those terms. However, including a trailing slash will cause Safari to add the .com TLD to a logical location in the address, and take you to that URL. So, "apple/" will take you to apple.com.

[kirkmc adds: This is fine, if you're trying to get to .com sites. If you're in a country and want to get to local sites, it won't help you. It's worth noting that you can enter any number of slashes and still get this to work.]

Update: As per a comment below, here's how to make it work when you type a /. For example, if you type "apple/ipod/" Safari will go to www.apple.com/ipod, if you do the following. Go to System Preferences > Network, click on Advanced, then DNS. In the Search Domains section, click on + and add .com. Click on OK, then on Apply.
  Post a comment  •  Comments (13)  
  • Currently 1.91 / 5
  You rated: 1 / 5 (34 votes cast)
 
[11,735 views]  View Printable Version
Listen to podcasts with Music app on iOS 6 iPod
With iOS 6, podcasts no longer show up in the Music app, if you have installed the Podcasts app. But if you like to make playlists of podcasts, the Podcasts app doesn't pick these up. If you want to get your podcasts back to the Music app, and be able to access playlists, just delete the Podcasts app. Podcasts will show up after you tap More in the Music app.
  Post a comment  •  Comments (17)  
  • Currently 3.77 / 5
  You rated: 3 / 5 (13 votes cast)
 
[27,911 views]  View Printable Version
Resolve problem with iTunes not recognizing iPhoto library Apps
A number of people, including some I know, have had a problem with iTunes not recognizing their iPhoto libraries, and not being able to sync them to their new iPhones. It turns out, as explained in this Apple support forum thread, that extraneous ampersand characters (&) are causing the Album Data2.xml file to be parsed incorrectly. One friend showed me that in his case it was an & in a song title. Removing the & characters seems to fix this. So if you're having problems syncing photos, this may be the reason why.
  Post a comment  •  Comments (1)  
  • Currently 2.80 / 5
  You rated: 3 / 5 (5 votes cast)
 
[7,385 views]  View Printable Version
Get Siri to tell you the temperature in centigrade iOS devices
Yesterday, I discovered that, when I asked Siri for the temperature on my iPad, it would always tell me the temperature in fahrenheit, even though I am in France, and my time zone is set as such. (There is no real country setting on iOS.) On my iPhone, however, I would get the temperature in centigrade, as expected. A friend suggested that this is because I had set C in the Weather app on the iPhone. As there is no Weather app on the iPad (I still don't know why), there's no place to make this change.

Fortunately, a commenter to the blog post I linked to above pointed out that there is, indeed, a way to set the temperature, but it is well hidden. Open Clock, tap on Edit, and you'll see two buttons at the bottom of the clock list, one for F and the other for C. It seems that the only reason this setting is here is because the clocks can show time and temperatures. But unless you live in a major city - one for which you can choose a clock - the temperatures here aren't much use.
  Post a comment  •  Comments (4)  
  • Currently 3.30 / 5
  You rated: 1 / 5 (10 votes cast)
 
[10,644 views]  View Printable Version
List of OS X dictation commands System 10.8
Mountain Lion's dictation feature may not be as good as a dedicated speech recognition program (read: Nuance's Dragon Dictate), but it's good for those who only want to dictate from time to time. Apple has published a tech note about the dictation feature, listing all the commands that are possible. This shows you which types of punctuation you can use, but also how to make capital letters, go to new lines and new paragraphs, how to get numerals typed and more.
  Post a comment  •  Comments (2)  
  • Currently 3.13 / 5
  You rated: 2 / 5 (8 votes cast)
 
[9,079 views]  View Printable Version
Add your phone number to OS X Messages Apps
Glenn Fleishmann, writing for TidBITS, had a problem getting his phone number to work with Messages on Mountain Lion. He tried a number of things to get it to work, then finally found out that he had to log out and back in on his iPhone. He tapped Settings > Messages > Send & Receive, and then tapped Apple ID. He then tapped Sign Out, then tapped Use Your Apple ID for iMessage, and logged back in.

If you have this problem, try the above. And see the original article for more details and screenshots.
  Post a comment  •  Comments (4)  
  • Currently 3.67 / 5
  You rated: 5 / 5 (6 votes cast)
 
[22,244 views]  View Printable Version
Open Apps with Siri iOS devices
In iOS 6, Siri is smart enough to open your apps for you. Just speak the command "Open Mail," and Mail will open. This works for built-in and downloaded apps.

[kirkmc adds: It's about time, frankly. I've been extremely disappointed in Siri; it hardly ever works for me. I hope this works, because this will save time when I want to open an app that's not on my home screen, or buried in a folder.]
  Post a comment  •  Comments (5)  
  • Currently 2.13 / 5
  You rated: 1 / 5 (8 votes cast)
 
[5,141 views]  View Printable Version