nacerbaaziz Posted December 9, 2019 Posted December 9, 2019 screen curtain on autoit windows 8 + hello autoit forum please i've a question on windows 8 and more the micro soft added the Magnification options this future can help the blind by turn the screen black to To relax the eyes. i searched allot in autoit but i couldn't find any way to do it and after then i found an python addon can do that, it's an addon open source to screen reader NVDA i hope you can help me to convert it to an autoit script note i couldn't do that because I'm very fresh man in dealing with dll files inadition to am 0 on python please if any one can help me. this is the NVDA Python Addon it very small, i need just one future that turn the screen black thx in advance screenCurtain.rarr
Moderators JLogan3o13 Posted December 9, 2019 Moderators Posted December 9, 2019 @nacerbaaziz how long have you been on this forum now? Responses to your topics are always the same - no one is going to help you when you show zero effort. Come back with what you have tried, and where you are stuck, and the community will try to help. If you are going to use your typical response of "well I just don't know how" then I guess you are out of luck. ***In case you missed it, this is a Mod stepping into a thread*** "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
nacerbaaziz Posted December 9, 2019 Author Posted December 9, 2019 i know that sir, but i have a problem with the using of dll files and working with objects in an other languages for that i cam here and asced you to help me, because for me the autoit is the easy language for the blind users and others am sorry please this is what i've tried but there is just one problem on the function i couldn't understand it here is the code global $Open = DLLOpen("Magnification.dll") global $call = DLLCall($Open, "BOOL", "MagInitialize") if @error then exit global $TRANSFORM_BLACK = TRANSFORM_BLACK() global $setBlack = DLLCall($Open, "BOOL", "MagSetFullscreenColorEffect", "PTR", $TRANSFORM_BLACK) sleep(5000) DLLCall($Open, "BOOL", "MagUninitialize") dllClose($Open) exit func TRANSFORM_BLACK() ;here i've the problem, I couldn't understand how to convert colors using the MAGCOLOREFFECT ;the Url doc from the microSoft is here ;https://docs.microsoft.com/en-us/windows/win32/api/magnification/ns-magnification-magcoloreffect ;i just want to transform the black color please endFunc TRANSFORM_BLACK = winMagnification.MAGCOLOREFFECT() TRANSFORM_BLACK.transform[4][4] = 1.0 TRANSFORM_DEFAULT = winMagnification.MAGCOLOREFFECT() TRANSFORM_DEFAULT.transform[0][0] = 1.0 TRANSFORM_DEFAULT.transform[1][1] = 1.0 TRANSFORM_DEFAULT.transform[2][2] = 1.0 TRANSFORM_DEFAULT.transform[3][3] = 1.0 TRANSFORM_DEFAULT.transform[4][4] = 1.0 class MAGCOLOREFFECT(Structure): _fields_ = (("transform", c_float*5*5),) def magnificationErrCheckFactory(outputArguments=0): def errCheck(result, func, args): if result == 0: return False if outputArguments>0: return args[-1*outputArguments:] return True return errCheck i hope you can help meand here is the function from the python
Moderators JLogan3o13 Posted December 9, 2019 Moderators Posted December 9, 2019 If someone wants to go through the headache of trying to help you, they are welcome to. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
nacerbaaziz Posted December 9, 2019 Author Posted December 9, 2019 @JLogan3o13 i posted what i tried as you said. Do I committed any other errors? am sorry about that, but I really could not do that, and I want to learn. Forgive me if I bother you. thx
KaFu Posted December 9, 2019 Posted December 9, 2019 #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIHObj.au3> Local $tColorMatrix = _GDIPlus_ColorMatrixCreate() ;create color matrix Local $iX, $iY For $iX = 0 To 3 ;manipulate some values in the color matrix For $iY = 0 To 3 DllStructSetData($tColorMatrix, "m", Random(0, 0.5), $iY * 5 + $iX + 1) Next Next Global $Open = DllOpen("Magnification.dll") Global $call = DllCall($Open,"bool","MagInitialize") If @error Then Exit @error Global $setBlack = DllCall($Open, "BOOL", "MagSetFullscreenColorEffect", "PTR", DllStructGetPtr($tColorMatrix)) Sleep(5000) DllCall($Open, "BOOL", "MagUninitialize") DllClose($Open) Exit OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
nacerbaaziz Posted December 9, 2019 Author Posted December 9, 2019 @KaFu , thx very much there is a smalle problem on this code i hope you help me the color of the screen woun't be black what i need is to be the screen all black with out any think on the screen this can help the blind users to work and They write their sensitive information without being spied on by those who sit next to them i hope you can help thx in advance.
KaFu Posted December 9, 2019 Posted December 9, 2019 #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIHObj.au3> Local $tColorMatrix = _GDIPlus_ColorMatrixCreate() ;create color matrix ; A 5×5 color matrix is a homogeneous matrix for a 4-space transformation. For $i = 1 To 25 Switch $i Case 25 ; The element in the fifth row and fifth column of a 5×5 homogeneous matrix must be 1 DllStructSetData($tColorMatrix, 1, 1, $i) Case 21 To 24 ; and all of the other elements in the fifth column must be 0. DllStructSetData($tColorMatrix, 1, 0, $i) Case 5, 10, 15, 20 ; The fifth component of a color vector is always 1. DllStructSetData($tColorMatrix, 1, 1, $i) Case Else ; The first four components of a color vector hold the red, green, blue, and alpha components (in that order) of a color. DllStructSetData($tColorMatrix, 1, 0, $i) ; rgba > black EndSwitch Next Global $Open = DllOpen("Magnification.dll") Global $call = DllCall($Open, "bool", "MagInitialize") If @error Then Exit @error Global $setBlack = DllCall($Open, "BOOL", "MagSetFullscreenColorEffect", "PTR", DllStructGetPtr($tColorMatrix)) Sleep(5000) DllCall($Open, "BOOL", "MagUninitialize") DllClose($Open) Exit OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
nacerbaaziz Posted December 9, 2019 Author Posted December 9, 2019 (edited) @KaFu , that exactly what i need, thank you very very much Edited December 9, 2019 by nacerbaaziz
seadoggie01 Posted December 9, 2019 Posted December 9, 2019 53 minutes ago, nacerbaaziz said: this can help the blind users to work and They write their sensitive information without being spied on by those who sit next to them Can't they just turn off their monitors? 😐 That seems like a weird way to do it. All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
nacerbaaziz Posted December 9, 2019 Author Posted December 9, 2019 @seadoggie01 , Many laptops don't support screen turning off.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now