Subject: Re: [Witch Talk] witch applescript

From: Rob Griffiths <[email-masked]>
Date: Thu, 16 Mar 2017 17:01:02 -0700

On Mar 16, 2017, at 4:58 PM, William F <[email-masked]> wrote:

> i've set BTT gesture and Witch to option-tab but this setup doesn't work... your video is covering witch 3, and im using witch 4, where there is no option to "show list right away" (minute 7.23 of video.), which i suppose is what is needed for trackpad use (to avoid the disappearance of

Sure there is: 

> witch)... there's also no cancel button to close witch in horizontal mode (7.50 of the video)...

Not strictly necessary, and really only for vertical lists (it'd be difficult to display horizontally, as it's text.)

> last, how do i actually select an app with the trackpad after I've invoked it via BTT? does it have to be with a click or can i do it with the trackpad? right now i have the key below the ESC key as the trigger (without a modifier key because i can't get it to stay)

I'm not sure I understand the question or the "can't get it to stay" problem. You can use your trackpad to scroll the switcher and tap on an entry to activate it.

regards;
-rob.

---

From: William F <[email-masked]>
Date: Thu, 16 Mar 2017 16:58:05 -0700 (PDT)

thanks rob..

i've set BTT gesture and Witch to option-tab but this setup doesn't work... 
your video is covering witch 3, and im using witch 4, where there is no 
option to "show list right away" (minute 7.23 of video.), which i suppose 
is what is needed for trackpad use (to avoid the disappearance of witch)... 
there's also no cancel button to close witch in horizontal mode (7.50 of 
the video)... last, how do i actually select an app with the trackpad after 
I've invoked it via BTT? does it have to be with a click or can i do it 
with the trackpad? right now i have the key below the ESC key as the 
trigger (without a modifier key because i can't get it to stay)

On Thursday, March 16, 2017 at 4:03:07 PM UTC-6, Many Tricks wrote:
>
> On Mar 16, 2017, at 10:43 AM, William F <[email-masked] <javascript:>> 
> wrote:
>
> first, i couldnt get it to work with a "predefined action" in BTT (used 
> "open app" and selected witch in 
> /Users/x/Library/PreferencePanes/Witch.prefPane/Contents/Helpers/witchdaemon.app"), 
> but that does not activate Witch correctly. 
>
>
> That's because Witch isn't a normal app, and it's not activated by calling 
> it, nor by calling its daemon. The daemon is always running (you can see it 
> in Activity Monitor).
>
> I tried disabling "releasing all modifier keys..." option in Witch but 
> that did not help either. So I set up a keyboard shortcut without a 
> modifier key to activate Witch. That same keyboard shortcut was set in BTT. 
>
>
> You should be able to set an action in BTT to type Witch's activation 
> keystrokes -- set Witch to Option-Tab, then set BTT to send Option-Tab when 
> you perform your gesture of choice. I covered that in this video; skip to 
> 6:08 or so:
>
> <https://manytricks.com/witch/videos/witch5tips_1024.mov>
>
> I just tested again with Witch 4, and it's working fine.
>
> So now a three finger tap activates witch. But now i want that same three 
> finger tap to disappear witch, so i thought that maybe the "open 
> applescript" predefined action in BTT could do that. This is what I thought 
> would work but it doesn't, any ideas? 
>
>
> There's no support for dismissing Witch by repeating its activation keys, 
> because that's how you cycle through the list (Option-Tab to call Witch up, 
> hold Option, press Tab to cycle).
>
> As far as killing witchdaemon, I wouldn't recommend it, because you'd then 
> have to manually reactivate it, too. I have no idea when the "open 
> AppleScript thing in BTT will fire off, but as noted, witchdaemon is 
> designed to be always running.
>
> I don't know how you can make the panel vanish with the same shortcut, 
> because now you want one shortcut to do two things in BTT. You could define 
> another gesture, maybe three finger tap with Command or whatever, and have 
> that send the Escape key. Short of that, I don't think you set this up the 
> way you want it to work.
>
> regards;
> -rob.
>

---

From: Rob Griffiths <[email-masked]>
Date: Thu, 16 Mar 2017 15:03:05 -0700

On Mar 16, 2017, at 10:43 AM, William F <[email-masked]> wrote:

> first, i couldnt get it to work with a "predefined action" in BTT (used "open app" and selected witch in /Users/x/Library/PreferencePanes/Witch.prefPane/Contents/Helpers/witchdaemon.app"), but that does not activate Witch correctly.

That's because Witch isn't a normal app, and it's not activated by calling it, nor by calling its daemon. The daemon is always running (you can see it in Activity Monitor).

> I tried disabling "releasing all modifier keys..." option in Witch but that did not help either. So I set up a keyboard shortcut without a modifier key to activate Witch. That same keyboard shortcut was set in BTT. 

You should be able to set an action in BTT to type Witch's activation keystrokes -- set Witch to Option-Tab, then set BTT to send Option-Tab when you perform your gesture of choice. I covered that in this video; skip to 6:08 or so:

<https://manytricks.com/witch/videos/witch5tips_1024.mov <https://manytricks.com/witch/videos/witch5tips_1024.mov>>

> So now a three finger tap activates witch. But now i want that same three finger tap to disappear witch, so i thought that maybe the "open applescript" predefined action in BTT could do that. This is what I thought would work but it doesn't, any ideas? 

There's no support for dismissing Witch by repeating its activation keys, because that's how you cycle through the list (Option-Tab to call Witch up, hold Option, press Tab to cycle).

As far as killing witchdaemon, I wouldn't recommend it, because you'd then have to manually reactivate it, too. I have no idea when the "open AppleScript thing in BTT will fire off, but as noted, witchdaemon is designed to be always running.

I don't know how you can make the panel vanish with the same shortcut, because now you want one shortcut to do two things in BTT. You could define another gesture, maybe three finger tap with Command or whatever, and have that send the Escape key. Short of that, I don't think you set this up the way you want it to work.

regards;
-rob.

---

From: William F <[email-masked]>
Date: Thu, 16 Mar 2017 10:43:44 -0700 (PDT)

hi, i've set up BetterTouchTool to activate Witch 4... i use a three finger 
tap.. 

first, i couldnt get it to work with a "predefined action" in BTT (used 
"open app" and selected witch in 
/Users/x/Library/PreferencePanes/Witch.prefPane/Contents/Helpers/witchdaemon.app"), 
but that does not activate Witch correctly. I tried disabling "releasing 
all modifier keys..." option in Witch but that did not help either. So I 
set up a keyboard shortcut without a modifier key to activate Witch. That 
same keyboard shortcut was set in BTT. 

*set* appName *to* "witchdaemon"

*if* *application* appName *is* running *then*

*do shell script* "killall witchdaemon"

*else*

*do shell script* "open '/Users/x
/Library/PreferencePanes/Witch.prefPane/Contents/Helpers/witchdaemon.app'"

*end* *if*