WindowCount

Hello,

When I call WindowCount in myXojoapp will that only count windows created by myXojoapp?

How can myXojoapp know if a window of another app, named “untitled” for example is open?

I would like to move that window to Left 10.

Thanks.

Lennox

WindowCount is ONLY windows of YOUR app…
without special declares etc. your APP has no idea what other programs may be running at the same time

App.WindowCount is valid only for the windows created by the app.

Windows of other apps can be accessed on Windows with some declares.
http://stackoverflow.com/questions/7268302/get-the-titles-of-all-open-windows

WindowCount only knows about and reports on windows you opened within your app. If you want to affect windows outside your app, you will probably have to delve into system calls and (on the Mac) Accessibility.

On Windows, it is relatively easy to access other programs windows with the techniques described in the link I posted, and to move them with SetWindowPos().

On Mac I am sure the same kind of calls exist, but I would not recommend trying them in a sandboxed app as in the MAS. The calls would probably be stopped by the sandbox, and trying to get a temporary entitlement to do anything with the desktop is a sure way to get rejected by reviewers.

OK thanks,

I should not have stated General, I meant OSX.

Something like this:

using System.Diagnostics;
Process[] processlist = Process.GetProcesses();
Msgbox processlist

How can I get the processList?

Thanks.

Lennox

How can I change this Channel name from General to OSX?
Thanks
Lennox

Did you try AppleScrip or AppleEvents (I do not know the App Store status for teh use of these).

OK, I saw this AppleScript…

tell application “System Events”
set position of first window of application process “TextEdit” to {100, 100}
end tell

but that needs assistive access.

Can I do that without assistive access? Or Can I turn assistive access then turn assistive access off, after the window has been moved?

Thanks.

Lennox

[quote=307844:@Lennox Jacob]How can I change this Channel name from General to OSX?
[/quote]

Click on Controls on the upper right corner of the browser, and select Change Channel

Thanks Michel.

Lennox