Coder Social home page Coder Social logo

Comments (3)

ianzhao05 avatar ianzhao05 commented on August 28, 2024 1

Thank you for the suggestion. I will consider working on it once I have a bit more time.

from textshot.

K53N0 avatar K53N0 commented on August 28, 2024 1

Hey man @ianzhao05, I kinda found an easy way for this (for windows) by using the Magnify.exe in Windows32.

So, after the already existing imports in textshot.py, I basically added the following code:

import pyautogui
pyautogui.hotkey('win', '=')

and added pyautogui.hotkey('win', 'esc') in the mouseReleaseEvent method (before the if statement) for the OneTimeSnipper class.

    def mouseReleaseEvent(self, event):
        pyautogui.hotkey('win', 'esc')
        if self.start == self.end:
            return super().mouseReleaseEvent(event)

So basically what this does is open the default windows magnifying glass after the script has been run, and closes it before the script ends. Of course one would need to pip install pyautogui for this to work.

And you can set the default settings for Magnify.exe under Start > Ease of Access > Magnifying Glass.
In particular the most important setting is the Magnifier view. I set this to Lens mode, size 10, 10.
Default zoom level can be changed based on one's preference.

I know this isn't the most sophisticated method but I'm new to programming and it worked for me, so I dropped by since the tool is so useful and I wanted to contribute in some way.

from textshot.

ianzhao05 avatar ianzhao05 commented on August 28, 2024 1

Hey @K53N0 that's awesome, thanks for sharing! That could definitely be a solution for Windows. Unfortunately, I am trying as much as possible to have it work cross platform, which probably means implementing magnification within the script itself. However, your way is a great workaround.

from textshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.