Opening Safari URL in Google Chrome Script

Hi,

This script https://gist.github.com/900009 works fine on my iMac.

However, on compiling it on my MBA, I get a syntax error (“then” programmed and then nothing found) and it actually doesn’t work.

Both computer are on os x 10 7 3 with the same language system (French) and more or less the same settings.

I’m no AppleScript expert at all.
I asked several developers, nobody seems to know what’s wrong.

Note: I was suggested to use the following AppleScript instead but it doesn’t work either:

tell application "Safari" to set currentURL to URL of current tab of window 1
tell application "Google Chrome"
	activate
	if not (exists window 1) then make new window
	tell window 1
		if URL of active tab is "chrome://newtab/" then
			set URL of active tab to currentURL
		else
			make new tab with properties {URL:currentURL}
		end if
	end tell
end tell

Hope somebody can help.
Thanks.

I’m afraid it might have something to do with your language. The github script works on my iMac running Lion and on my MacBook Pro running Snow Leopard. I find it hard to believe that the MacBook Air is different.

Hi,
Thanks.

I’m not sure neither what you mean nor what the whole thing means.

Do you mean the github script may not work because my system is not in English?

If so, why does it work on the iMac running Lion and why does compiling it reports an error on the MBA running Lion too?

Both scripts run perfectly fine on my MacBook which is running Snow Leopard (10.6.8)

Yes, I can confirm that too since I’ve been running them for months on a friend’s MBA running Snow Leopard 10 6 8.

Any suggestions trying to solve the problem on an MBA with Lion would therefore be mostly appreciated.