• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question, How to write key value using ProcessBuilder?

 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi~~~
I have a question about ProcessBuilder.

I try to control MS-DOS program.

The program name is CARI-6M.

You can download http://www.faa.gov/data_research/research/med_humanfacs/aeromedical/radiobiology/cari6m/ .

The CARI-6M has text GUI environment.

I don't know to write key "1" using OutputStream.

The writing method does not run on windows 7.

please help me~~~~~!!~~.

 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't write to GUI text fields using Process streams.
You might want to look at the Robot class to see if that is a better solution to your problem.
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch,

Can you explain exactly what you are trying to do and what doesn't work. Does it not compile, not run, run but not do what you want (if so what does it do) etc.
 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:Welcome to the Ranch,

Can you explain exactly what you are trying to do and what doesn't work. Does it not compile, not run, run but not do what you want (if so what does it do) etc.

Sorry I'm not good at English. I'm Korean.
I'm trying to get cosmic ray dose using the CARI-6M program.
The CARI-6M is MS-DOS program has text GUI.
I want to input keys instead of human's typing on background process.
Could you advise some solution?
I modified the source.
 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:You can't write to GUI text fields using Process streams.
You might want to look at the Robot class to see if that is a better solution to your problem.


Thanks for your advise. I'll consider your advise.
 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hoon kim wrote:Sorry I'm not good at English. I'm Korean.

Don't worry, your English is a lot better than my Korean.

hoon kim wrote:The CARI-6M is MS-DOS program has text GUI.

text GUI doesn't really make sense, it is either a text based CLI (Command Line Interface) or a GUI (Graphical User Interface). I guess you mean CLI as it's a MS-DOS program.

I suggest you add lots of print statements in your code so you can see what lines are running and where it is getting stuck. You might want to look at the way readLine() works - what happens if it blocks waiting for input.

Using Process is more difficult than you might think. There are a number of things you have to be aware of, I suggest you read http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html.
 
Wanchul Lee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Hoon Kim

Can I talk to you?


Regards,
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wanchul, Welcome to the Ranch.

Please do not post personal information on a public forum - I have removed it for you.
If you want to contact the OP about this thread then please read http://www.coderanch.com/how-to/java/UseTheForumNotEmail for information on why you should post your question/advice here.
If you want to contact the OP for personal reasons then click on his/her name to go to their profile and use their email address or PM them.
 
Wanchul Lee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Tony Docherty,
I am so sorry. Currently I also run the CARI-6M to calculate radiation dose and I found his question through googling. I just want to communicate with him in our mother tongue. If my post disturb your policy, would you please accept my appology.
Best regards,
 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wanchul Lee wrote:Dear Hoon Kim

Can I talk to you?


Regards,


Yes~I sent purple message to you.
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wanchul Lee wrote:Dear Tony Docherty,
I am so sorry. Currently I also run the CARI-6M to calculate radiation dose and I found his question through googling. I just want to communicate with him in our mother tongue. If my post disturb your policy, would you please accept my appology.
Best regards,

It's not against our policy for you to want to communicate with another member but we don't allow personal information such as email addresses, telephone numbers etc in posts so I removed that information. But don't worry you have not offended us and we hope to see you again on the forum.
 
hoon kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have succeeded to control the CARI-6M using WIN32 API.
It's very difficult mission.
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations.
Would you like to post your solution so other may also benefit from it.
 
Francesco Cataudella
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problems: integrate CARI6-M inside an application.
I tried using java but with the same results.
I tried using autohotkeys but it is not stable.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!