Jump to content

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!

Link to comment

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

 

Link to comment
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
Link to comment
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

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...