Moving Application Windows in OS X via Apple Script

May 8th, 2008

Those of you lucky enough to have multiple monitors hooked up to you MacBook or MacBook Pro when you work may have come across this issue. When you remove that extra monitor some applications don't get re-positioned back on to your laptop display. I had this with one particular application that I use frequently, KeePassX. Well somewhere along the way I dug up this use full terminal/apple script that solves the issue.

  1.  
  2. property processesToIgnore : {}
  3. tell application "Finder"
  4. set _b to bounds of window of desktop
  5. set screen_width to item 3 of _b
  6. set screen_height to item 4 of _b
  7. end tell
  8. tell application "System Events"
  9. set allProcesses to application processes
  10. set _results to ""
  11. repeat with i from 1 to count allProcesses
  12. set doIt to 1
  13. repeat with z from 1 to count processesToIgnore
  14. if process i = process (item z of processesToIgnore) then
  15. set doIt to 0
  16. end if
  17. end repeat
  18. if doIt = 1 then
  19. tell process i
  20. repeat with x from 1 to (count windows)
  21. set winPos to position of window x
  22. set _x to item 1 of winPos
  23. set _y to item 2 of winPos
  24. if (_x < 0 or _y < 0 or _x > screen_width or _y > screen_height) then
  25. set position of window x to {0, 22}
  26. end if
  27. end repeat
  28. end tell
  29. end if
  30. end repeat
  31. end tell
  32.  

I don't recall where I may have dug this up, but if you think you know, please let me know in the comments so I can give credit.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

RIA + OSP = RAA || REA && And how to detect an Open Screen Device

May 6th, 2008

Keeping with the algebraic/code functions as titles from my Last post I thought I would put some thoughts down regarding the news from Adobe earlier this week of their Open Screen Project (OSP). Anyone working in the Web/Internet industry at the moment will be well aware of the Rich Internet/Interactive Application (RIA) moniker. What Adobe is committing to is much larger though this is about true cross platform convergence. Its about Rich Anywhere Applications (RAA) or Rich Everywhere Applications (REA) if you will. You see what I did there ;) .

Interestingly this is a concept I began to scratched the surface of with my presentation at Flash On the Beach Last Year, and over the last few months has been a subject I have continued to keep close to hand both in my day job and my personal development projects. At the moment the Flash Player Fragmentation offers a considerable challenge to any developer wanting to design and or develop for multiple devices and multiple screens.

Articles like the one posted over at ADC on adaptive screen layouts offer a great foot up. But before we get to visual display we need to know what player version we are targeting. And to do that, we have to hit the time machine button and roll back all the way to Flash 4.....

Read the rest of this entry »

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

DVI != DVI

May 1st, 2008

A few weeks ago as I was preparing to present at the OnAir event I had a rather untimely hardware failure on my Apple MacBook Pro. As a result I had to rather hastily prep my wife's MacBook Black to present from. One of the preparations was to make sure I would be able to connect the machine to a projector, as any apple laptop owner will know its important to carry a DVI to VGA connector at all times.

However the MackBook black uses the mini DVI connector, as a result I thought it would be a snap to just pick up a Mini DVI to CVI connector, and then from there I could use the DVI to VGA connector I already own. Not so. Despite the packaging suggesting otherwise, the DVI result from the apple mini DVI connector is not a standard DVI out. There are 4 pins "missing". The pictures Below explain better.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

AppleScript Fix for Error 51: Unable to communicate with the VPN subsystem on Cisco 3000 VPN Client

April 10th, 2008

Over at Ian Talks Tech my friend Macca recently posted a fix for the "Error 51 : Unable to communicate with the VPN subsystem" error from a cisco vpn client. I had also encountered the same problem some time ago and it brought my own memories rushing back. I had initially discovered a fix for the error 51 problem over at a different site, Anders.com . Since finding the one line terminal command answer to the issue that my cisco 3000 client had thrown up I thought no more of it. Ian's post jogged my memory about my own search and I immediately put my copy and paste skills to good use to come up with an apple script that you can run to fix this cisco vpn client error.

All you need to do is open the apple script editor.

"/Applications/AppleScript/Script Editor.app"

Then paste a similar line of code to the commands that Macca and Anders mentioned:

  1. do shell script "ifconfig fw0 down" with administrator privileges
  2. do shell script "ifconfig fw0 up" with administrator privileges and password
  3. do shell script "/System/Library/StartupItems/CiscoVPN/CiscoVPN restart" with administrator privileges and password

Feel free to run the apple script to test it, just note you will be asked for an administrator password for the script to run.

Once you are happy you should compile and save the script to keep it safe, or "save as" and choose application. Alternatively, you could just download the AppleScript Fix for the "Error 51: Unable to communicate with the VPN subsystem" problem, that I have pre compiled as an application.

Credit where its due.
Ian Talks Tech for jogging the grey matter.
Anders.com for solving my problems when I had them.
Apple for showing me how to do shell scripts in Apple Script.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

BitTube Goes Over the Air

April 1st, 2008

Thats right, its all very last minute but I will be presenting a session at the upcoming Over the Air event in London this week.

My session is scheduled for Friday afternoon.

Flash Video Nokia Masterclass - Dave Williamson (Adobe)Learn how to create live video applications with the most popular online video format on Nokia devices.

Over the Air is all sold out now, but you can find all the information about the event over at the Over the Air Blog

I look forward to catching up with you if you are there.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

Nokia N95 Firmware Update to 21.0.016 and adds FlashLite 3 Support

March 27th, 2008

As many people will have seen yesterday Nokia release a fairly major update to the N95 firmware. One of the major bonuses for flash developers is the inclusion of FlashLite 3 as standard onto the device, both as a standalone player and within the browser. For those using detection scripts the player version reported in the browser is:

PlayerVersion: FL 8,1,55,0

You can see a FlashLite version test movie here..

Related to this I found myself in the situation where the Nokia Software Updater would not allow me to install the new firm ware, my t-mobile branded phone was just such a device. A quick search and it seems that devices on certain service providers are locked from the update. However there are always round such restrictions. Below is how to modify your Nokia N95 product code so that it is unlocked for applying new firmware updates.

WARNING THIS PROCESS MAY BRICK YOUR PHONE, VOID YOUR WARRANTY AND ANY NUMBER OF OTHER TERRIBLE THINGS. DO NOT DO THIS IF YOU ARE IN ANYWAY UNSURE OF THE CONSEQUENCES. I ACCEPT NO RESPONSIBILITY FOR ANY NASTY THINGS THAT HAPPEN TO YOU, YOUR DEVICE OR ANY ACTION YOUR SERVICE PROVIDER TAKES AFTER FOLLOWING THESE LINKS AND INSTRUCTIONS

That said, I only had one minor hiccup in the whole process, and it seems I am not the only one to have experienced it. I for got to mention that to Mike on MSN :D

Right with that out the way, on to the fun.

1. First off BACK UP YOUR DEVICE! make sure you have a back up of the memory card and also the device memory.
2. In order to install the new 21.0.016 firmware you will also want to make sure you have the following software.

* Download the latest version of Nokia PC Suite.
* Download the Nemesis Service Suite.

3. Next read this post, it provides a list of the available product codes for the N95.
4. Finally you should make sure you read this post, it covers how to update the product code on the N95.

As I began to progress through the steps outlined on changing the product code of my Nokia N95 mobile phone there were a couple of items where I was left to 'take a leap of faith'.

  1. When installing Nemesis Service Suite I left the device connection as the default virtual USB device. And that seemed to be the right thing to do.
  2. When deciding on a new product code for the device I chose the one for EURO1 Plum, this appears to have worked fine for my location and device. I have a silver/grey Nokia N95 and am based in the UK.

Once the product code was updated on the mobile phone the Nokia Software Updater worked fine to allow me to upgrade to the latest 21.0.016 firmware.

Curse my slow blogging skills, beat to the post. :D

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

Adobe CEO: We’re bringing Flash to the iPhone!

March 19th, 2008

This just popped into my news reader from ZDNet.

Well, you really believe that Flash is synonymous with the internet and frankly, anybody who wants to browse the web and experience the web's glory really needs Flash support. We were very excited about the announcement from Windows Mobile, adoption of Flash on their devices and the fact that we've shipped 0.5 billion devices now, non-PC devices. So we are also committed to bringing the Flash experience to the iPhone and we will work with Apple. We've evaluated the SDK, we can now start to develop the Flash player ourselves and we think it benefits our joint customers. So we want to work with Apple to bring that capability to the device.

If the mountain wont move to you..

Go Adobe!

Read the full ZDnet article here
Read the SeekingAlpha transcript here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

Sneak Peak of WordPress 2.5 available for download

March 18th, 2008

Anyone looking in the WordPress dashboard today will see the news that there is a sneak peak of the WordPress 2.5 Release Candidate 1 availible. From the dashboard comments this new version of WordPress will feature.

A customizable dashboard, multi-file upload, built-in galleries, one-click plugin upgrades, tag management, built-in Gravatars, full text feeds, and faster load times

If you are interested in giving the release candidate a test run, probably in a test environment I would think at this stage, You can download WordPress 2.5 here.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

Microsoft has licensed Flash Lite 3 and Reader LE for future Windows Mobile based devices

March 17th, 2008

More exciting news on the future of FlashLite 3 proliferation. Bill Perry has a great explanation of how the news that Microsoft has licensed Flash Lite 3 and Reader LE for future Windows Mobile based devices will affect FlashLite 3 content developers.

Read the Full Press Release here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

Adobe Photoshop Lightroom 1.4 and Camera Raw 4.4 updates

March 14th, 2008

[[** UPDATE **]]
Currently the Lightroom 1.4 update has been recalled after bugs were discovered all links to the Lightroom 1.4 update are redirected to the older 1.31 update for now. As per the comments from Adobe, you should avoid installing the Lightroom 1.4 update until a newer 1.41 update is availible that fixes these bugs Thanks for bringing this to my attention in the comments.
[[** UPDATE **]]

The Lightroom team have posted an announcement that Lightroom and Camera Raw have both been updated. According to the post the update wont filter through the Adobe Update system until next week, so if you want to get the update early you can find them on the adobe site and download them manually.

download Lightroom 1.4 Update for Macintosh
download Lightroom 1.4 Update for Windows
download Camera Raw 4.4 Update for Macintosh
download Camera Raw 4.4 Update for Windows

The full post detailing the changes in the updates to Lightroom and Camera Raw are here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • Facebook
  • Google
  • TwitThis
  • e-mail
  • Pownce

How to create a portable, cross platform encrypted drive using TrueCrypt

March 10th, 2008

I posted a few days ago regarding the release of the new Macintosh OS X version of