Category Archives: Mac Tips

Use AppleScript to count words and characters in text

[Original Article: Use AppleScript to count words and characters in text • comment by: robleach]
Just did this for any selected text (without having to copy)…set debug to false

–Get the highlighted text
set selecTxt to getHighlight(debug)

set myCount to count (selecTxt)
set myWords to count words of (selecTxt)
set myParas to count paragraphs of (selecTxt)

display dialog “Characters: ” & myCount & ”
Words: ” & myWords & ”
Paragraphs: ” & myParas

on getHighlight(debug)

–Save the current contents of the clipboard
set theSpare to the clipboard as record
–Save a text version of the contents of the clipboard if possible
set spareTest to “”
try
set spareTest to the clipboard as text
end try
–Declare the variable we’re going to return
set selecTxt to “”

tell application “System Events”
–Initiate the copy
keystroke “c” using {command down}

–Wait up to 2 seconds for the copy to finish
set done to “no”
set waitnum to 0
set waitInterval to 0.02
set maxwaits to 100

–Repeat while the clipboard contents have not changed
repeat while done = “no”
–Get the contents of the clipboard
set selecTxt to the clipboard as text

–See if we’re done or need to wait
if waitnum is equal to maxwaits then
set done to “yes”
else if spareTest is equal to selecTxt then
delay waitInterval
set waitnum to waitnum + 1
else
set done to “yes”
end if

end repeat

if debug is true then
display dialog “Copied text: ” & (the clipboard as text)
end if
end tell

–Restore the original clipboard contents
set the clipboard to theSpare as record

–Return the highlighted text
return selecTxt

end getHighlight

Source: Mac OSX Hints

    

Time to close the site

[Original Article: Getting Java client apps to run the way you want • comment by: rbenezra]
Been a fan for years but taking this one off my bookmark list for now. No one seems to care anymore, it’s been 1.5 months since the last published hint and many similar breaks for awhile now. Rob G where are you when we need you? Hopefully doing what you do best. Adios MOs …

Source: Mac OSX Hints

    

Change the default subnet for Internet Sharing

[Original Article: Change the default subnet for Internet Sharing • comment by: glusk]
Apparently, Yosemite (10.10) now needs a bit more info to start InternetSharing.

SharingNetworkMask
255.255.255.0
SharingNetworkNumberEnd
192.168.0.20
SharingNetworkNumberStart
192.168.0.0

Because of cacheing, you should use defaults write:

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.0.0
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd 192.168.0.20
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask 255.255.255.0
I hope someone more familiar with writing plists can improve this, but it worked for me as written. …

Source: Mac OSX Hints

    

Apple Announces Q414 Revenue of $42.1bn, FY14 Revenue Tops $182bn

By Alex Brooks Apple’s fiscal year revenue between 2000 and 2014
Apple today announced financial results for its fourth fiscal quarter of 2014 which ran from July 1, 2014 until September 27. The quarter also marks the end of Apple’s financial year. For the quarter Apple posted revenue of $42.1 billion and net quarterly profit of $8.5 billion, or $1.42 per diluted share (adjusted for stock split). These results compare to revenue of $37.5 billion and net profit of $7.5 billion, or $1.18 per diluted share, in the year-ago quarter.
For the fiscal year Apple made a total of $182.79bn in revenue, this compares to $170.91bn in FY2013.
Gross margin was 38 percent compared to 37 percent in the year-ago quarter. International sales accounted for 60 percent of the quarter’s revenue.
Apple reported the following number of shipments for its products during the quarter:
39.3 million iPhones compared to 33.8 million in the year-ago-quarter
12.3 million iPads compared to 14.1 million in the year-ago-quarter
5.5 million Macs compared to 4.6 million in the year-ago quarter
2.6 million iPods compared to 3.5 million in the year-ago quarter.

“Our fiscal 2014 was one for the record books, including the biggest iPhone launch ever with iPhone 6 and iPhone 6 Plus,” said Tim Cook, Apple’s CEO. “With amazing innovations in our new iPhones, iPads and Macs, as well as iOS 8 and OS X Yosemite, we are heading into the holidays with Apple’s strongest product lineup ever. We are also incredibly excited about Apple Watch and other great products and services in the pipeline for 2015.”
“Our strong business performance drove EPS growth of 20 percent and a record $13.3 billion in cash flow from operations in the September quarter,” said Luca Maestri, Apple’s CFO. “We continued to execute aggressively against our capital return program, spending over $20 billion in the quarter and bringing cumulative returns to $94 billion.”
Apple provided the following guidance for its fiscal 2014 third quarter:
revenue between $63.5 billion and $66.5 billion
gross margin between 37.5 percent and 38.5 percent
operating expenses between $5.4 billion and $5.5 billion
other income/(expense) of $325 million
tax rate of 26.5%

Source: World of Apple

    

A Look Ahead at Apple’s Q4 2014 Results, Is the iPad a Fad?

By Alex Brooks On Monday Apple will report its Q4 2014 fiscal results, the quarter that ended on September 30 marks an important one as it takes in the majority of Apple’s back to school season. Notably the quarter only includes about a week and half of iPhone 6 sales, it’s unknown how much detail Apple will go into about the success of the launch so far—at last week’s media event the company failed to give any numbers.
Let’s explore some elements of Apple’s results release; namely the ever slumping iPad sales number, the end of year total, and the analyst estimates.

iFad?
Whilst this is set to be a good quarter as quarters go there are questions on every onlookers mind. The iPad has been in decline for several quarters now, Tim Cook described this as just a ‘speed bump’. This comment followed Apple announcing sales of 13.3 million iPads for the June quarter, down from 14.6 million in the year before quarter.
So is Cook right and this is just a hiccup or is the iPad model more of a fad than an iPhone like trajectory? Last week Apple released another set of updates to the iPad lineup and in a rather un-Apple like way expanded the iPad lineup to include not two, not even three, but five models of iPad. This lineup naturally creates a large price umbrella, is this what Apple thinks is required to start boosting the sales numbers?
Apple’s End of 2014 iPad Lineup
Others have spent time exploring whether it’s the tablet market itself that is at fault. Or if it’s even safe to say that with under four years of iPad sales data whether patterns can yet be predicted, you might ask what is the average upgrade cycle of an iPad owner?
Jean-Louise Gassée a long time Apple pundit wrote back in April of this year about the iPad being a tease, in effect arguing that the iPad is amazing for some tasks but when it comes down to it the Mac (or PC) lives on.
I’m not entirely sure this argument is the full picture but it does have some merit. Tablet sales have been steadily outpacing the ever declining personal computer market for some time now, even to the point where Apple touted that it now sells more iPads than any other PC manufacturer sells Windows PCs—not exactly a watertight point but an indication of direction.
It does however appear that by all estimates iPad sales fell during the September quarter of 2014. Estimates are coming in at around 13.1 million units sold (compared to 14m a year ago), if this turns out true then Apple will have some more defending to do, particularly if the low number knocks into their revenue number.
Another Record Year?
The end of the September quarter also marks an important milestone with the end of Apple’s financial year. During fiscal year 2013 Apple totalled up $170.91 billion in revenue, a sizeable record even by Apple’s standards. So far in 2014 Apple has reported around $140.5 billion, and with Apple’s lowest revenue estimate sitting at $37bn it looks like it’ll smash its own fiscal year record. That should be something to settle nerves ahead of the always jaw dropping December quarter.
Apple’s quarterly revenue (Q110-Q314)
The Estimates
Estimates for Apple Q414 are as follows (Apple’s estimate range in brackets):
Revenue – analyst average $39.85bn ($37-40bn)
Gross Margin – 38.5% (37-38%)
EPS – analyst average $1.31 ($1.12-1.32)
Apple doesn’t predict future unit sales, so these figures all analyst estimate averages (year ago quarter figure in brackets).
iPhones – 37.8 million (33.7m)iPads – 13.1 million (14m)Macs – 4.85 million (4.57m)
Apple will release the results of its fourth fiscal quarter at 4.30PM EST (9.30PM London), this will be followed by a live conference call half an hour later.

Source: World of Apple

    

Save Mail’s email threads as one large PDF

[Original Article: Save Mail’s email threads as one large PDF • comment by: earthsaver]
I haven’t tested this in earlier versions of OS X. In Mavericks (10.9), I can select a series of messages and printing to PDF results in a single file with separate pages for each message.—
– Ben Rosenthal
MacBook Pro 2.8GHz | Mavericks
iPad 3 4G | iOS 7
iPhone 5 | iOS 7 …

Source: Mac OSX Hints