Sign in to follow this  
Followers 0
Rad

Help with right-clickable region

3 posts in this topic

#1 ·  Posted (edited)

Case $msg = $GUI_EVENT_SECONDARYDOWN
        $pos=MouseGetPos()
        $win=WinGetPos($windowname,"")
        If ($pos[0]-$win[0])>156 AND ($pos[1]-$win[1])>8 AND ($pos[0]-$win[0])>248 AND ($pos[1]-$win[1])>248 Then

The If/Then is frustrating me... Im trying to have it a region like (8,156,248,248) to fill the extra area in my program which width is 256x256. Anyone see an easier way to get if the SECONDARYDOWN was inside that area?

EDIT~Its pretty obvious it doesnt work because its checking that pos0-win0 is > 156 AND >248... so its off my box almost, and the X Y wouldnt match up either.. Ill see if that will work if I fix it. I hope theres an easier way though

Edit again, does the title bar add to window width? I think its working except its up to far... If it is, how tall is the title bar height? I guess it depends on windows settings... hmm

Edited by Rad

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Ohh thanks that would have helped earlier lol :/

Oh and this seems to work:

If ($pos[0]-$win[0])>8 AND ($pos[1]-$win[1])>148 AND ($pos[0]-$win[0])<254 AND ($pos[1]-$win[1])<274 Then

Lol Ill stop asking questions untill i mess with them for awhile :P

Edited by Rad

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0