Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 29, 2010, 07:22 PM   #1
max.p
macrumors newbie
 
Join Date: Aug 2010
Applescript to open URL in Safari without titlebar...almost working :-)

Hi guys,

I'm trying to open an URL in Safari with applescript, and i don't want any toolbar in the opened window, actually this code almost works but it open 2 windows as the javascript is executed from document 1

I use Javascript because i dont want to have any modifications of Safari preferences, so when i close it and reopen it should not have the toolbar hidden.

Code:
tell application "Safari"
	activate
	tell document 1
		do JavaScript ("window.open('http://www.google.com','_blank','titlebar=0');")
	end tell
end tell
Does anybody knows a way to make this work or to open a window without the toolbars ?? I've tried different things but i'm stuck, so any help appreciated.

Thanks by advance,

Max

Last edited by max.p; Aug 30, 2010 at 03:11 AM.
max.p is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Major Safari annoyance: before finishing typing URL, Safari loads random page PBF OS X Mavericks (10.9) 8 Oct 2, 2013 03:17 AM
Safari open in Dashboard not working David632 iMac 2 Feb 11, 2013 10:55 AM
iTunes URL is not working Narendar Singh iPhone/iPad Programming 1 Dec 14, 2012 08:38 AM
Can't open URL in Notes app T-Mac iOS 6 7 Sep 27, 2012 02:46 PM
Creating a random number within a URL using Applescript moorbull Mac Programming 1 Jul 19, 2012 09:16 AM

Forum Jump

All times are GMT -5. The time now is 11:28 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC