The Traverse City Macintosh User Group

CherryMUG


Archive for the ‘Tips’


Twitter Tip – Ellipsis 0

Posted on January 09, 2010 by Richard Hoadley

This really isn’t a Mac thing, but I thought some of you would find it helpful.

Having that 140 character limit in Twitter makes every character important. Often people will have the first few words from a site that they are linking to followed by ellipsis. An ellipsis is usually indicating that there is more to be read. Usually, it is a set of three dots. Most of the time when I see them used in Twitter they are three periods, like this…

However, there is a better way. Every computer, iPhone, iPod Touch, and I’m guessing other smart phones can create an ellipsis. What is the advantage to this? Three periods take up three characters, an ellipsis only takes one. That may not sound like much, but when you are squeezing text and links into 140 characters it can make a difference.

The key command is pretty simple:
Mac OS: option + ; (that is holding down the “option” key and pressing the semicolon)
Windows: ALT + 0133
iPhone: press and hold the “.?123″ button. That will change the keyboard to the numbers and punctuation. While still holding down that button move your finger to the period (.) (IMPORTANT: don’t lift your finger from the screen for this trick to work.). Keep holding your finger over the (.) button, and it will change so that it shows the period and next to it the ellipsis. Move your finger to the ellipsis, now lift your finger. The ellipsis will now be in your text.

I don’t know if the other smart phones have a similar option. I’m guessing that they do. If one of you knows, please let me know, and I will add that to this tip.

Here is a good blog post about what an ellipsis is: http://www.canistercreative.com/newsletter/april_09/dotdotdot.html

I hope you found this helpful.

Post to Twitter

An AppleScript Tip 0

Posted on July 28, 2009 by Rick Stringer

One of the best kept secrets of the Mac is AppleScript. For those of you who don’t know what that is, AppleScript is a language for automating many actions on the Macintosh. You can use it for copying, deleting, modifying files and folders, automating just about any repetitious task, and so much more. It is built-in to every Macintosh computer. If you are running a Mac, you have AppleScript.

I’m not going to try to teach you AppleScript here. For that you should look into getting the best AppleScript book I’ve seen yet. That book is “Apple Training Series: AppleScript 1-2-3” by Sal Soghoian and Bill Cheesman. If you really want to learn how to use AppleScipt then get that book. Sal and Bill know their stuff.

I’m going to show you two simple AppleScripts that I’ve found to be useful, (sorry Windows users, this is a Mac only tip). The first one will find out the “bounds” of a Finder window and the second one will set the “bounds” of a Finder window. You may be asking, “Wait, what the heck does that mean?” It is quite simple really. As you all know you can move the various windows around on your screen and resize them. If you don’t know that much, then this is already beyond what you know about the computer, and you need to get back to the very basics of how to use your computer. The Bounds Property is what tells your Mac where it should position a window, and exactly what size that window should be.

In order to write an AppleScript, you need to open the Script Edior application. You will find it in the AppleScript folder inside your Applications folder.

Go ahead and open Script Editor. The Script Editor window is pretty simple. The script window has two panes. The top pane is the place where you are going to put your script.

The first thing we should do is open a Finder window and position it near the middle of your screen. For this demonstration, it really doesn’t matter where the window is on your screen. Once we go through this you will know how to set the position of this window anywhere that you want it to be.

OK, here is one very important concept. The “Front Finder Window” is whatever Finder window is active at the moment. Let’s get the bounds of that window that we just opened. You did open a Finder Window right?

Now go back to the Script Editor and type the following into the top pane:

tell application "Finder" to get the bounds of the front window

Now, either hit the “enter” key or click on the “Compile” button in the top bar of the Script Editor window. If you typed it all in correctly you should see Script Editor reformat your text to look something like this:

tell application “Finder” to get the bounds of the front window

Now, click the “Run” button. In the lower frame of the Script Editor you should now see a four-item list of integers. These represent the “bounds” of the window. It should look something like this: {1462,120,1663,559}.

Congratulations! You just wrote an AppleScript.

So, what do those numbers mean?

  • {1462,120,1663,559} The distance in pixels from the left side of the screen to the left side of the Finder window.
  • {1462,120,1663,559} The distance in pixels from the top of the screen to the top of the Finder window.
  • {1462,120,1663,559} The distance in pixels from the left side of the screen to the right side of the Finder window.
  • {1462,120,1663,559} The distance in pixels from the top of the screen to the bottom of the Finder window.

Let’s try something. Go to that Finder window and move it around a bit. Change the size. Now, run the script again. See how those numbers changed? Do you see the possibilities in just this one script? Save the script. Give it an easy name to remember, like “GetBounds.” The “File Format” should be “Script.” We can explore the other options another time.

OK, so we have a script that will tell us where the front window is, and how big it is. What good does that do us? We can use that to setup our windows up exactly the way that we want them to be. Go back to your Finder window and position it exactly how you would like it to be. Then open up your GetBounds script that you saved and run it. In the lower frame you will see the list of integers that define that window’s position. Select those numbers, including the brackets and copy them.

Now, create a new script using the Script Editor. In the script window type this:

tell application "Finder" set the bounds of the front window to (Here is where you paste in your numbers that you just copied.)

Compile the script. Your completed script should look something like this:

tell application “Finder” to set the bounds of the front window to {13, 160, 1718, 1141}

You can now save this script and run it anytime that you want to set the window to that size.

Here is an example of how that script combined with other elements in a more complicated script could setup your Finder with four windows that are neatly placed on your screen:

tell application “Finder”

set the current view of the first window to column view

set the bounds of the first window to {12, 161, 856, 618}

if second window exists then

select the second window

set the current view of the front window to column view

set the bounds of the front window to {12, 644, 856, 1146}

else

open folder “Favorites” of folder “Library” of home

set the current view of the front window to column view

set the bounds of the front window to {12, 644, 856, 1146}

end if

if third window exists then

select the third window

set the current view of the front window to column view

set the bounds of the front window to {857, 161, 1725, 618}

else

open folder “Documents” of home

set the current view of the front window to column view

set the bounds of the front window to {857, 161, 1725, 618}

end if

if fourth window exists then

select the fourth window

set the current view of the front window to column view

set the bounds of the front window to {857, 644, 1725, 1146}

else

open home

set the current view of the front window to column view

set the bounds of the front window to {857, 644, 1725, 1146}

end if

end tell

You can save this script as an application and put it in your Doc, or anyplace you want on your computer. It can be setup as a startup item. There are so many ways that you can use AppleScript.

I hope this sparked some ideas for you. If you want to learn more about AppleScript, then do check out “Apple Training Series: AppleScript 1-2-3” by Sal Soghoian and Bill Cheesman. It will be well worth it.

Post to Twitter



↑ Top