Forum Discussion

anuprai29's avatar
anuprai29
Occasional Contributor
10 years ago

Returns a LONG integer value created from two SHORT integers.

Hi,   Is there anyway in VBScript to Returns a LONG integer value created from two SHORT integers.   e.g: I have two co-ordinates X and Y and I want to convert these two interger value in a singl...
  • HKosova's avatar
    HKosova
    10 years ago

    Hi Anup,

    Here you are:

     

    Call PostMessage(..., MakeLParam(739, 441))
    
    Function MakeLParam(x, y)
      MakeLParam = (x And &HFFFF&) Or (y * &H10000)
    End Function

     

    But I still recommend using DblClick, because it does all the extra work for you - like bring the window to front, make sure it can receive clicks (that is, not overlapped by a modal window), and so on. Maybe DblClick just needs different coordinates. Try recording the click and see how it's recorded.