forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


capture text from a WINDOS program

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 11, 2002 12:32 am    Post subject: capture text from a WINDOS program Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Aug 11, 2002 3:29 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 11, 2002 4:28 am    Post subject: hummm Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Aug 11, 2002 4:55 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 11, 2002 4:25 pm    Post subject: ok Reply with quote

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
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Aug 11, 2002 9:14 pm    Post subject: Reply with quote

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 Smile
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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 1:37 am    Post subject: heheheh Reply with quote

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 Sad

thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 5:35 pm    Post subject: any ideas Reply with quote

any ideas? can this be done?


thanks
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Aug 12, 2002 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 6:06 pm    Post subject: ahhh K Reply with quote

well

yea it might be to much for me to do..BUT i will play with it to see what happens Smile


thanks all for helping Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 10:04 pm    Post subject: Reply with quote

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group