Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _CheckDPI()
- Func _CheckDPI()
- Local $dpiread = RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", @ScriptFullPath)
- If Not StringInStr($dpiread, "~ GDIDPISCALING DPIUNAWARE") Then
- RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", @ScriptFullPath, "REG_SZ", "~ GDIDPISCALING DPIUNAWARE")
- _ScriptRestart()
- EndIf
- EndFunc ;==>_CheckDPI
- Func _ScriptRestart($fExit = 1)
- Local $Pid
- If Not $__Restart Then
- If @Compiled Then
- $Pid = Run(@ScriptFullPath & ' ' & $CmdLineRaw, @ScriptDir, Default, 1)
- Else
- $Pid = Run(@AutoItExe & ' "' & @ScriptFullPath & '" ' & $CmdLineRaw, @ScriptDir, Default, 1)
- EndIf
- If @error Then
- Return SetError(@error, 0, 0)
- EndIf
- StdinWrite($Pid, @AutoItPID)
- EndIf
- $__Restart = 1
- If $fExit Then
- Sleep(50)
- Exit
- EndIf
- Return 1
- EndFunc ;==>_ScriptRestart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement