monitoring the taskbar in windows

T

tommygun101

Hi friends

Is there a bulit in class that can directly control the open
aplications in windows?.
i,e. it can find out which programs are open and minimise and maximise
them, or even close them.

i am developing a java program that controls other programs in
windows, but to do this i need 2 things

1. a way to control the mouse and keyboard, i have found the class
ROBOT and this could control the windows as neccisary because ROBOT
directly controls the mouse and keyboard strokes.

2. i need a way to get information back from the other open programs,
i was thinking of print screen but that is a real mission,.. it would
be ideal to read the screen shot directly from the memory without
having to maximise or minimise the window.

Does Such A Class Exist?!?
Thanx
 
T

Twisted

My friends do not multi-post.


Please refrain from multi-posting, in future.
<http://www.physci.org/codes/javafaq.html#xpost>

(X-post to c.l.j.p./h., w/ f-u to c.l.j.h. only)

I don't see an answer to the OP's question in here, though it looks to
me like it would likely be "no", with JNI or a third-party, platform-
specific component needed to accomplish his goals.

I also don't see any evidence that the OP multi-posted anything. Nor
is that surprising, since unlike cross-posting it wouldn't show up in
the message headers at all.
 
A

Andrew Thompson

Twisted said:
I don't see an answer to the OP's question in here, ..

Good call. I would never impart technical information
to a multi-poster, until the matter of multi-posting had
been resolved to my satisfaction.
I also don't see any evidence that the OP multi-posted anything. Nor
is that surprising, since unlike cross-posting it wouldn't show up in
the message headers at all.

No, it wouldn't. I have a number of ways of telling that
a message has been multi-posted, the most obvious one
is seeing identical posts from one person, that are not
cross-posted. When that happens, I check the poster's
'profile' in GG to see something like..
<http://groups.google.com/groups/profile?enc_user=ss4TyhAAAABbiru06bwTnrkElcCaZZqb(Posts separated by one minute)

That is evidence enough, for me. OTOH The OP can
cut in and explain any misunderstanding on my part,
at any moment they wish.
 
T

Twisted

[snip]

The OP came to comp.lang.java.programmer asking for advice on Java,
not for advice on netiquette, nor did they ask to be net.stalked and
their posting history examined and criticized in public. Your response
was completely off-topic in this group. My subsequent post contained
an on-topic portion, and your further response was again totally off-
topic.

So far, it is you who seem to be the worse one at netiquette, as
viewed from where I am. One (if we believe you, two or more) on-topic
posts by him; at least two off-topic posts by you. (And now one off-
topic post by me, after a lengthy history of on-topic posts. :p)
 
T

tommygun101

Twisted wrote:

..


Feel free to crawl out from under your rock,
any time you like.

hey Andrew Thompson and Twisted

I am new to this forum thing, i did "multi-post" but i did it only on
2 sperate groups, i
spent quite some time frasing my question and if a where to rewrite
it,it would not have
been better than my first attempt, im sorry this offended you,, i wont
do it again
now that i know its a no no.

besides its not like i joined 30 groups and posted the same message
i would still apreciate some help but if you still dont want to help
me
i understand
 
A

Andrew Thompson

tommygun101 wrote:
...
I am new to this forum thing, i did "multi-post" but i did it only on
2 sperate groups, i
spent quite some time frasing my question and if a where to rewrite
it,it would not have
been better than my first attempt, im sorry this offended you,,

It did not offend me. Don't sweat it.
...i wont do it again

Note that it is OK (with most people) to *cross*-post
messages between two groups. Read that first link I put,
it explains the difference, and why most people do not like
multi-posting. Here is the link again
now that i know its a no no.

Cool. But be aware you can achieve much the same
effect, without the sidetracking comments, by
cross-posting.
...
i would still apreciate some help ...

FWIW (For what it's worth) your original speculations
about the Robot, combined with Twisted's comment
on JNI, pretty much sum it up. I (for one) know of no
other ways you might achieve the desired goal.

I will add though, in case you had not already realised,
that Java is not a language well suited to these 'delve
into the guts of the OS' type problems.

Robot is very kludgy and fragile for this type of problem.
JNI is platform specific, so most of the code will be..
something non Java, called by a thin Java layer.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200706/1
 
T

tommygun101

Robot is very kludgy and fragile for this type of problem.
JNI is platform specific, so most of the code will be..
something non Java, called by a thin Java layer.

thats intersting,..

OS <--> java <--> Mathematica

i was thinking of using java as a bridge to get info about the
system that mathematica could not get and then pass
the info to mathematica to use in its process,

So, if java will not be adequate, do you know which programming
language
would be a good bet to check out,

This would be much better than doing my other alternative,.. which
was
print screen and then analysing the text and the boxes in the
task bar using the haar wavelet, but this would be too expensive
for the simple task i need.
 
L

Lew

tommygun101 said:
print screen and then analysing the text and the boxes in the
task bar using the haar wavelet, but this would be too expensive
for the simple task i need.

Maybe so, but what an extremely cool idea!

Do you have any algorithms or code you'd care to share on that approach?
 
T

tommygun101

Do you have any algorithms or code you'd care to share on that approach?
i will make a new thread, because this is a bit off topic on the
current thread
 
T

tommygun101

i will make a new thread, because this is a bit off topic on the
current thread

Text image analysis with the haar wavelet---> check it out when im done
 
J

Joshua Cranmer

tommygun101 said:
thats intersting,..

OS <--> java <--> Mathematica

i was thinking of using java as a bridge to get info about the
system that mathematica could not get and then pass
the info to mathematica to use in its process,

So, if java will not be adequate, do you know which programming
language
would be a good bet to check out,

Try using MVC, MVC++, or MVB. I'm not an expert on the Windows API, but
there should be some down-and-dirty stuff to grab process information
and dispatch events to open applications.

Java is a poor choice to use a bridge between high-level applications
and OS information because Java is explicitly designed to wash away the
OS information as much as possible. A much better choice would be to use
languages closer to the OS; C (or sometimes C++) is preferred because
that is what most OS's are written in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top