AutoHotkey Community

It is currently May 27th, 2012, 4:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Capture text
PostPosted: March 5th, 2010, 3:49 am 
Offline

Joined: December 8th, 2009, 4:44 pm
Posts: 31
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}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:20 am 
Offline

Joined: March 13th, 2009, 3:17 pm
Posts: 16
the Clipboard is stored in as the variable %clipboard%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:32 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
WinGetText
Clipboard


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 10:35 am 
for pasting using F4 key:

Code:
F4::
Send, {CTRLDOWN}v{CTRLUP}
return[quote][/quote]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 2:13 pm 
Offline

Joined: February 19th, 2010, 6:28 pm
Posts: 18
http://www.autohotkey.com/forum/topic27331.html


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 4:40 pm 
Offline

Joined: January 29th, 2010, 6:05 pm
Posts: 41
Location: Decatur, AL
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 5:01 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 5:09 pm 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
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.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 5:26 pm 
Offline

Joined: January 29th, 2010, 6:05 pm
Posts: 41
Location: Decatur, AL
This is what i got from Winspy

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: JWLISTSUB1
Text:
Color: 0x800000 (Blue=80 Green=00 Red=00)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 5:31 pm 
Offline

Joined: January 29th, 2010, 6:05 pm
Posts: 41
Location: Decatur, AL
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 5:50 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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.

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:01 pm 
Offline

Joined: January 29th, 2010, 6:05 pm
Posts: 41
Location: Decatur, AL
This is what im using.

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

And it always returns an empty msgbox.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:06 pm 
Offline
User avatar

Joined: September 5th, 2009, 2:06 pm
Posts: 1713
Location: Somewhere near you
Code:
F8::
ControlGetText, controlText, JWLISTSUB1, S2K Enterprise
msgbox %controlText%
return

; OR

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

_________________
Image
The quick onyx goblin jumps over the lazy dwarf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:11 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 6:20 pm 
Offline

Joined: January 29th, 2010, 6:05 pm
Posts: 41
Location: Decatur, AL
I dont know what I am doing wrong... all these do are return empty msgboxes. :cry:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group