| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 11, 2002 12:32 am Post subject: capture text from a WINDOS program |
|
|
hello all
is there a way to have vds capture text from a output window of a windows program and then save it to a file?
thanks |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Aug 11, 2002 3:29 am Post subject: |
|
|
You can do this using @wintext() and @winatpoint(),
by either scanning the whole window in a loop, or
just getting text from a single XY position.
These are the functions used by the "Window Spy Tool"
I posted:
http://www.vdsworld.com/forum/viewtopic.php?t=450
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 11, 2002 4:28 am Post subject: hummm |
|
|
k
what you mean by scanning it?also how fast is this process? and how what i save the info to a file?
thanks |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Aug 11, 2002 4:55 am Post subject: |
|
|
It depends if you're looking for a specific text or not...
If you are, you can scan the window in 5x5 or 10x10
increments, and stop when/if you find it.
If you want to capture the whole window text and save
it to a file, then it depends on whether it's a program
like NOTEPAD that has a single large EDIT element
(pretty easy), or if you want to scan various windows
that may have unknown multiple elements.
If you want to scan various windows, it's gonna be kinda
slow, and you have to check whether the text has already
been added to what you've found. You can use a SORTED
list (LIST CREATE, 1, SORTED) to remove duplicate finds,
but then the info is also re-arranged in alphabetical order.
So what exactly are you trying to do?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 11, 2002 4:25 pm Post subject: ok |
|
|
ok
I have a program that outputs some text info to a screen, I want to take that info and save it to a file. its just one big window. if i get a chance i will try to take a screen shap shot of it... |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sun Aug 11, 2002 9:14 pm Post subject: |
|
|
I assume you're talking about the program I helped you with.
If so, when posting in the future, give a good description, if you had said that you wanted to save the text in the List box in your program, I could have answered it yesterday
Add a button that does something like this:
| Code: |
:Button8BUTTON
%%SaveTo = @FILEDLG("Text Files (*.txt)|*.txt|All Files (*.*)|*.*",Save Info As..)
if %%SaveTo
LIST SAVEFILE,lText,%%SaveTo
info Done Saving Info.
end
goto evloop
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 1:37 am Post subject: heheheh |
|
|
hehheeheh
no i wasn't talking about that program BUT thanks tho i will uses that for that program i was taking about getting info off other window program that i need to save the text to..BUT this windows program is not made with vds tho
thanks |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 5:35 pm Post subject: any ideas |
|
|
any ideas? can this be done?
thanks |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Aug 12, 2002 5:46 pm Post subject: |
|
|
Not easily..it would have to be done like Mac said, which seems to be a bit out of your league..sorry. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 6:06 pm Post subject: ahhh K |
|
|
well
yea it might be to much for me to do..BUT i will play with it to see what happens
thanks all for helping  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 12, 2002 10:04 pm Post subject: |
|
|
The "Window Spy Tool" posted in the VDS3 source code
section has a routine that scans a window for all child
controls. It might help ya out some.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|