Welcome to Dream.In.Code
Become a Java Expert!

Join 149,501 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,367 people online right now. Registration is fast and FREE... Join Now!




Interacting w/ other text fields

 
Reply to this topicStart new topic

Interacting w/ other text fields

kwikness
27 Mar, 2007 - 07:44 AM
Post #1

New D.I.C Head
*

Joined: 22 Jan, 2007
Posts: 14


My Contributions
Hi, I want to write an application, in Java, capable of interacting with the text fields of another application.

Example:
A Java application that could paste a URL into the URL bar of the Mozilla Firefox browser.

1) Is this possible? (I don't see how it wouldn't be..)

2) Where can I learn more about this?

3) I would also like to learn about simulating mouse clicks on various places on the screen. Is this possible? If so, where can I learn about it?

Thank you for your time.

,Kyle

This post has been edited by kwikness: 27 Mar, 2007 - 07:46 AM
User is offlineProfile CardPM
+Quote Post

capty99
RE: Interacting W/ Other Text Fields
27 Mar, 2007 - 07:47 AM
Post #2

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,252



Thanked: 16 times
Dream Kudos: 550
My Contributions
i've seen a javascript link that did this....
and took over the computer ....
which it sounds like you want to do....

google will be on to you when all of their ads get click....


eh. maybe the intentions are all good.

its possible.
i do not know how to do it.

User is offlineProfile CardPM
+Quote Post

Programmist
RE: Interacting W/ Other Text Fields
27 Mar, 2007 - 09:27 AM
Post #3

Four-letter word
Group Icon

Joined: 2 Jan, 2006
Posts: 1,250



Thanked: 11 times
Dream Kudos: 100
Expert In: Java

My Contributions
Simulating mouse clicks can be done using the Robot class. If you're not sure how to use it, google Java Robot tutorial and something will come up. As far as pasting a URL into another application...hmmm. You might be able to do that using the Clipboard. I'm not sure. I think it may require knowledge of the browser application, which might mean writing native code (use JNI to access). Someone correct me on that if I'm wrong.
User is offlineProfile CardPM
+Quote Post

keems21
RE: Interacting W/ Other Text Fields
27 Mar, 2007 - 09:29 AM
Post #4

D.I.C Head
Group Icon

Joined: 3 Feb, 2007
Posts: 183



Thanked: 2 times
Dream Kudos: 25
My Contributions
Look over the java robot class. I've always wanted to try it, but never found the time nor motivation to:

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html

This should get you started.

edit:
damn alcdotcom, you beat me.

This post has been edited by keems21: 27 Mar, 2007 - 09:30 AM
User is offlineProfile CardPM
+Quote Post

kwikness
RE: Interacting W/ Other Text Fields
27 Mar, 2007 - 04:24 PM
Post #5

New D.I.C Head
*

Joined: 22 Jan, 2007
Posts: 14


My Contributions
QUOTE
i've seen a javascript link that did this....
and took over the computer ....
which it sounds like you want to do....


I can assure you my intentions are good.

QUOTE
Simulating mouse clicks can be done using the Robot class.

QUOTE
Look over the java robot class.


Thank you. This was exactly what I was looking for.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 06:33PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month