I have to review countless Word documents. I highlight the important documents with yellow highlighting in Word, and don't highlight the unimportant ones.
Is there any way that an Autohotkey script to locate those Word documents which are highlighted, maybe in a FileList?
I've tried using things like @Joe Glines 's excellent AutomateMyTask, but that isn't working for me.
Using the Windows Spy, I've determined the color of the highlighting is c7c700. So could I use something like
PixelSearch, OutputVarX, c7c700
to find highlighted documents?
If so, how would I revise this code so it finds the highlighting? Here's where I'm stuck:
Gui, Add, ListBox, vListBox_ClList x16 y24 w1500 h1000 Gui, Show,, Test Gui Font BasePath := "C:\Users\RestOfPath\" FileList := "" InputBox, Filter, Directory Filter, Filter. 240, 130, 800, 1 loop, Files, % BasePath "*.*", FDR if PixelSearch, OutputVarX, c7c700 Sort, FileList, D| FileList := StrReplace(FileList, BasePath) GuiControl,, ListBox_ClList, %FileList% Gui, Show return
RussF Posts: 1406 Joined: 05 Aug 2021, 06:36
I think you might be headed in the wrong direction. PixelSearch searches for colored pixels that are displayed on the screen. A Word document doesn't have those pixels contained within it, only the codes necessary to tell Word where a highlight is supposed to go and what color that highlight is.
To use PixelSearch, your script would have to actually load the document in Word, search the visible window for the color, scroll down, search again, scroll down, search again and somehow be able to figure out when it has reached the end of the document. Not very efficient.
Here's a thought - since you apparently have already opened and reviewed each of those documents in order to highlight them, why not save them with a different name if they are highlighted in order to recognize them later. For example, "MyDocument.docx" becomes MyDocument_H.docx" or if you want to group all the highlighted files together, "H_MyDocument.docx"
Or, you could save them with the same name, but in a completely different folder, leaving the originals where they are.
I realize that this won't help with identifying your existing highlighted files, but will make it easier going forward.