brentvardy.com
Sidebar

Applescript to start safari with tabs

Applescript to start safari with tabs
My preferred browser on the mac is Apple’s Safari, however there is a feature on Firefox I do miss on Safari. I really like how Firefox remembers any tabs you have open with web pages you are browsing so that the next time you open up Firefox the tabs automatically reload. To try and imitate this I’ve written a small AppleScript script which if used to open Safari will do so and load some pre-defined web pages each in a new tab. I use the script with Safari version 4 but I’m sure it will also work with previous versions. Let me know if this is not the case. Here’s the script:


-- Applescript to open Safari and preload tabs with specific URLS

-- Enter the URL for Tab 1-3
set Tab1_url to "http://www.newsgator.com"
set Tab2_url to "http://www.twitter.com"
set Tab3_url to "http://www.challengelogic.net"

-- Tell Safari to ope the new Tabs as specified

tell application "Safari"
activate
set the URL of document 1 to Tab1_url
my open_tab()
set the URL of document 1 to Tab2_url
my open_tab()
set the URL of document 1 to Tab3_url
my open_tab()
end tell

-- Subroutine to open a new tab

on open_tab()
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
end open_tab



As you can see this script opens 3 web pages in new tabs, hopefully you can see how easy it would be to add additional code to open up even more sites as required. There is a slight problem with the script and that is you must set Safari so that new windows open with something other than the top sites page. I’m currently fairy new to Applescript but will try and fix this in a future version when I have more time. There may also be a better way of doing this. Until they feel free to try out my script at your peril :).

View Comments|Add Comment


Read More...

Airfoil: A rocking app..

Airfoil
I’ve been using my Airport Express to listen to music through iTunes on my HiFi system but have been thinking to myself how great it would be if I could use the Airport Express to listen to any audio output from all my applications and not just iTunes.

I stumpled on to this great application about a week ago by chance. Developed by Rogue Amoeba , their Airfoil application does exactly what it says on the tin and based on a weeks use does it very well. It took me all of 10 minutes of using the free trial download to realise it was the perfect solution to my needs and purchased straight away.

All I can say is if you have an Airport Express you need to go over to the Rogue Amoeba website and buy this application now, and as a bonus it costs just $25.

View Comments|Add Comment

Read More...

This made me chuckle

A colleague forwarded this quote yesterday which made me a have a little chuckle to myself so I thought I would share with you all.

Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"

To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

View Comments|Add Comment

Read More...

Getting the whole picture

It’s becoming more and more common when online to come across cut down URL’s similar to http://tinyurl.com/pv9tge provided by web sites like tinyurl.com. The idea is that you paste any long and not so user friendly URL into their online tool and they provide you with a smaller one. This is great for services such as twitter which only allows 140 characters per post and a URL you may want to share via twitter could actually be more that 140 characters. So I guess you could say this is a great tool.

The only issue I have with these services is that potentially spammers and hackers could abuse these tools. My concern is that when you see one of these shortened URLs you have no way of deciding whether or not the link will take you to a safe website or not. For all you know the link could direct you to a web site that runs some dangerous script when you navigate to it.

It’s not all bad news, I was visiting the tinyurl.com site today and noticed they offer a ‘preview’ version of their URLS. Basically by appending preview to the beginning of the URL, instead of going direct to the destination you are take to the tinyurl.com site and notified the actual full URL so that you can decided to proceed to the site or not. The screen shot below shows the output from appending preview to the tinyurl example shown earlier, http://preview.tinyurl.com/pv9tge.

http://preview.tinyurl.com/pv9tge

As you can see from above http://tinyurl.com/pv9tge is actually safe and simply takes you to one of my previous blog postings. But at least by using this feature for any tinyurl.com urls you get you have the opportunity to decide for yourself.

View Comments|Add Comment

Read More...

I wish I could do this!



I love getting out on my Mountain bike, and when possible you’ll find me exploring Sherwood Pines. I just wish I had the skill of this guy. You just have to watch it to believe it. Enjoy.

View Comments|Add Comment

Read More...

Dissapointed in O2

which-iphone-3gs-20090608
Last night having just finsished listening (via twit live) to the Keynote at the Apple WWDC I was excited about the new iPhone 3Gs and started planning my upgrade from my existing iPhone 3G.  All I needed to know was the costs and the date the new phone would be available in the UK.  Both these pieces came to me along with huge dissapointment this morning. You see I have 8 months remaining on my current O2 iPhone contract.  The deal from O2 is that if I want to upgrade to the new model I would need to end my existing contract at 8x£35 (£280) I will then need to purchase the new phone at £185/£88 and sign up for a new contract (18 or 24 months) at £35 per month.  Not much of an incentive for existing and loyal customers.  

But what is really annoying to me is that by not providing any reasonable upgrade path, in my case O2 are potentially loosing money.  Let me explain.  If I was to upgrade to the new iPhone I would most likely be expected to pay a fee for the new phone, let's say the £185/£88 and also take out a new 18/24 month contract. However I would then immediatley donate my current iPhone 3G to my dear wife and take out an additional 18/24 month contract so that she can use the old phone.  However based on the current upgrade options (or should I say lack of?) I am not likely to upgrade, and may also consider jailbreaking my current phone in 8 months time and saying goodbye to O2 . Instead O2 could have had £185/£88 from me, another 18/24 months of £35 and a second (totally new customer) 18/24 month contract of £30/35 per month without even having to issue a new phone to my wife, the new customer. I may even have handed back my T-Mobile mobile broadband and moved to O2 for and extra £15 per month to use the 'thether' function on the new iPhone.If you have any thoughts/feeings regarding upgrading please let me know.

View Comments|Add Comment

Read More...

iPhone Aware

IMG_0007
I can’t believe I forgot to mention in my last post that my new site theme is actually aware of what device is being used to view the site and if it happens to be an iPhone then the users gets delivered an iPhone specific version of the site. I know sites do look great using the mobile version of safari but I’m hoping my new site will improve performance when being visited using the iPhone and also make the site much easier to read and navigate on the smaller screen.

View Comments|Add Comment

Read More...

Wot no Brent!!

It’s been over a year since I last posted, wow can you believe it? It certainly doesn’t feel that long, I guess time moves so quickly these days! I’m not posting to apologise for the lack of posts, as I don’t think there is any point. I’ve been busy with work, and that’s all I have to say on the matter.

Hope you like the new site theme? There are still some tweaks to finish it off but I’m feeling motivated again so hopefully they will be finished off and also for the same reason you should find me posting more often. In addition to this, my personal site, I’ve also been working offline on a new project, which hopefully you should get to see around August/September this year. I’m not going to give much away right now, but it will be Apple Mac related. As I get closer to the launch date I will start to post more details and project updates here.

Back to this site, I’ve created a DISQUS account which I have decided to use as my comments service for the site. You will only be able to add comments to this and future posts. So far I’ve not added the functionality to older posts, thats not to say I won’t in the future, but for the moment I’m undecided. I’d really appreciate some comments from you on your thoughts about the new site theme.

@brentvardy

Are you on twitter? If not why not? If you are please add me to your list of follows as I will be using twitter to send out updates about the site and also for the new project when I’m ready to start talking about it. My twitter name is brentvardy.

View Comments|Add Comment



Read More...