How to change the Melting position more often it is in the left corner

The problem in ahk melting occurs more often in the left corner I changed the numbers at random and it didn't work out

loop
{
    Random, xx, 50, A_ScreenWidth
    Random, yy, 0, A_ScreenHeight
    hDC := DllCall("GetDC", "Ptr", 0)
    
    DllCall("BitBlt", "Ptr", hDC, "Int", -0, "Int", 1, "Int", xx, "Int", yy, "Ptr", hDC, "Int", -0, "Int", -1, "UInt", 0x00C000CA)

    DllCall("ReleaseDC", "Ptr", 0, "Ptr", hDC)
    Sleep 1
}

Tried many times changed the numbers did not help

Upvotes: 0

Views: 43

Answers (1)

Just change the second Int value from BitBlt to a bigger value. Example:

loop
{
     Random, xx, 50, A_ScreenWidth
     Random, yy, 0, A_ScreenHeight
     hDC := DllCall("GetDC", "Ptr", 0)

     DllCall("BitBlt", "Ptr", hDC, "Int", -0, "Int", 50, "Int", xx, "Int", yy, "Ptr", hDC, "Int", -0, "Int", -1, "UInt", 0x00C000CA)

     DllCall("ReleaseDC", "Ptr", 0, "Ptr", hDC)
     Sleep 1
}

Upvotes: 0

Related Questions