Double-Click pictslider

Jul 2, 2009 at 5:15am

Double-Click pictslider

Is there a way to double-click the pictslider and have it jump to a specified location? I’ve been playing around with js, but I’m not getting very far with it. Thanks.

Jul 2, 2009 at 8:50am

Try the patch below, it’s not ideal because the pointer jumps to where you first click and then moves to the predefined place. The alternative is to roll your own with [jsui] where you can use ondblclick().


– Pasted Max Patch, click to expand. –
Jul 2, 2009 at 3:21pm

Thanks lh, that is exactly the kind of thing I was looking for! I was hoping to avoid redoing my pictsliders with jsui. I have a question for you though. What is the [p doubleclick] using to tell when you are clicking on the pictslider as opposed to just clicking somewhere else in the patcher? Thanks, again!

Jul 2, 2009 at 9:12pm

Well at the moment it isn’t but if you give your [pictslider] a unique scripting name then you could use [hover] to figure out if the mouse is above it or not. Here’s a small example.


– Pasted Max Patch, click to expand. –
Jul 3, 2009 at 1:03am

Well, that’s really strange. This morning when I was looking at your example, it only worked when I double-clicked on on the pictslider and not when clicking on the white space. But now when I just tried it again (your original example) it didn’t matter where I double-clicked. That’s what prompted my question. I figured I could use [hover], I was just puzzled about why it was working already. Apparently I had a friendly ghost in my machine this morning. Oh well, thanks for both examples!


You must be logged in to reply to this topic.