FunkyBass Posted October 8, 2009 Share Posted October 8, 2009 Hi, I'm daily changing screens due to using external displays and projectors of several sizes for demo and training reasons. I've been using an applescript to re-organize my screen setup in VW 12 - 2009. Now in VW2010 the windows 'Navigation - Classes' and 'Visualisation - Lights' don't understand the 'Set Bounds of window' command. I guess this is due to the naming which contains a '-'. Does anyone have a solution for this little inconvenience? Here's the applescript: tell current application set theApplication to "VectorWorks 2010 US" end tell -- Get the screen bounds of your active display tell application "Finder" set theScreenSize to bounds of window of desktop set theScreenWidth to item 3 of theScreenSize set theScreenHeigth to item 4 of theScreenSize if theScreenWidth > 1920 then set theScreenWidth to 1920 if theScreenHeigth > 1200 then set theScreenHeigth to 1200 end tell -- Reposition your VectorWorks elements tell application theApplication activate set theBasic to "Basic" set theTools to "Tool Sets" set theNavigation to "Navigation - Classes" set theRessources to "Resource Browser" set theInfo to "Obj Info" set theVisual to "Visualization - Lights" set bounds of window theBasic to {0, 22 + 16, 156, 255} set thePositionList to bounds of window theBasic as list set theBottom to item 4 of thePositionList set bounds of window theTools to {0, theBottom + 16, 156, theScreenHeigth - 4} -- set theTest to visible of window theNavigation set theTest to false if theTest then set theBottom to theScreenHeigth * 0.6 as integer else set theBottom to theScreenHeigth - 4 end if if theScreenWidth < 1500 then set theRightPaletWidth to theScreenWidth / 5 as integer else set theRightPaletWidth to 300 end if try set bounds of window theInfo to {theScreenWidth - theRightPaletWidth, 22 + 16, theScreenWidth, theBottom} end try try set bounds of window theNavigation to {theScreenWidth - theRightPaletWidth, (theScreenHeigth * 0.6 + 16) as integer, theScreenWidth, theScreenHeigth - 4} end try try set bounds of window theRessources to {theScreenWidth - theRightPaletWidth - theRightPaletWidth - 40, 200, theScreenWidth - theRightPaletWidth - 40, theScreenHeigth - 150} end try try set bounds of window theVisual to {179, 330, 179 + theRightPaletWidth, theScreenHeigth - 150} end try try set bounds of window 1 to {156, 22 + 18, theScreenWidth - theRightPaletWidth, theScreenHeigth - 4} end try end tell Quote Link to comment
Jeremy Best Posted January 25, 2022 Share Posted January 25, 2022 Hey @FunkyBass, I've just started a research process, trying to determine the viability of automating the recreation of my palette layout after a fresh installation. I reinstall the software very often in my role and would love to write a script that automates this on both Mac and Windows. Using saved settings and Workspace files is not acceptable, because much of my testing must rule them out as causes of issues. At very least, if AppleScript is still compatible, I could do it on Mac, but if this procedure can be done using VectorScript then that would be preferable. Did you ever resolve the problem in your above post? Have you since found another way of doing it? With gratitude, Jeremy 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.