Set window position of another program

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Set window position of another program

Post by croivo » Thu Jul 16, 2015 11:08 pm

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Set window position of another program

Post by Klaus » Fri Jul 17, 2015 11:44 am

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

croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Re: Set window position of another program

Post by croivo » Fri Jul 17, 2015 4:32 pm

Danke schon Klaus!

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Set window position of another program

Post by Thierry » Fri Jul 17, 2015 5:16 pm

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
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Post Reply