I’m trying in a function binded to mouse to make an Exec command executed after a certain delay and only if something else is not happened (a Click).
More specific:
[code]Mouse 1 T A Window-Raise-RaiseMove
DestroyFunc Window-Raise-RaiseMove
AddToFunc Window-Raise-RaiseMove
- C Raise
- M Raise
- M Move
- I State 11 False
- C Window-Opacize
- M Window-Opacize
- I Window-DeOpacize
DestroyFunc Window-DeOpacize
AddToFunc Window-DeOpacize
- I Current (!State 11) Exec exec transset-df --id “$[w.id]” --dec 0.5
- I State 11 True
DestroyFunc Window-Opacize
AddToFunc Window-Opacize
- I Current (State 11) Exec exec transset-df --id “$[w.id]” --inc 0.5
- I State 11 True[/code]
What I want:
- If i just click the window is Raised (OK) but is not faded (NOTOK) (actually fade and return normal but it’s annoying; this is what i want to avoid)
- If i move, windows is moved (OK) and is faded (OK); on button release return normal (OK)
- If i hold mouse button the window fade (OK); on button release return normal (OK)
- The release after an hold is considered a click (OK)
What I tried:
- “+ I Schedule 500 Window-DeOpacize” but the schedule is executed after the button’s release
- “+ I PipeRead 'sleep 0.5 && echo Window-DeOpacize” but PipeRead is synchronous so an eventual Click is executed after Window-DeOpacize
- “+ H Window-DeOpacize” but the button release is not considered a click and i can’t Opacize again nor Raise
Do you have any suggestion? Or this can’t be done? I’m out of clues …
Thanks in advance