Skip to content

Automatic actions on OCR'd filepaths or urls #265

Open
@CopaceticMeatbag

Description

@CopaceticMeatbag

Allow system default handler to auto action recognised filepaths or URLs
I've stumbled across this project looking for a solution to allow our MSTeams users to quickly and easily open network links in MSTeams (which only allows http or sharepoint links), but I can think of a myriad of cases where this will be useful. Basically after the OCR is done, we could check each line to see if it conforms to a specific format (e.g. maybe [A-Z]:.* to match network drive filepaths) then pass it off to explorer.exe to open with it's default handler. This would mean I can take a quick grab of a link pasted in Teams and have it open automatically, saving the user from manually selecting, copying, going to the appropriate program and pasting.

Potential suggested solution?
Example for FullscreenGrab.xaml.cs, after line 214 textFromOCR = grabbedText;

if (File.Exists(textFromOCR) || (Uri.TryCreate(textFromOCR, UriKind.Absolute, out Uri uriResult) && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps)))
            System.Diagnostics.Process.Start(textFromOCR);

Mode which would include change

  • Full-screen Grab
  • Grab Frame
  • Settings Window

Thanks very much for this excellent program, I wish I'd found this a lot sooner 😅 finally I can ditch my dodgy AHK scripts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions