Active window and mouse location

Douglas Ruisaard dougr at telus.net
Tue May 8 13:48:55 EDT 2018


In Windows 7, LC v8.1.9
Is there a way to make an LC "window" the active / top window on the desktop after making another window on the desktop active?  I have an app which allows me to copy a portion of text from, say, a Notepad window, into the clipboard.  A timed loop within my LC script then pulls the clipboard text into an LC field and starts an analysis of the contents of that field.  THAT works great.  But then I need the LC window to become the active window after the analysis is done and displayed on my LC window, so I can manipulate the various controls I have on it.

Of course I can "manually" click on the LC window to activate it but I was wondering if there is a way to do so in LC script.  I've tried "focus on field xxx" (where xxx is a field in my displayed LC window), "set the screenMouseLoc to the loc of this stack", "go to this stack" and a variety of "click at" commands... none of these make the LC window the top active window on the desktop.  The Notepad (or whatever) window stays as the top, active window.

On a somewhat related note, how do you "set" the mouse location within an LC window?  I know and use the "set the screenMouseLoc to the loc of this stack" but an equivalent "set the MouseLoc to the loc of this stack" or "set the mouseLoc to "650,420"" generates an error of "Properties: token is not a property) near "mouseLoc", char 10" when trying to save the code.  Seems odd that I have to use FULL screen coordinates to set the mouse location rather than relative ones to the stack.

Douglas Ruisaard
Trilogy Software
(250) 573-3935







More information about the use-livecode mailing list