Get Scaling DPI in logs

As you know the selectors in SAP dont function if DPI scaling is changed to other number than 100%. In our productive bot sometime the SAP selectors fail. I have told IT to fix DPI scaling to 100% and they said they have fixed it even then the selectors are failing. So I want to get the DPI scale in logs of my bot.

Hi @Mohite_Bhushan

Can you try this PowerShell script to get the DPI value

PowerShell script to get DPI scaling value

$dpiValue = (Get-ItemProperty ‘HKCU:\Control Panel\Desktop’ -Name LogPixels).LogPixels

Log the DPI scaling value

Write-Host “DPI Scaling Value: $dpiValue”

Store the DPI scaling value in a variable for further use

$BotVariable = $dpiValue

This script fetches the DPI scaling value from the Windows registry and logs it. You can adapt this approach to your specific RPA platform and logging mechanisms.

Thank you Nitya. But we decided to use another method which is not dependent on scaling