[JS, CS4] Document window resizing

Hello all
Having trouble re-sizing the main document window with the below script fragment. Used to work perfectly in CS3. In CS4, if the document window is maximised and then the script is run, it works: it makes the window smaller. If the doc window is smaller than the maximum size and the script is run, it maximises the doc window: it doesn't make it the size specified in the script. In other words, every second time the script is run it works; the other times, it maximises the doc window. Have tried using smaller values for the win size, but doesn't matter what the values are.
Any idea what's going wrong? It's a bit of an annoying glitch for me ...
===
const left = 0;  const top = 50; const right = 200; const bottom = 200;
win = doc.layoutWindows[0];
var bounds = win.bounds;
bounds[0] = top;   bounds[1] = left;   bounds[2] = bottom;   bounds[3] = right;
win.bounds = bounds;
===
I've tried making the above variable win point to app.activeWindow instead -- still doesn't work.
Hope someone can help...
Paul

Don't know why, your code seemed very similar to mine
Paul, its your code.
I have just added one condition
if (win.bounds != top+ "," + left +  "," + bottom + "," + right)
if window bounds not equal to which one you want then below code execute
win.bounds = [top, left, bottom, right];
else nothing change with window bound.
Shonky

Similar Messages

  • Why wont panel float into ID CS4 document window?

    I have a strange situation arise in last several weeks. The toolbar and the panels will float but grey out when over the document window. If released they disappear and can be found on the Windows screen, not in the ID window where they should be. Panels will expand OK but its very frustrating not to be able to place them on the document window. I am using Windows 7 64 bit and ID has been updated to 6.0.5. Interestingly I downloaded the trial version of Design Suite 5 Premium and installed it. InDesign 5  is dispalying the same errors - I assume it picked up the plug-ins and preferences from ID CS4?
    Any ideas or solutions anyone?

    Thanks Peter
    I'll play around with the monitors. I have two monitors both running at native resolution (one 24" Samsung (1900 x 1200) and a 19" HP (1280 x 1024) set as an extended desktop. As far as I know no settings for them have changed but I'll try going back to a single monitor.
    As the problem does not exist on the other programs (Photoshop, Illustrator) that float panels it seems to be something in InDesign's coding is causing the problem and maybe reacting with  video settings. Strange as I have used InDesign CS4 since it was released with no problem up until a few weeks ago.
    If I create two document windows and float one off onto the other monitor then the toolbar and panels can be transferred onto the document on the 2nd monitor no problem but 'fall through' the document remaining in the program! By clicking reset Advanced Workspace they are recovered.
    I tried to uninstall CS4 but the uninstall program hangs so I have to work out why?
    Thanks for your help - I am sure the answer lies out there somewhere

  • [CS4] - Document window moving

    Hello,    I am porting my Plug-in from CS3 to CS4 and I am solving problem how to move IDocumentPresentation which is Float() to [x,y] position.
    Thank you, marxin

    From the Menu Bar (TOP) Try WINDOW>Application Frame (instead of Application Bar). Resize your "Frame" to your liking and when you create a new document the same size should come up.

  • CS4 document window not showing

    I have been running Indesign CS happily for the past year on a 13" macbook pro with Leopard. I just bought a brand new 15" macbook pro with Snow Leopard. Now if I open a file I need to minimize or expand the window to see a document. Also if I want to have multiple documents open the other tabs are visible at the top but not the window containing the document. I have trashed the preferences several times now. Sometimes it works for a little bit then stops. I really do not want to upgrade to CS5 yet. Any help is much appreciated.

    You have a couple invalid formatted comments on the page which could be causing display issues for your "Title Starts Here" type of comments.  The comment tag is only <!-- Comment Goes Here -->.  I think those extra hyphens "-" might be causing an issue with the Design View and confusing Dreamweaver.  Additionally in your footer, you have 2 open <p> tags but only one closing </p> tag.  That needs to be fixed as well.  It looks like the one around the address portion is missing, copyright seems fine.
    Lastly, you have some CSS errors in that document, but those shouldn't be causing the issue you are describing although they could cause browser issues that you may want to look into.
    http://validator.w3.org/unicorn/

  • CS4 auto resize document window?

    In CS3, the document window abutted the palette (panel) stack and expanded automatically when I collapsed the stack. How do I make CS4 (Windows XP) do this?

    None of the suggestions so far make CS4 do what I could do by selecting Maximum Screen mode in CS3. I have the stack of panels against the right edge of the screen and it collapses mostly to the left. The document window and the stack have no effect on each other.
    I think I have to dock the stack to the right edge, but I don't know how to make it happen. As I mentioned, the CS3 screen mode that did it is missing from CS4.

  • 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

  • Illustrator document window will not resize

    On a Mac -- CS6
    All of a sudden my document windows refuse to resize. I was sent an Illustrator file by another artist and now all windows only open to the size of his window. Can't change any of them.
    Tried restarting the program twice and thought I reset my preference (although not sure I was successful).
    HELP :-)
    Thank you.

    Never found out what happened. As I mentioned, I tried restarting multiple times, etc. but nothing worked. Then, just as suddenly, the problem disappeared. I do attribute the beginning of the problem to when I opened someone else's file (that they had sent me). Sorry not to have better advice and good luck.

  • How to resize document window on Mac?

    This seems like a silly question, but there appears to be no corner grabber to resize my document windows. Is this a new "feature" or am I missing something.

    Are you talking about the textured triangle that used to appear in the lower right corner?
    I'm running Fireworks CS5/6 on Mac OS 10.6 (Snow Leopard), and that corner grabber no longer exists. In its place, you simply hover over an edge or a corner and look for the cursor to change to double-sided arrow. I'm not sure why this change was made. It does sort of offer more surface area for interactivity (at the edges); however, if two windows are right next to each other (like the document window and the panels), there's no way to tell which is about to be resized until afterwards.

  • InDesign CS4 on Windows won`t late me paste anything i have copied in the document, please help ?

    Please assist InDesign CS4 on Windows won`t let me paste anything a copy in the same document

    Windows 7 or Vista? See InDesign tools and panels don't respond to mouse clicks (Windows 7/Vista)

  • Can an InDesign swf document automatically resize?

    Hello,
    Using InDesign CS4, I've created an interactive document and exported into a swf format.
    The document size is 1024 x 768 px, but will not resize without cropping parts of the document. This means that the majority of users won't be able to use the document unless they have the same desktop size or larger than 1024 x 768.
    I've tried changing the export options in InDesign to get the document to resize, and I've also tried exporting and changing settings in Flash which works but removes all of the interactivity.
    From what I've read I don't think it is possible to do this from the Adobe suite.
    Does anyone know if there any way this document can be displayed in a browser and automatically resize according to the users desktop resolution? This could be either via some functionality I haven't tried within the Adobe software or by using some software or code to imbed with the document on the webpage.
    I can upload the document if needed.
    Thanks for your help.

    You can set the embedded swf to scale with the browser window (not fullscreen mode) via the HTML holder generated by ID. Set width and height to "100%" and scale to "showall"
    Keep in mind that the browser window could be any size, so text might be be illegible in a small browser window or awkwardly oversized in a large window.

  • Illustrator Application Window Resizes When Opening Smart Object from PSD

    Hi All, I've taken a vector graphic created in AI CS4 and pasted it into my PSD CS4 doc as a smart object. When the original AI file was created the application window was set as I preferred it, filling my screen. When I double click the Smart Object in PSD to edit it back in Illy, the window that contains the application has been switched off of the fill screen mode and is quite a bit smaller. I know it's small but now I have to click the maximize icon in the application bar to get Illy to fill the screen again. It wouldn't be so bad once, but the application window resizes itself every time I punch back into the smart object from PSD.
    Any ideas on how I can get the AI environment from switching around on its own??
    Win 7, CS4, all patches current, Dual 22" montiors
    thnx,
    jeff

    I just want to point out that when you open the smart object of course it is not the same file as the original but an embedded copy of it.
    That might also have something to do with this issue and might also be a photoshop issue with the smart object and one reason might be that Photoshop is see the image as resolution and Illustrator sees it as a dimension and the teams might be able to do something about this but might not actually be aware of it unless you file a report even if it is not a bug it would then be a feature request.
    They might not be able to do anything about it but then there might be a clever engineer with an idea, so it might be worth the report.

  • How can I get the windowRef of the active document window?

    Hello,
    Hou could I get the ADMWindowRef of the active Document window in Illustrator CS4- CS5? I can not use ADMWindowSuite1  because is On Mac OS only.
    Thank you very much to Everybody.

    There's no API for this, not if you want to make use of it in a useful way. You have to write Windows API code to do it. I reccommend using Spy++ to suss out the structure. Frankly, it's pretty annoying. It'd be extremely helpful if the API provided this, but it doesn't.

  • Expand the Document Window's Page Name Area

    In FW CS4, the area for the page name is too small.  It truncates my page names so that I can't tell them apart like this:
    Is there any way to expand that are where the page name shows up on the right of the document window toolbar?
    Thanks!

    That won't work if other users are to recognize what the pages are designed to do.

  • Document windows open full screen

    Hi,
    Trying to avoid using the application frame as I don't like the way it stays open and visible when all Dreamweaver documents are closed (even if DW is in the background.)  So I have Application Frame (under Window menu) deselected...but everytime I open an html page to edit it opens the full width of the screen.  Anyway to set Dreamweaver to remember how wide windows were previously and have them open to that width which I set?
    Thanks,
    Rick

    Rick Lupert wrote:
    It seems strange though that Dreamweaver would assume I want to see a web page full screen...
    Dreamweaver CS6 introduced the Application Frame to bring it into line with other Creative Suite programs. Some Mac users like it. Others loathe it with passion. If you don't like the way Dreamweaver now works, submit a feature request as I suggested earlier.
    However, I have discovered a way to get the Mac version of Dreamweaver CS6 to open files at a smaller size. Whether it suits your preferred workflow is a different matter.
    Turn on Application Frame and resize Dreamweaver so that it doesn't fill your monitor. Go to the Dreamweaver menu, and select Preferences. In the General category, deselect the option to open documents in tabs.
    Now when you open a document, it will be floating, and will be only large enough to fit in the resized Application Frame. You won't be able to access other programs or files behind the Application Frame unless you minimize Dreamweaver. But if you locate the Application Frame away from other documents that you might want to access, it will give you freedom to switch between programs and keep the size of the Document window more manageable.
    Of course, it's not exactly what you want, but it might make your workflow a little easier.
    By the way, this is a user-to-user forum, not Adobe support. So, if you want Adobe to take notice of your requirements, use the form I suggested earlier.

  • Cannot close nor reduce size of working document window.

    Illustrator CS3 on Mac OS X 10.5.5. Somehow my window has become large enough to cover the entire screen to where the red/yellow/green dots in the upper left corner are covered by my Apple menu bar and the square in the bottom right corner used to click and drag for resizing no longer has the diagonal lines across the lower half and will not allow me to use that function. Every new and existing document window opens in this size and format. Adobe will not help because it's CS3. Can anyone please help me with this problem. I cannot see my palettes or panels while working.

    You both are so brilliant and appreciated!!! THANK YOU. Was afraid to touch preferences not knowing what I'm doing. The hitting 'F' worked perfectly. Only had to do it twice. New windows open fine as do existing. Many thanks to both from an artist who knows only what she needs to create and wants it to remain that way. Bless you.

Maybe you are looking for