Evaluate each line of an open document without clipboard

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
vbmark
Posts: 36
Joined: 30 Nov 2013, 22:17

Evaluate each line of an open document without clipboard

06 Dec 2013, 14:15

I have a large text document that must be edited while open.

I want to evaluate each line to see if it starts with a collection of certain words.

If the line does start with one of the words then I will do some key sends.

Is there a way to do this without copying every line, one at a time, to the clipboard and then getting the clipboard in order to do the evaluation? Is there a more direct way?
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Evaluate each line of an open document without clipboard

06 Dec 2013, 15:56

Depends on the program the document is open in...
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
vbmark
Posts: 36
Joined: 30 Nov 2013, 22:17

Re: Evaluate each line of an open document without clipboard

06 Dec 2013, 19:35

Can you please explain technically why that is the case? For example Notepad++ vs Word. How would the script differ?
kon
Posts: 1756
Joined: 29 Sep 2013, 17:11

Re: Evaluate each line of an open document without clipboard

06 Dec 2013, 19:40

Well for one you could use COM in MSWord.
vbmark
Posts: 36
Joined: 30 Nov 2013, 22:17

Re: Evaluate each line of an open document without clipboard

06 Dec 2013, 20:02

That's pretty cool. In this case it will be Visual Studio but I don't know if it provides COM access or not.
nimda

Re: Evaluate each line of an open document without clipboard

06 Dec 2013, 22:47

I think you'll be better off with FileRead / file objects.
vbmark
Posts: 36
Joined: 30 Nov 2013, 22:17

Re: Evaluate each line of an open document without clipboard

07 Dec 2013, 06:17

That doesn't work on an open file that needs to have keystrokes sent to it.
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Evaluate each line of an open document without clipboard

08 Dec 2013, 13:58

yea its not gonna be visible to ahk. without a fileread tactic its going to be pretty hard. I tried some basics with MSAA just to see if it would work
have a look at this thread
looks like it can work
http://www.autohotkey.com/board/topic/7 ... ntry495073
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Evaluate each line of an open document without clipboard

08 Dec 2013, 15:28

Just try'd with UIA and that works for me.

heres a example: ScreenReader by nepter http://www.autohotkey.com/board/topic/9 ... -anywhere/

Hope it helps
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
vbmark
Posts: 36
Joined: 30 Nov 2013, 22:17

Re: Evaluate each line of an open document without clipboard

08 Dec 2013, 22:15

OK, I think I'll just use the clipboard.

Thanks.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 214 guests