Monday, July 25, 2011

A Simple AppleScripting Tutorial



Among other things, I enjoy AppleScripting. AppleScript is a coding language built into Apple operating systems since OS 7 in 1993. It is used to control and exchange data with applications. Although AppleScript has limited processing power, its main job is to interact with already-built applications to increase efficiency by performing repetitive
tasks. And no, you PC users can't use it.
So, what can you do with AppleScripts? Well, open up AppleScript Editor (Script Editor on OS X systems before Snow Leopard 10.6). It's in Applications>AppleScript>. Here's a very simple example of AppleScripting.
display dialog "Hello World!"


This will display a window like this:
To customize the window, you can add buttons:
display dialog "Hello World!" buttons {"Hi!", "Bye"}
This will display this:

Notice that neither of the buttons are highlighted blue. You can fix that by adding this:
display dialog "Hello World!" buttons {"Hi!", "Bye"} default button 2
Now it looks like this:
You can change the default button by changing the default button number. The number go from left to right, with the leftmost button being 1, etc.
Another cool thing you can add to a dialog box is an icon.
display dialog "Hello World!" buttons {"Hi!", "Bye"} default button 2 with icon 1
display dialog "Hello World!" buttons {"Hi!", "Bye"} default button 2 with icon 2
Icon 1:

Icon 2:
I also found another way to add icons to a dialog here. Very cool!
If you want to find out more about AppleScripting, check out the Apple Developer documentation here and here. Macscripter is also another good place to get information. I will probably be posting more stuff on AppleScripting, including some more complex coding.

-- Matthew

Saturday, July 23, 2011

Mac OS X Lion


Mac OS X Lion icons

As all of you Mac fans out there already know, Mac OS 10.7 Lion was released on Wednesday, July 20, 2011, changing the way the Mac works and looks. It has incorporated many of the features of iOS, including Lauchpad a new application launcher that acts and looks like the iOS home page. I am also really looking forward to the multi-touch gestures, which bring iOS-like gestures, such as pinch to zoom, swiping, and scrolling. I was at the Apple Store a couple of days ago, and I played around a little with Lion. I was really impressed with Mission Control. By using three fingers on the trackpad and swiping to the right or left, you can swipe through all your open full-screen applications.






But the two features which I am most looking forward to are Airdrop and Screen Sharing. But let me take them one at a time. Airdrop allows you t o wirelessly send files to any Mac on the local network, just by dragging-and-dropping. File sharing doesn't get any easier that Airdrop. There is no setup required, just drag-and-drop. I know that I'll use this one all the time. Screen Sharing (which I also use all the time) has received a major update for Lion. Now a person can be using a Mac, and another person can log into the same Mac with a different user account and see their desktop and files, without interrupting the other person. I know I'll use this one quite a bit, too. I found this online. It's an application compatibility table for Lion. Unfortunately, not all applications support Lion. Lion does not have Rosetta, which means it can't run PowerPc applications. I am really (Really!!) hoping Apple will put this feature back into OS X. I use so many applications that are PowerPc, that it may be awhile before I completely switch over to Lion. In my opinion, Lion is the biggest upgrade since OS 10.1 came out. I am really looking forward to using this state-of-the-art operating system.

-- Matthew




Fulfer Law Office



This is a site that I didn't actually do any work on, but I watched Mr. Bunney get it up. Richard L. Fulfer is a California Attorney who has successfully practiced law since 1980. He has followed in his father's law practice and has faithfully served Stanislaus and San Joaquin County for 31 years.

The Buyr Sites

This is a group of sites that I have been working on with Mr. Bunney. These sites are shopping comparison sites, like Shopzilla and PriceGrabber. They are built with special SEO tatics that in the long run should put us on page one of Google searches. We will eventually have 30 or so sites up, but right now we only have 20. TvBuyr.com had the most pages indexed by Google, but it has recently taken a downturn. As of today, it has 30K indexed pages. Right behind TvBuyr is ShoeBuyr.com at 18.5K indexed pages.


The past few weeks I have been working on incorporating a new design into FurnitureBuyr.com. I didn't actually do the design of the website, but I took CSS and HTML files and put them into FurnitureBuyr to give it a more polished and sleek design. I have really enjoyed doing this face-lift of FurnitureBuyr. I have learned a lot of stuff.
Here are some links to the sites:

Hello To All!

Hello!
This blog is for miscellaneous posts about computer stuff. I will also be posting about some of the websites I am working on with Nathan Bunney I am currently interning with him.
MSD