News:

Welcome to our NEW forum! We invite you to sign up today
so it can grow to be a valuable resource to all Toolbox users!

Main Menu

[Tip] Search for text in the current folder, image, or window

Started by Paul (Lead Developer), May 27, 2026, 10:00:31 PM

Previous topic - Next topic

Paul (Lead Developer)

Sometimes you are looking at an image (or folder/window) that has a lot of text, and you need to know if certain text is in it. For documents, you'd normally use the search function with the document's app, but for viewed images or a folder/window this isn't possible. This action, when bound to a hotkey, will search the current folder, image or window for the text you specify. Just press the hotkey when the item is active, and enter the text to find. You will then be told if the text is present or not (the action can't highlight or select the text for you).

Note: This action uses Windows OCR, so any failure to find the text is due to Windows (the OS) and not AlomWare Toolbox. ;D

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Alert: Ask for a line of text "Search for this text:"
0002 Window: Assign active ""
0003 Window: Set windoc$ variable ""
0004 Action: Do this block if "windoc$<>blank$"
0005  Image: Assign "windoc$"
0006  Data: Assign "image"
0007 Action: End of block ""
0008 Action: Do this block if "windoc$=blank$"
0009  Image: Assign "window"
0010  Data: Assign "window"
0011 Action: End of block ""
0012 Action: Match case "0"
0013 String: Assign from assigned image ""
0014 Action: Do next step if "string$?alert$"
0015  String: Assign "The data$ DOES contain "alert$"."
0016 Action: Do next step if "string$!alert$"
0017  String: Assign "The data$ does NOT contain "alert$"."
0018 Alert: Show a message "string$"
(End)