Determine Location Of Open Apps
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Determine Location Of Open Apps
Good Afternoon All,
I would like to open an app with a very small window and then open a different app that is located very precisely next to the first one. Is there a way to determine the names of all open apps and their corresponding windows using liveCode. I have tried "openProcesses" with no success.
Thanks for your help.
John Miller
I would like to open an app with a very small window and then open a different app that is located very precisely next to the first one. Is there a way to determine the names of all open apps and their corresponding windows using liveCode. I have tried "openProcesses" with no success.
Thanks for your help.
John Miller
Re: Determine Location Of Open Apps
Hi John,
Are these both liveCode apps?
Simon
Are these both liveCode apps?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Determine Location Of Open Apps
Simon,
Yes, right now I have two apps, both liveCode. In the future there will be several more, and I want to be able to tell which ones are open and the rect of each app window.
In programming mode I can use openprocesses or just refer to the stack, but once I compile them as stand alone apps, I don't seem to be able to do this.
John
Yes, right now I have two apps, both liveCode. In the future there will be several more, and I want to be able to tell which ones are open and the rect of each app window.
In programming mode I can use openprocesses or just refer to the stack, but once I compile them as stand alone apps, I don't seem to be able to do this.
John
Re: Determine Location Of Open Apps
Hi John,
And they must be standalones?
My thinking is you have one app and sub-stacks that open as separate standalone looking things. Then the control is easy.
I'm unsure how one would do it via shell.
Simon
And they must be standalones?
My thinking is you have one app and sub-stacks that open as separate standalone looking things. Then the control is easy.
I'm unsure how one would do it via shell.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Determine Location Of Open Apps
In this situation, I need to keep them as separate stand alone applications. I was hoping there might be a way to read the openprocesses.
Re: Determine Location Of Open Apps
Can you open one from the other, by calling a shell command to launch the second app from the first?
If so, to could pass the window id of the first to the second as an argument of the start shell command. Then the second can use that to line up.
You could also use a shared data area for each app to write its own rect into a file, and clean up the file when the app closes. Each app could use "the files" to see what apps have written a file (therefore open) and read the other apps' rects.
If so, to could pass the window id of the first to the second as an argument of the start shell command. Then the second can use that to line up.
You could also use a shared data area for each app to write its own rect into a file, and clean up the file when the app closes. Each app could use "the files" to see what apps have written a file (therefore open) and read the other apps' rects.
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Determine Location Of Open Apps
Which platform is this for?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Determine Location Of Open Apps
This needs to work on both Macs and Windows.
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Determine Location Of Open Apps
Spark out,
Over the weekend I decided to do just what you suggested. When my app opens it writes its rect to a text file, and when it closes, it deletes the file.
Great minds (???) must think alike.
However, it sure seems that livecode should be able to know this info.
Thanks for you thoughts and suggestions.
John
Over the weekend I decided to do just what you suggested. When my app opens it writes its rect to a text file, and when it closes, it deletes the file.
Great minds (???) must think alike.
However, it sure seems that livecode should be able to know this info.
Thanks for you thoughts and suggestions.
John
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Determine Location Of Open Apps
You may be able to obtain that info using LC's shell function to call the respective command line tools on Windows and Mac for that.johnmiller1950 wrote:However, it sure seems that livecode should be able to know this info.
But using files works, and not much harder to use sockets to communicate between LC instances too.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn