Safari Window position

My problem is that Safari never opens neatly centered within the screen. I open up and then must always click and drag to position the window correctly.
This problem also exists when I have multiple windows open. On clicking the window I wish to view it may or may not open centered within my screen. Very often it lies tucked away at the bottom of the screen with only the very top subject line evident. Again I must click and drag my window to position it correctly.
This is tedious and a waste of time. Dysfunctional and inelegant and at odds with my expectations of OS X. Any remedies much appreciated.
ibook 12 inch   Mac OS X (10.4.2)   786 RAM, 60G HD. 1.1 Processor
ibook 12 inch   Mac OS X (10.3.6)  

tell application "safari"
set the bounds of window 1 to {0, 0, 1024, 768}
end tell
(assuming you're using your native resolution)
they're more scripts here
if you're willing to plunk down $12, you can get Saft instead.
also, if you close a window after changing it, all new windows should then open the same way.

Similar Messages

  • Safari window positioning

    Anyone have any ideas what might be causing safari window to be moved from original position when opening safari. It also does it sometimes after waking it up from sleep mode and opening safari. I trashed the prefrences and seem to be ok for a couiple of days but here this morning its doin it again. Any help would be apreciated. This is for the FP iMac

    Sometimes window position problems relate to a Safari preference file problem.
    Move to the desktop the com.apple.safari plist file found in your User Account (home)/Library/Preferences folder. Restart Safari. You'll need to reset your custom preferences, plus any custom settings in the Edit (spelling) or View (status bar, bookmarks bar, custom icons etc.) menus.
    See if that improves the window remembering process.
    Tabs and Windows:
    Safari has its limitations when it comes to working with Tabs.
    I have found the best way to work with tabs is using the 3rd party plug-in SAFT.
    One of its many useful features is "always open browser window in tab". So your Video's would open in a new tab, rather than new window. Another useful feature is "warn before closing windows with tabs" - eliminates the inadvertent window close. Instead, a warning panel appears. And one of the most useful is remembering the tabs that were opened before you quit the program. Next time you open Safari, a panel appears asking if you want to reload the last sessions' tabs. Option includes deselecting one or more of them prior to the window opening.
    iMac G5 Rev C 20" 2.5gb RAM 250 gb HD/iBook G4 1.33 ghz 1.5gb RAM 40 gb HD   Mac OS X (10.4.8)   LaCie 160gb d2 HD Canon i960 printer

  • Forgetting Safari Window Position

    I am noticing a strange behavior with Safari since upgrading to Mavericks. I have two monitors, the second of which is in portrait orientation (rotated 90deg). I have safari set to always open on Display 2 :
    Safari is set to be full size using the green maximize button. If I close Safari and re-open it, it ALWAYS draws off the screen top-right and in a much smaller size (bottom of the image cropped off on purpose by me) :
    Is this a bug, or do I have a strange setting checking in a random preferences panel somewhere?
    Cheers!

    I can't say I have an answer for you, Outy, but here's something to consider that may help you fix it.
    Previously, when I had a vaguely similar issue, I discovered that the applications at fault were looking for a different screen resolution--for instance looking for native resolution when I had the screen set for about half that. As a result, the window pin point was well off to the side of the screen and, in my case off both the top and the bottom. My only first step towards fixing it was to change the screen resolution, move the window and re-pin it to the desire location before reverting the resolution back to where I needed it.
    I don't know if this would help in your case, but it might be a start in resolving it.

  • Size and position of Safari windows

    I don't think anyone's noticed the problem discussed at the end of a thread, outlined here:
    K H N Lim, "Enlarge Window Size" #3, 01:44pm Jul 28, 2005 CDT
    It's a problem a lot of people (okay, four of us) are having. Quick summary:
    "I launch Safari, resize the window and position it at the upper lefthand corner. Quit Safari and relaunch. Initially the window stays put, but after a while, the position shifts. And keeps shifting more and more toward the right of the screen with each subsequent launch."
    I've had the same problem and it makes it hard to switch from one app to another, with Safari shifting all over the screen and refusing to remember how it was positioned from launch to launch. Any ideas what's up?

    I used to be bugged by this too. Then I saw a message from someone who suggested the following applescript (with changes to coords to match your screen size and position you want). Mine is set for 1600 x 1024 resolution on my 22" cinema display. The coords are for top left corner and bottom right corner of the Safari window.
    Make a new bookmark, i.e. press COMMAND-D
    Specify that it should go in the bookmarks bar.
    Go to the bookmarks screen in Safari.
    Find the bookmark.
    Select the name (left side) and edit it to something like Window Position.
    Select the URL (right side) and paste in (without the quotes)
    "javascript:self.moveTo(190,0);self.resizeTo(1150,995)"
    Close the bookmarks window/screen.
    Click on "Window Position" in the bookmarks bar and the window will resize to specified size and position.

  • Safari opens in a different window position each time it starts.

      I have multiple desktops and my web browsers, Safari and Firefox both open in the same desktop.  If I position Firefox in a particular position, it opens in that position every time.  Safari will open wherever it wants. At the top under the menu bar one time. On the bottom of the screen the next.  Or anywhere in between.  The window size stays the same, just screen position changes. and it's totally random.  And it's the only app that does this.  It's a very minor issue but it does become annoying after awhile.  I'm running Mavericks on this computer but it does this on my Mountain Lion computers as well.  So it's had this issue for a few versions. I'm pretty sure it's only started this in the most recent versions.
    Has anyone else noticed this and if so, is there a way to get it to open in the same window position every time like it used to?

    See if deleting the cache helps..
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If that does't help, troubleshoot Safari extensions.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • Tile Safari Windows in Current Space

    Hello everyone,
    I'm trying to fix this apple script to only work on the windows in the current Space.
    --When in Safari, the coordinates {0,0} refer to the upper corner not including the menubar.
    tell application "Safari"
    -- For some reason Safari has two invisible windows
    set allWindows to (every window where visible is true)
    set n to (count of allWindows)
    -- Determine screen size of your machine
    tell application "Finder"
    set screenSize to bounds of window of desktop
    set screenWidth to item 3 of screenSize
    set screenHeight to item 4 of screenSize
    end tell
    -- Dividing by zero is bad
    if n is equal to 0 then return
    set windowWidth to screenWidth / n
    if (n > 0) then
    activate
    set x to 1
    -- Position each window in turn
    repeat
    tell window x
    set bounds to {windowWidth * (x - 1), 0, windowWidth * x, screenHeight}
    end tell
    set x to x + 1
    if x is equal to (n + 1) then exit repeat
    end repeat
    end if
    end tell
    The problem is that if I have multiple safari windows open, the variable allWindows is set to the number of safari windows in every space combined. I only want to tile the windows in the current space, and if I use this script as it is now it will tile them, but it will set their widths to allow for all windows in every space to be tiled along side. This leaves more empty space depending on how many other windows I have open.
    Does anyone know how to test how many windows are only in the current space?
    I'm terrible with Applescript, so specifics will be very much appreciated.
    Thank you.

    Hello,
    Thank you for your reply, Pierre.
    Just in case anyone is wondering, I didn't write this script, I found it somewhere online and then promptly forgot where. However, it doesn't work very well if I have other windows in other spaces, so I wanted to see if I could figure it out.
    It's still not working correctly, it seems to work the same way as before:
    --When in Safari, the coordinates {0,0} refer to the upper corner not including the menubar.
    set theTargetIDs to {}
    tell application "Safari"
    set theIDs to id of every window
    set theIDs to reverse of theIDs -- to keep the initial stacking order
    repeat with thisID in theIDs
    set index of window id thisID to 1 -- try to change the index value
    if index of window id thisID is 1 then -- the window is in the current space
    copy (thisID as number) to the beginning of theTargetIDs
    end if
    end repeat
    theTargetIDs -- from front to back - the windows that are in the current space
    set n to (count of theTargetIDs)
    -- Determine screen size of your machine
    tell application "Finder"
    set screenSize to bounds of window of desktop
    set screenWidth to item 3 of screenSize
    set screenHeight to item 4 of screenSize
    end tell
    -- Dividing by zero is bad
    if n is equal to 0 then return
    set windowWidth to screenWidth / n
    if (n > 0) then
    activate
    set x to 1
    -- Position each window in turn
    repeat
    tell window x
    set bounds to {windowWidth * (x - 1), 0, windowWidth * x, screenHeight}
    end tell
    set x to x + 1
    if x is equal to (n + 1) then exit repeat
    end repeat
    end if
    end tell
    Am I missing something? I don't think that script is selecting only the windows in the current space- it's still tiling in every space. Can you take a look?
    Sorry for my incapability to help myself. :S
    Thank you.

  • Identify a specific Safari window

    I am trying to write a script to screencapture or print a specific Safari window.
    I have 6 monitors, 1 monitor is always devoted to one Safari window that displays the same website. Other Safari windows are open as well, in addition to other applications. How do I identify the Safari window that I want to script knowing that it is in the same position with the same URL?
    Thanks in advance.

    Hi Redshark,
    Use the filter reference form:
    tell application "Safari"
    -- get reference to document by url
    set d to first document whose URL is "someurl"
    -- do something with d
    try
    set t to text of d
    on error
    display dialog "No document with that url."
    end try
    end tell
    gl,

  • Javascript Bookmark to resize Safari Windows

    Despite searching all over, I could not easily find how to keep Safari from opening new windows that were just a bit off on the left or the right sides of the screen. I had read tips about making a new window, resizing it and then closing it. Sure enough, the next new window would open with that size and position. But open a 2nd new window and Safari would position it a little bit to the right, thus leaving the scroll bars slightly off the right side of the screen.
    So I tried to find a javascript to solve this problem. Nothing did exactly what I wanted, so I have customized what I found and the following works for me:
    Step 1) Save any webpage as a bookmark to the Bookmarks Bar (Click "Bookmarks" then "Add Bookmark...", OR Click Apple-D, then choose "Bookmarks Bar", "Add").
    Step 2) Open "Bookmarks" "Show All Bookmarks", then choose "Bookmarks Bar" on the left under "COLLECTIONS".
    Step 3) Find the bookmark you added in Step 1 and change the Bookmark's name to "Resize Window to Fill screen" or whatever you want (click once on the name and after a delay click a second time, then type).
    Step 4) Change the bookmark's address to "javascript:self.moveTo(0,0);self.resizeTo(1440,screen.availHeight);" (click once on the bookmark's address and after a delay click a second time, then type or copy and paste what is inside the quotation marks above).
    Step 5) In any window, click Apple-1 and the window will resize!
    Note: I have a 17" iMac. For different size screens, just play around with the number "1440" in the javascript above. Make it larger or smaller until it is the exact size you want. Also, if you add new bookmarks to the Bookmarks bar, it may change the keyboard shortcut number for this "Resize Window" bookmark. You can always drag to reorder the bookmarks. The top ones will have keyboard shortcuts "Apple-1", "Apple-2", etc.
    Hope this helps someone else!

    This helped me, and thanks again!!

  • Forte Window Positioning

    Hi All,
    We have built a new windows based application that is anchored on the top of the screen. This application occupies very less screen space vertically, but goes all the way horizontally. As per business requirements, this window has to always stay on top, cannot be resized or minimized. This application gets invoked as soon as the user logs-in into their PC.
    When windows based applications like Internet explorer is launched while the above app is running, IE respects this boundary and stays below this desktop application, even when maximized. Forte applications do not seem to be aware of this boundary. They display behind this anchored application and hence the top bar of the window cannot be accessed. Without access to the top bar, the window cannot be moved to another position on the screen manually.
    Without changing the "Initial Position Policy" of the window, how can forte applications be made aware of this boundary.
    Any help would be greatly appreciated. Thanks in advance.
    -Madhu Epari

    Hi Gary,
    Can someone tell me whats causing my safari window when first starting up in the morning not to remember what position it was in at shut down.
    Safari remembers the last size of the window when you closed.
    * Open Safari an drag the window position to where you like it an hit the refresh button. Now quit Safari an relaunch Safari again. This will do the job.
    * Also you can use this script to expand the window size again.
    Safari script
    Good luck ...
    Dimaxum

  • Dragging items from Safari windows

    I drag items, such as images, links, text clippings, etc. from Safari windows to the Finder or to Mail all the time. There's probably a concise name for that feature, but I can't think of it at the moment. Anyway, sometimes it simply refuses to work; the item visually snaps back to its position on the page (or the address bar) as soon as I let go of it. Often, if I go elsewhere (such as, for example, here to ask a question about it) and come back later the problem is gone. Any idea what causes this? It's been going on for years, in every then-current software version, though I admit not having tried 10.6 yet.

    Sorry, I should have been clearer: the exact same thing that will drag to another window normally, sometimes won't. And then it will again later. The particular item that got me to post was the URL in the address bar; I opened a new window and found this board, then went back to the other window which I had not touched in the meantime and was able to drag the address to the desktop again. And since posting, I've found it's not limited to Safari, so perhaps this wasn't the best place to post. It's nothing serious, just really annoying.... when it happens at all.

  • Safari window will disappear if dragged from a tab to an external display

    Try opening a Safari window and add a new tab, then drag that new tab to the external display (e.g. Desktop 3) as a new window, it will disappear when you release the drag-and-drop.  I think this is a bug of Safari 7.0 on Mavericks 10.9.

    Two steps work-around:
    1) Drag the tab out to the same display.
    2) Then drag it again to another display. 
    Of course it's a bug.  Please report it to http://www.apple.com/feedback/safari.html.

  • How do you have 2 Safari windows open and show both pages simultaneously on the monitor

    How do you keep open 2 Safari windows and show both pages on monitor?

    While in Safari with your first window open go to the File menu and select New Window. That will open the second window on which you can navigate to your second web page. Resize both windows to fit on your display.

  • How to have new Safari windows open in full screen?

    Hello,
    I am wondering if it is possible to have new Safari windows take up the full screen. For example, if I click on a link that opens a new window, I would like that new window to take on the fully maximized setting of the window it came from. So even if the website code says the window has to be 50% screen real estate, I would like to be 100% every time automatically.
    Thanks.

    Welcome to the forums!
    Yet another great thing that Glims can do!
    If you want to fix your Google search to a specific Google location, I recommend that you download and install the free plug-in Glims:
    http://www.machangout.com/
    which not only does that but much more equally useful stuff! (Such as automatically deleting Flash cookies, enabling Safari to run full-screen, and more.)
    (It adds items to Safari Preferences).
    Not only does it already list a number of search engines and regions, but you can also add any other search engine not already listed in Glims by using the method described here:
    http://www.machangout.com/tutorials/addsearchengine
    Just enter the name you give the search engine in the name field, and the URL for it in the Query URL field.
    When you have it, the setting is in Glims Preferences/General

  • How to stop Acrobat trying to open PDFs in a Safari window?

    I have CS3 and when I try to look at a page with a PDF in Safari, it want to start to load I assume a acrobat reader in the safari window.
    Before I had CS3 it of course it just used preview in the Safari window.
    I have tried to search for a PDF plug in Safari, and I cant find one on the drive. But if you check plugins in Safari from the help menu it does say using Acrobat.
    What do I need to remove to stop it?

    Hi
    If it's greyed out, either the plug-in is missing, the preference file is possibly corrupt, or this is another example of how Adobe expresses its version of "creativity" on the Mac platform.
    Tongue-in-cheek aside, I don't have CS3, so I can only speculate here. Other than the possible missing plug-in, or preference file corruption, I wonder if installing Adobe Reader frees up the greyed area via Reader's preference file?

  • AppleScript: How to reload a Safari window without bring the window to the foreground while I am on other Desktop space

    I want to write an AppleScript to achive a simple task. That is, I open a Safari window on Desktop 1 and automatically reload every 30 minutes while I do my dialy work on desktop 2.
    Here is my script:
    tell application "Safari"
        activate
        tell application "System Events"
            tell process "Safari"
                keystroke "r" using {command down}
            end tell
        end tell
    end tell
    This script works. However, whenever the script is executed, my current Desktop 2 will be brought back to Desktop 1. It is distracting to my workflow.
    Is there any way to just let Safari to reload in the background without bring Safari window to foreground on Desktop 1?
    I have done a coumple of researches; many of them say I should not use "activate" in my script. I tried that but then the script will just do nothing.

    Hi, Hiroto
    your approach works perfectly fine. Thank you.
    I just found there is also a more generic approach without tweaking of javascript or any third party scripting language involed:
    #!/usr/bin/osascript
    tell application "Safari"
        set docUrl to URL of document 1
        set URL of document 1 to docUrl
    end tell
    From there, I can do a simple cron job task now.

Maybe you are looking for

  • MacBook Pro 10.10 extremely slow/unresponsive

    Problem description: MacBook Pro is very slow ever since 10.10 was installed. When waking from sleep it takes a while for the background to appear and then only half of the wallpaper will appear. Also, when using Safari, it becomes extremely unrespon

  • Can I use Ipad2 3G in Turkey with Turkish gsm?

    Can I use Ipad2 3G in Turkey with Turkish gsm?

  • Skype doesn't work on LTE

    I'm using an iPhone 5.  Skype app works definitely well on WIFI. However, when shifted to LTE network (without WIFI), it doesn't show ONLINE CONTACTS and I couldn't receive or make a skype calling even my status is ONLINE. I tried to reinstall the ap

  • Error in response

    HI have a IDOC - Soap Communication. its IDOC - BPM- SOAP. It has 3 entries in MONI. 1. IDOC - BPM 2. BPM - Soap 3. Soap- XI in the message 1, I see ackonwledgement has no errors. when I double click on this message and check for the acknowledgement,

  • Layer3 to the edge

    I have a goal of segregating some internal networks at my company.  The catalyst for this project is PCI compliance.  Internally I run two 6509-E chassis in VSS and 4507 switches in my closets.  These 4507 switches have a direct trunk link to my 6509