LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-21-2008, 02:03 PM   #1
thefalling881
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
Grabbing text from a text box in a window running in wine.


Writing my program in C, and I have no idea where to start. If anyone could point me in the right direction, would be awesome.
 
Old 07-21-2008, 02:42 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I am a little confused...

You want to write a Linux program that reads a text box of a Windows program running through WINE?
 
Old 07-21-2008, 03:09 PM   #3
thefalling881
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
yeah




-----thefalling881
 
Old 07-21-2008, 03:33 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Maybe I'm misunderstanding. Can't you just use copy-paste?
 
Old 07-21-2008, 07:17 PM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I assumed he wanted something automated, that is able to run and pull the text right from the window without having to actually copy and paste it. But he didn't say either way, so I guess he needs to clarify that a bit.
 
Old 07-21-2008, 08:21 PM   #6
thefalling881
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MS3FGX View Post
I assumed he wanted something automated, that is able to run and pull the text right from the window without having to actually copy and paste it. But he didn't say either way, so I guess he needs to clarify that a bit.
Yeah I want the program im writing in C to do it. So yeah, i want it to be automated.
 
Old 07-21-2008, 08:38 PM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Firstly I should say that I don't know enough about the internals of wine to know if there is a nice way to do it.

Assuming there is some mechanism for getting at such data, what criteria would your program use to decide which wine process to look at, and within that process the window and widget object to get data from?

There are products on Windows which can programatically grab stuff from widgets in Windows apps (e.g. winrunner, which can also be used to script the sending of events like mouse clicks and keyboard entry).

In my limited experience these mechanisms are hideously ugly and complicated, because Windows doesn't really provide a good mechanism for scripting generalised interaction with GUI apps.

Given that wine really does give you access to the win32 internals, you might be able to write some sort of framework for addressing widgets in windows apps, but I expect it will be a lot of work, and will probably mean having to write a lot of code which you build into wine itself.

What is the exact application which you wish to interact with, and what is the purpose?

Some apps may provide some sort of IPC mechanism which would allow another process to query them for some info. I sometimes use the dcop interface to script interaction with KDE apps. It's awesomely useful. I have never been a Windows developer and haven't used it in anger for years, so I'm afraid I cannot tell you if there is some equivalent in the Windows world.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 02:36 PM
Grabbing HTML text cyborg_jt Programming 3 06-14-2007 09:09 PM
Text in the root window Komakino Linux - Software 5 07-24-2004 04:53 PM
Terminal Window with no text pawlub Linux - Software 2 03-31-2004 03:19 PM
text mode VS X window dummyagain Programming 5 10-06-2003 11:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration