January 1, 201214 yr As far as I can tell, there isn't a Get function that fetches the Top and Left coordinates (in pixels) for the main/parent window on the desktop; I need to know that for a specialized FMP application I'm working on--where on the desktop is FMP's window; the existing Get functions already provide the height and width of it. Is there a way to fetch that info from with FMP or is there a standalone app that FMP can "look" at to get those coordinates? TIA for your time/help.
January 1, 201214 yr Not sure what you mean by "the main/parent window". You can get the top/left coordinates of the current window by using the Get (WindowTop) and Get (WindowLeft) functions.
January 1, 201214 yr I think Rich might mean the application window, something Mac people do not deal with. It shocked me the first time I opened FileMaker on my Mac and it didn't have a window window. AFAIK, there is no way control the size of the main application window on Windows (from within FM) or determine its location. VBScript or AppleScript could probably be used and then script a Send Event to fire it. Anyway, I do not have an answer, only a clarification about what window is being discussed. Please now carry on, LOL. And Happy 2012!! I reread the request and changed my answer to address location rather than size but the answer is still the same - I believe the coordinates would have to come from outside FM. Edited January 1, 201214 yr by LaRetta
January 1, 201214 yr Author Thanks, LaRetta--that's what I figured...unfortunately. Comment: Indeed, I tried using the Get(WindowTop) and Get(WindowLeft) functions but in the Windows version of FMP they just show up as zeroes. Thanks for your (plural) help, and a happy and healthy year for everyone!
January 1, 201214 yr Wait a sec, Rich ... they should produce SOME value because they are evaluating the current window. And you must have a window open or the file isn't open. I thought you didn't want the open window but rather the application window. Can you clarify what you are trying to do or provide your script? If you get 0 then I suspect you have no window selected (although you cannot select the application window).
January 1, 201214 yr You can get 0 if the current window is aligned precisely to the left edge of the screen and/or bottom of the menu bar.
January 2, 201214 yr Yes, I misspoke, thanks. I was thinking Rich meant he was getting 0 no matter the window position; I did not read carefully enough. This is the first correct for 2012 ... it is a very good sign. :yes:
Create an account or sign in to comment