Quote:
Originally Posted by eldon
Hi,
I am hoping that someone here can help me with the Monitor Mod on the Max 2. (Monitor_Mod3.apk and onyx-monitor-move-pointer-hack-7a.py)
I have it almost working. I can see that using two fingers for right click is registering the x,y coordinates but when the cursor tries to move python gives me the below error. Any advice on how I should proceed?
I am using Windows 7 and Python 2.7.15. I do not know if it matters but I am using a Macbook with Parallels (Windows 7).
C:\Python27>python 7a.py
07:49:40.418000 | 0 | 1751, 814
07:49:40.418000 | 261 | 1751, 814
07:49:41.350000 | 6 | 1724, 877
07:49:42.147000 | 1 | 2347,1059
07:49:45.885000 | 0 | 1904, 957
Traceback (most recent call last):
File "7a.py", line 232, in <module>
main()
File "7a.py", line 137, in main
mouse.press(x, y) #LMB Down
File "C:\Python27\pymouse\windows.py", line 33, in press
self.move(x, y)
File "C:\Python27\pymouse\windows.py", line 71, in move
windll.user32.SetCursorPos(x, y)
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: Don't know how
to convert parameter 1
Thanks!
Eldon
|
Dear all,
Congratulations for this great thread which definitely convinced me of ordering the Max2 to use it as a monitor. Overall I'm fully satisfied with the visual quality and with the hacks developed throughout this discussion thread.
I have been experiencing the same error described by Eldon (see quote above). It looks like this comes from using float X and Y variables for mouse events instead of integers. Nothing to do with Parallels or anything. Adding a few int() here and there was enough to fix it, so I'm attaching a proposed update which is now working for me.
I also inverted the scrolling direction by adding a minus sign, I just find it more natural because it’s identical to how I scroll pages on my smartphone. I guess this is more of a personal preference.
In addition, I've also added a couple of lines which will work only for Windows users, to automatically turn High Contrast on whenever the script is launched, and off when the device is disconnected. Easy to remove for those who don't wish to use this functionality.
I'm currently investigating ways to auto-play the script when the device is connected, to make integration even more seamless. So far, AutoPlay doesn't pop up when I plug the Max2 to my computer... if someone has any thoughts about that, I'm interested!
Please note that the MobileRead forum doesn't allow attachments with the .pyw extension, but if you replace the .py with .pyw I also optimized the script to run in the background with no open console window. Just need to launch it when the device is connected and the process will exit once the USB cable is unplugged.
In terms of graphic optimization, I was wondering: don't you think that a dedicated ICC profile could be a good option to obtain a cross-platform standard for pre-processing? The profile could be designed specifically to process the display data flow into 16-tone grayscale and incorporate Cqman's tips:
- Saturation 0% (grayscale)
- Brightness +25%
- Contrast +50%
- Gamma 1.00
- Digital vibrance +50%
(or any better setting according to calibration).
Then it would be very easy to add this profile on any OS (Windows, Mac or Linux) and make it the default profile for the Onyx monitor only. This way, we would no longer need to activate High Contrast or anything...
I'm switching between my regular screen and Onyx several times a day depending on whether I need to read PDFs or draw colorful sketches and PPTs and I find it a bit annoying that I need to activate High Contrast every time. In addition, my system doesn't allow me to use Cqman's settings on the software side.
The only thing is, I don't have the tools nor the skills to develop an ICC profile. If anyone is more conversant with those things, could you please let me know if 1) this sounds like a good idea and 2) how difficult this would be to implement? Otherwise I can try to look into it but cannot promise anything...