Advertisement
Guest User

Fix Blurry text

a guest
Aug 9th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.91 KB | None | 0 0
  1. _CheckDPI()
  2.  
  3. Func _CheckDPI()
  4.     Local $dpiread = RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", @ScriptFullPath)
  5.     If Not StringInStr($dpiread, "~ GDIDPISCALING DPIUNAWARE") Then
  6.         RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", @ScriptFullPath, "REG_SZ", "~ GDIDPISCALING DPIUNAWARE")
  7.         _ScriptRestart()
  8.     EndIf
  9. EndFunc   ;==>_CheckDPI
  10.  
  11. Func _ScriptRestart($fExit = 1)
  12.     Local $Pid
  13.     If Not $__Restart Then
  14.         If @Compiled Then
  15.             $Pid = Run(@ScriptFullPath & ' ' & $CmdLineRaw, @ScriptDir, Default, 1)
  16.         Else
  17.             $Pid = Run(@AutoItExe & ' "' & @ScriptFullPath & '" ' & $CmdLineRaw, @ScriptDir, Default, 1)
  18.         EndIf
  19.         If @error Then
  20.             Return SetError(@error, 0, 0)
  21.         EndIf
  22.         StdinWrite($Pid, @AutoItPID)
  23.     EndIf
  24.     $__Restart = 1
  25.     If $fExit Then
  26.         Sleep(50)
  27.         Exit
  28.     EndIf
  29.     Return 1
  30. EndFunc   ;==>_ScriptRestart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement