Page 1 of 1

Set window position of another program

Posted: Thu Jul 16, 2015 11:08 pm
by croivo
Is there any way to set position of another program? This guy (on the link below) asked the same question but for C#, can Livecode do this?
http://stackoverflow.com/questions/1364 ... in-c-sharp

Re: Set window position of another program

Posted: Fri Jul 17, 2015 11:44 am
by Klaus
Dobar dan croivo,

you cannot do this directly in Livecode!
Maybe you can do this with AppleScript on the Mac and VBScript on Windows, but I have no idea how.


Best

Klaus

Re: Set window position of another program

Posted: Fri Jul 17, 2015 4:32 pm
by croivo
Danke schon Klaus!

Re: Set window position of another program

Posted: Fri Jul 17, 2015 5:16 pm
by Thierry
Klaus wrote:
Maybe you can do this with AppleScript on the Mac
and VBScript on Windows, but I have no idea how.
Hallo Klaus,

Here is how to do that within Livecode..

Put this in a field ( "moveWindow" in my case):

Code: Select all

tell application "System Events" to tell application process "Firefox"
		set position of window 1 to {438, 22}
end tell
and run this line of code:

Code: Select all

do field "moveWindow" as AppleScript
May be someone could post the same with VBscript?

Best,

Thierry