AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Capture text
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
suoabb



Joined: 08 Dec 2009
Posts: 30

PostPosted: Fri Mar 05, 2010 2:49 am    Post subject: Capture text Reply with quote

i was wondering is there a script that can copy any text on the screen even if it is gray out or don't allow you to highlight the text? similar to the software Capture Text?

also is there a way to setup a key to paste the clipboard without using such script as : send {Ctrl down}+{V}{Ctrl Up}
Back to top
View user's profile Send private message
Byroboy



Joined: 13 Mar 2009
Posts: 16

PostPosted: Fri Mar 05, 2010 5:20 am    Post subject: Reply with quote

the Clipboard is stored in as the variable %clipboard%
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Fri Mar 05, 2010 5:32 am    Post subject: Reply with quote

WinGetText
Clipboard
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Fri Mar 05, 2010 9:35 am    Post subject: Reply with quote

for pasting using F4 key:

Code:
F4::
Send, {CTRLDOWN}v{CTRLUP}
return[quote][/quote]
Back to top
test



Joined: 19 Feb 2010
Posts: 18

PostPosted: Fri Mar 05, 2010 1:13 pm    Post subject: Reply with quote

http://www.autohotkey.com/forum/topic27331.html
Back to top
View user's profile Send private message
Laraptor



Joined: 29 Jan 2010
Posts: 41
Location: Decatur, AL

PostPosted: Fri Mar 05, 2010 3:40 pm    Post subject: Reply with quote

I have an issue much like the OP. I would like to be able to get a value, in my case a number, which is unselectable. I can not highlight it or anything. Can WinGetTxt pull this hidden txt? I tried using WinSpy to find it but I did not see it listed there either. The txt is always in the same place on the window every time if that helps...
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Fri Mar 05, 2010 4:01 pm    Post subject: Reply with quote

Laraptor wrote:
I tried using WinSpy to find it but I did not see it listed there either. The txt is always in the same place on the window every time if that helps...
If you click on the ui with the number do you get a ClassNN or Text: from AU3_Spy? For instance:
AU3_Spy wrote:
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: MozillaWindowClass4
If you get a ClassNN name, you can possibly use:
Code:
ControlGetText, controlText, **ClassNN**, **Window Title**
msgbox % controlText
This doesnt always work, but sometimes it does.

Good luck
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Fri Mar 05, 2010 4:09 pm    Post subject: Reply with quote

this gets the text from most controls under the mouse.
press alt+c.
Code:
!c::
   MouseGetPos,,,win, cont
   ControlGetText, text, %cont%, ahk_id %win%
Return

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Laraptor



Joined: 29 Jan 2010
Posts: 41
Location: Decatur, AL

PostPosted: Fri Mar 05, 2010 4:26 pm    Post subject: Reply with quote

This is what i got from Winspy

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: JWLISTSUB1
Text:
Color: 0x800000 (Blue=80 Green=00 Red=00)
Back to top
View user's profile Send private message
Laraptor



Joined: 29 Jan 2010
Posts: 41
Location: Decatur, AL

PostPosted: Fri Mar 05, 2010 4:31 pm    Post subject: Reply with quote

tidbit wrote:
this gets the text from most controls under the mouse.
press alt+c.
Code:
!c::
   MouseGetPos,,,win, cont
   ControlGetText, text, %cont%, ahk_id %win%
Return


How do i know if this gets the txt? Will it save it to the clipboard? Do I need to modify it with the actual window names?

Thanks
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Fri Mar 05, 2010 4:50 pm    Post subject: Reply with quote

Laraptor wrote:
This is what i got from Winspy

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: JWLISTSUB1
Text:
Color: 0x800000 (Blue=80 Green=00 Red=00)
Sorry I forgot to add that you also get the Window Title & Class from the Spy.

Anyway this may work.
Code:
ControlGetText, controlText, JWLISTSUB1, **Window Title** ; <-- Use the Window Title from AU3_Spy.
   msgbox % controlText


Please post your results.
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
Laraptor



Joined: 29 Jan 2010
Posts: 41
Location: Decatur, AL

PostPosted: Fri Mar 05, 2010 5:01 pm    Post subject: Reply with quote

This is what im using.

!c::
MouseGetPos,,,win, cont
ControlGetText, controlText, JWLISTSUB1, S2K Enterprise ;
msgbox % controlText

And it always returns an empty msgbox.
Back to top
View user's profile Send private message
tomoe_uehara



Joined: 05 Sep 2009
Posts: 1591
Location: Somewhere near you

PostPosted: Fri Mar 05, 2010 5:06 pm    Post subject: Reply with quote

Code:

F8::
ControlGetText, controlText, JWLISTSUB1, S2K Enterprise
msgbox %controlText%
return

; OR

F9::
ControlGetText, controlText, JWLISTSUB1, S2K Enterprise
clipboard := controlText
return

_________________

The quick onyx goblin jumps over the lazy dwarf
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Fri Mar 05, 2010 5:11 pm    Post subject: Reply with quote

The control name indicates that it's a list or sub-list from a listbox, try this and see what it does:

Code:
!c::
ControlGet, controlText, List, , JWLISTSUB1, S2K Enterprise
MsgBox % controlText
return

_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Laraptor



Joined: 29 Jan 2010
Posts: 41
Location: Decatur, AL

PostPosted: Fri Mar 05, 2010 5:20 pm    Post subject: Reply with quote

I dont know what I am doing wrong... all these do are return empty msgboxes. Crying or Very sad
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group