Jump to content
winterflags

Exclude Workflow from Dropbox Sync

Recommended Posts

Is there some way to exclude a certain workflow from syncing between my two computers running Alfred? I'm using Dropbox to sync Alfred.

 

The reason is that when I access computer A from computer B via screen sharing, pressing ALT + SPACE will Show Alfred on computer B, and not computer A.

 

So I've set up an alternative Hotkey to Show Alfred. But now I need to be able to only use it on computer A, and not computer B.

 

Thanks!

Share this post


Link to post

You can use Applescript to write a workflow that behaves differently depending on which computer it's running on.  Basically you'd set your hotkey to call an Applescript like this:

 

set theComp to computer name of (system info)
if theComp = "computer A" then
	// do something
else if theComp = "computer B" then
	return
end if

 

Share this post


Link to post
4 hours ago, dfay said:

You can use Applescript to write a workflow that behaves differently depending on which computer it's running on.  Basically you'd set your hotkey to call an Applescript like this:

 


set theComp to computer name of (system info)
if theComp = "computer A" then
	// do something
else if theComp = "computer B" then
	return
end if

 

 

Thanks for that dfay, that should work nicely.

 

I tried assigning an Alfred Hotkey to SHIFT + ALT + SPACE, and then tried to bind it to Run NSAppleScript and alternatively Run Script, can't get it to work however.

 

Should this script be functional?

 

set theComp to computer name of (system info)
if theComp = "Computer-A" then
	tell application "System Events" to keystroke "space" using {option down}
else if theComp = "Computer-B" then
	return
end if

I also tried to prepend/append:

on alfred_script(q)
end alfred_script

… which didn't do anything.

 

FYI, I got computer name via 

scutil --get ComputerName

 

Edited by winterflags

Share this post


Link to post
53 minutes ago, deanishe said:

This should do the trick:

 

set myName to computer name of (system info)

if myName = "MACHINE NAME" then

    tell application "Alfred 3" to search

end if

 

 

 

Thanks a lot!

 

Got it to work by assigning hotkey and binding it to a Run NSAppleScript with these contents:

 

on alfred_script(q)
	set myName to computer name of (system info)
	if myName = "Computer-A" then
    		tell application "Alfred 3" to search
	end if
end alfred_script

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...