Page 1 of 1

set bottom left corner of stack to clicklocation

Posted: Mon Jan 19, 2015 9:39 pm
by makeshyft
Hi everyone, I'm working on a multi-monitor setup (which I suspect is part of the difficulty), and I'm trying to accomplish a very simply thing, open a stack and set its bottom left corner to the location of where the user clicked the mouse. due to the differences in how loc is calculated for stacks, I can't seem to figure out how to do this. Maybe its just one of those days....

Any help would be appriciated

Re: set bottom left corner of stack to clicklocation

Posted: Mon Jan 19, 2015 11:01 pm
by dave.kilroy
hi makeshyft - you could use:

Code: Select all

on mousedown
   set the bottomleft of the current stack to the screenmouseloc
end mousedown
Inside the script of a card or stack. However I've just tested it and found it rather hard to control the position of the stack - if you wanted to modify it so that the effect only takes place if the user clicks whilst ctrl is down the code would change to:

Code: Select all

on mousedown
   if controlkey() = "down" then set the bottomleft of the current stack to the screenmouseloc
end mousedown

[Solved] Re: set bottom left corner of stack to clicklocatio

Posted: Mon Jan 19, 2015 11:23 pm
by makeshyft
Thank you so much Dave .....I was close .... I worked with mouseloc and clickloc. ty.