ll_libload user, "user32.dll"
ll_getproc SendInput, "SendInput", user
#module
#deffunc dragdrop int, int, int, int
mref sx, 0 : mref sy, 1 : mref ex, 2 : mref ey, 3
dim inputs, 28
inputs.0 = 0, sx * 65536 / dispx, sy * 65536 / dispy, 0, 0x8001, 0, 0
inputs.7 = 0, 0, 0, 0, 0x0002, 0, 0
inputs.14 = 0, ex * 65536 / dispx, ey * 65536 / dispy, 0, 0x8001, 0, 0
inputs.21 = 0, 0, 0, 0, 0x0004, 0, 0
prm = 4, 0, 28
ll_getptr inputs : ll_ret prm.1
ll_callfunc prm, 3, SendInput@
return
#global
screen 0, 400, 300, , 100, 50
dialog "ウィンドウのドラッグアンドドロップを開始します"
dragdrop 150, 55, 450, 355 // (150, 55)で掴み、(450, 355)で離す
stop
|