Is there a script to position document windows?

I think it's likely that someone (Dave?) has written a script for this, but I can't find one.
I want to open (or at least reposition) document windows on my second monitor, not under the open panels on the primary display on my MacBook screen; and I'd like to find a way of doing this with keystrokes.
If a script doesn't exist, is it possible, or is there some roadblock? Should I post in the scripting forum?

I have indeed written such a script, but it is not aware of second monitors, and off the top of my head, I'm not sure how to make it aware.
Ah, it doesn't have to be aware. The bounds are relative to the total monitor space. So my script will work.
Here you go:
//DESCRIPTION: Resets active window size or uses front window to set default size.
// Check for WindowDefault.txt; if present use it to set front window
// if not, use front window to set it after checking with user.
myPath = app.activeScript;
myParts = myPath.toString().split("/");
myParts[(myParts.length - 1)] =  "WindowDefault" + app.version.slice(0,1) + ".txt";
myNewPath = myParts.join("/");
mySettingsFile = File(myNewPath);
// Before proceeding, check that there is a front window
// If not, offer user the chance to delete the current settings
if (app.windows.length < 1) {
beep();
if (confirm("No window is open; would you like to delete the settings file?")) {
  // User said yes; check that it exists
  if(mySettingsFile.exists) {
   mySettingsFile.remove();
} else {
if (mySettingsFile.open("r")) {
  savedBounds = mySettingsFile.read();
  mySettingsFile.close();
  myBounds = savedBounds.split(",");
  for (i = 0; i<myBounds.length; i++) {
   myBounds[i] = Number(myBounds[i]);
  app.windows[0].bounds = myBounds;
} else {
  beep();
  if (confirm("Settings file is missing. Use current front window to set default?")) {
   // User said: go to it.
   new File(mySettingsFile);
   mySettingsFile.open("w");
   mySettingsFile.write(app.windows[0].bounds);
   mySettingsFile.close();
Before you run the script for the first time, position a window where you want this script to position all subsequent windows. It keeps the information in a text file in the same folder as the script. You can reset the position by editing the file (that's what I often do to fine tune the position) or by running the script again with no window open.
Dave

Similar Messages

  • SAP Script :change position of window margins (resize window)

    Hi,
    how to change position of window margins (resize a window)?
    Sounds very simple, but when I open my SAPScript form in layout editing mode it does not allow me to change values of window margins...
    Regards,
    Mindaugas

    Hi...
    Make sure your entering language and orginal language of the script is same or not.
    utilities -> convert orginal language..
    Procedure if you are using English as entering language:
    Enter script name -> Enter language as DE -> change -> utiliteis -> convert orginal language -> change it DE to EN -> now back and re-enter into script...
    Thanks,
    Naveen.I

  • Is there a script to open an attachment within a PDF in a separate window?

    I have a PDF with a button to open an attachment. I know that in my preferences I can set it always open in a separate window, but not all users know to do this. Is there a script to make this happen? I have a script to open links in a separate window, but not an attachment.

    This can't be done with a script, but you can do it manually by going to
    the link you created, editing the "Go to a page in another document" action
    in it and then setting the "Open in" option to "New Window".
    This can also be done with a stand-alone tool, but that is more
    complicated, of course.

  • Document window sizing/position on opening a file

    I use a custom workspace with all the CS5 apps that I use (InDesign, Illustrator, Photoshop, and Dreamweaver), with a dual monitor setup. I prefer to have the Control bar at the bottom instead of the top and the application bar always off, so that there's nothing at the top, except the document itself. I also have the majority of the palettes open on the other monitor and a select few placed over to the right side of the primary screen.
    The problem I'm having is that document windows keep trying to open full-screen on the primary screen, instead of fitting into the workspace area for them. I keep having to resize them before I can work on them. I'm having this issue with CS5 documents running on Snow Leopard. I didn't have this issue with CS3 running on Leopard. I've tried resetting all manner of prefs, to no effect.
    Any ideas what's causing this to happen? TIA

    I tried both and at first the xlsb file was hanging but I logged off to try other things under my account then logged back on again and it opened though pretty slow. I tried from my account as well and it is very slow but does eventually open. Under the
    users account I copied the file to her desktop and it opens with no problem. The permissions are the same on all similar level folders yet the user can open Excel files from them with no problem and even larger than the problem files.
    Edit: My mistake, the green progress bar happens on other folders as well. Talking with one of the senior IT who installed the system, this user is the last person of a chain from microwave>switch and fiber link>another switch and fiber link so just
    may be a physical issue though from my experience the one folder 'seems' to have the most trouble in opening the Excel files.
    Also tried disconnecting the network drive then reclogging to let the scripts recreate it. No luck with that approach either.

  • Help! layers change position from document window to browser window

    dear all,
    i have a single page site with buttons on which when clicked on show or hide layers.
    BUT I have the age old problem in that the layers appear in a different position in the browser window
    than where I positioned them in the document window.
    Is there a fix? a plug-in?
    I am tearing my hair out over this.
    What is the use of having layers when they dont work in the end?

    First off, code is important.  If you don't post a link to the page in the question or at least the code (HTML + CSS) from the page in question all we can do is guess.
    From your statement I would suspect you are using Absolute Positioned divs and you are hoping web design is like print design and you are now realizing it is now.  Best suggestion I could give is read over the HTML and CSS tutorial at the following website:
    http://www.w3schools.com/
    Then come back here and post a link or the code from the page once you have a basic understanding.  Otherwise our answers to you be as mysterious as your code is to us at the moment.

  • How can one resize a inDesign Document Window without moving Document's position?

    I've searched high and low for an answer to this habit that inDesign has. Am I the only one that finds this annoying?
    You go to adjust the size of your document window to move it out of the way to get to something else on your desktop, and instead of keeping the document in place and just resizing the window, it moves the document with the resize. Not sure if I'm putting this in a way that people can understand me. Say I have two inDesign files open side by side and I zoom in on an area and adjust my view of the page. Then I go to the other inDesign document and adjust the view by grabbing the bottom right hand corner of the window and moving it to where I want it. The whole document then moves with it! I desire it not to, so now I have to waste time by using the hand tool to move it back into place. Illustrator doesn't act like this. Photoshop doesn't act like this. Only inDesign. Does this harken back to the PageMaker days? Am I missing a preference somewhere I need to change? Or is it just the way of things and I'm stuck with it?
    Currently using inDesign CS5 and CS6 on a Mac in OS 10.6.8

    Hi,
    The simplest would be to set the application preferences in the script.
    Like this :
    -- *** set prefs ****
    tell application "AppleWorks 6"
          activate
          set oldPrefs to its preferences
          copy oldPrefs to tPrefs
          tell tPrefs
                set old version warning to false --doesn't show the old version warning alert  
                set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
                set locked file warning to false
                set paint reduction warning to false
          end tell
          set preferences to tPrefs
    end tell
    -- *** end set prefs ****
    --**** your script, example ***
    set tfiles to choose file with multiple selections allowed
    tell application "AppleWorks 6"
          repeat with i in tfiles
                open i
                tell front document
                      -- do something
                end tell
          end repeat
    end tell
    --**** end  your script ***
    -- *** reset prefs ****
    tell application "AppleWorks 6" to set preferences to oldPrefs

  • Is there something comparable to My Documents in Windows that will allow pdf files in Quickoffice to appear?

    I have an iPad 2. I need to send pdf files from Quickoffice to my school's copy center for duplication to distribute to my students. When I click on choose files at the SUNY's copy center, I am only able to access Camera Roll and Photo Stream. Is there something comparable to My Documents in Windows that will allow pdf files in Quickoffice to appear?

    Perhaps I am not clearly stating my problem. I always used my desktop or laptop to send files that were handouts to the copy center since I do not use a textbook for one English class. Both crashed within a two-day span so until I can get one fixed, I am hoping to use the iPad. I have all my files saved as PDF files in my email. I have added the Quickoffice app and transferred next week files from school email to Quickoffice. When I access SUNY's website to send my files to be copied and click on choose file, all that is there are photos. If there is not a central location in iOS, then how would I manually sync the files in Quickoffice to whatever is allowing the photo files to appear?

  • I will soon be purchasing a new PC running Windows 7. I need to know how to migrate my iTunes Library and apple devices to the PC. Is there a previously published support document on this topic? Thank You.

    I will soon be purchasing a new PC running Windows 7. I need to know how to migrate my iTunes Library and apple devices to the PC. Is there a previously published support document on this topic? Thank You.

    Connect a blank powered external drive to the PC.
    Right click on the Disk in the File manager and choose format: exFAT 
    (if it's a XP machine, first install exFAT from Microsoft and reboot)
    navigate to your user account folders on the PC and drag and drop copy (or copy and paste) to the external drive.
    (if a program has your files, then export them out first)
    Hook up the drive to the Mac, and transfer files to the desktop or to their same appropritate folders.
    Import photo's into iPhoto program, import music into iTunes etc and they will manage those files.
    You can continue to use the external exFAT drive between Mac's and PC's
    Do not format the drive NTFS or FAT, NTFS can't be written too by the Mac and FAT can't hold over 4GB sized files.
    If you format exFAT on the Mac, it likely won't work correctly on the  PC.
    "Migration" type programs are a utter waste of time and effort between PC's and Mac's for the fact that only certain files (and no programs or anything else) will work between them, also it's a hassle and takes too long. So don't even bother with it.

  • Microsoft Office:mac 2011 want work with my script made in Microsoft Windows. May  be there is a file Problem.

    Hello!
    Two years ago i made a script with a microsoft windows PC, using "Office Word".
    Last year i changed my Hardware into apple Mac ,using Yosemite 10.10.3.
    To work on with my script with apple i use Microsoft Office:mac 2011 Home and Student, but it want work. It is deeply frozen and very very slow. Mouse is not working normally. Pages are scrolling automatically. There is a Problem in kompatilibility between the file of my script (written by using a microsoft PC) and the apple computer e.g. Office:mac.
    Someone who can help?
    Ev

    Apple support is not an expert source for Microsoft scripts, if Microsoft can't figure out their own software you'll just have to wait until someone who has had, and cured the issue.
    Sorry.

  • Is there any way to bring back the Documents window? [Android]

    I liked the Documents window in the previous version where all the PDFs of the phone was shown, plus theor source folder was indicated. Now, it's somehow troublesome to go through my phone's folders just to look for a certain file.

    Hi Leslie,
        Are you using an Android device or an iOS device? My understanding is that you are able to find local files on your device but it is painful without a consolidated list of PDF's. In addition, if you are using an Android device can you please share your Android OS version (Settings-> About Phone) with us.
    -Rahul

  • How to center selected text in document window?

    I'm using Word.select( SelectionOptions.REPLACE_WITH) to iterate through a list of words in a document. It would be handy if any off-screen selections could be automatically scrolled into the document window, as with Find/Change. Is there any way to script this?
    Thanks in advance --
    Steve

    Curiously enough, there doesn't seem to be one specific function for that (which may explain the erratic way InDesign sometimes does this). I can't remember off-hand where I saw this trick, but the following works a treat:
    app.layoutWindows[0].zoomPercentage = app.layoutWindows[0].zoomPercentage;
    -- right after your select line.

  • Minimize Document Window

    I have a script that runs fine processing multiple documents while leaving a selected document open. At various times I have to activate that document and in Photoshop 7 the document stays minimized, but in CS2 (version 9) it becomes restored.
    Is there a way to script a document window to minimize?
    Many thanks,
    Ken

    Aha,... but you see Adobe engineering is too crafty to be simply foiled by us clever little foxes.
    The shortcuts don't work. Nor will clicking in the window menu for the same commands work.
    As soon as you minimize a window in PS on a PC, it utterly and entirely disappears from PS. The document is in memory, but the window is puff gone. PS know's where it was, and will restore it when instructed to by the OS. But PS itself has 0% knowledge of a "window" once you minimize it, nor any means within PS to retrieve it. You have to go outside and access it from the OS.
    I get the sneaking suspicion that the committee meeting dealing with this change in operation had something to do with jettisoning window frame management to the OS. On macs it's ok, because after all, what designer designs on something other than a mac amirte?
    On PC's it's no bueno. Because, Bill Gates? /shrugs
    Can I pay Adobe to just give me an update version of PS 7.5 ? That... would be so awesome. I guess right after I get all the kids off my lawn. lol
    Thanks everyone.
    Aero it is

  • Expand document window to always have Nice Gray border around image

    Is there a command, or an Apple Script, or a hack of some sort (which I can assign to a function key) to EXPAND a document window so that I have a 100 pixel (or whatever) gray border around the image itself (not IN the image).
    I am processing around 4,000 pictures, and it would save me hand-drag-enlarging Every Single Window, especially as I often miss the grow-tab in the lower-right edge of the window bezel...
    Thanks!

    "Just keep pressing the 'F' key..."
    Yes, this is what I said above, and if you have multiple documents, it's a REAL PAIN.
    Perhaps if the 'F' key had only two modes, instead of four, it would be acceptable.
    As it is now, with multiple documents, the 'F' is just as bad as dragging the window enlarge tab.
    I've been asking Adobe for this for at least five years now. Given that many tools are best used when started OUTSIDE the image, I cannot understand how they could ignore this request !
    (Rant: Unless, of course, if user requests are treated internally as insults by Adobe. It sure feels that way)

  • Is there a script that it can make Overflow text automatically routed Next?(Not the main text frame)

    Is there a script that it can make Overflow text automatically routed Next?(Not the main text frame)
    when I run the scrip,Overflow text can auto Typesetting to the next page?
    thankS Supreme~

    Here's the script I use. Notice the complications getting the live area when other than rulers per spread is employed. The script automatically selects the final selection point in the story and moves to that page in the active window.
    //DESCRIPTION: Autoflow selected overset story
    (function(){
              if (app.documents.length > 0
                                  && app.selection.length == 1
                                  && app.selection[0].hasOwnProperty("parentStory")
                                  && app.selection[0].parentStory.overflows) {
                        app.doScript(fixOverset, undefined, app.selection[0].parentStory, UndoModes.entireScript, "Fix Overset");
              } else {
                        alert("There must be a selection that identifies the overset story.");
              function fixOverset(story) {
                        while (story.overflows) {
                                  var aDoc = story.parent;
                                  var lastTF = story.textContainers.pop();
                                  var lastPage = lastTF.parentPage;
                                  if (lastPage instanceof Page == false) {
                                            alert("Story ends on pasteboard; no action taken.");
                                            return;
                                  var master = lastPage.appliedMaster;
                                  var newPage = aDoc.pages.add(LocationOptions.after, lastPage);
                                  newPage.appliedMaster = master; // may not be necessary
                                  var liveArea = getLiveBounds(newPage);
                                  var newTF = newPage.textFrames.add({geometricBounds : liveArea, layer : lastTF.itemLayer});
                                  newTF.previousTextFrame = lastTF;
                                  if (newTF.insertionPoints.length == 0
                                                      && lastTF.insertionPoints.length == 0) {
                                            // allows for paragraph style with startParagraph on specific page side
                                            alert("Story is permanently overset.");
                                            return;
                        selectIt(story.insertionPoints[-1]);
              function getLiveBounds(page) {
                        var rO = page.parent.parent.viewPreferences.rulerOrigin;
                        var bounds = page.bounds;
                        if (rO == RulerOrigin.spreadOrigin) return returnBounds(page, bounds);
                        var width = bounds[3] - bounds[1];
                        if (rO == RulerOrigin.spineOrigin &&
                                            (page.side == PageSideOptions.leftHand ||
                                                      (page.side == PageSideOptions.rightHand &&
                                                                page.parent.pages.length > 1)) ||
                                  (rO == RulerOrigin.pageOrigin &&
                                            page.side == PageSideOptions.rightHand &&
                                                      page.parent.pages.length > 1)) {
                                            bounds[1] = bounds[1] - width;
                                            bounds[3] = bounds[3] - width;
                        return returnBounds(page, bounds);
                        function returnBounds(page, bounds) {
                                  return [
                                            page.marginPreferences.top,
                                            page.side == PageSideOptions.leftHand ?
                                                      bounds[1] + page.marginPreferences.right :
                                                      bounds[1] + page.marginPreferences.left,
                                            bounds[2] - page.marginPreferences.bottom,
                                            page.side == PageSideOptions.leftHand ?
                                                      bounds[3] - page.marginPreferences.left :
                                                      bounds[3] - page.marginPreferences.right
               function selectIt(theObj) {
                        var myZoom = app.activeWindow.zoomPercentage;
                        app.select(theObj);
                        app.activeWindow.zoom(ZoomOptions.fitPage);
                        app.activeWindow.zoomPercentage = myZoom;

  • Download scripts, prompts and documents from UCCX 8.0.2

    Is there any way to download scripts, prompts and documents from an UCCX 8.0.2
    I want to download these files from our production server and upload to an lab server that is running UCCX 8.5

    I tried that but I only get the message:
    $tar -xvf 2011-11-11-01-03-05_SESTHCC1CCX002_UCCX_SYSLOGAGT.tar
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Read 207 bytes from 2011-11-11-01-03-05_SESTHCC1CCX002_UCCX_SYSLOGAGT.tar
    tar: Error exit delayed from previous errors
    Same thing if I copy the TAR file to my windows PC, tar doesn't recognize it as a tar file and isn't able to extract it.
    No problem to restore the files to the original server.

Maybe you are looking for