Jump to content

Encode spaces as + for MailPlane


Recommended Posts

I found a script online that I can get to work and it's works in Alfred but for only single words.  I see an option to encode spaces as + in custom browser searches but I can't figure out the needed AppleScript - could I get some help?

 

tell application "Mailplane 3"
	open location "mailplane://email%40gmail.com/#search/{query}"
end tell

 

Link to comment
3 minutes ago, deanishe said:

urlEncode is what you're after.

 

http://applescript.bratis-lover.net/library/url/

 

Thanks, I am sorry I am not the most famliar with scripting.

 

Do I paste

 

on urlEncode(str)
	local str
	try
		return (do shell script "/bin/echo " & quoted form of str & ¬
			" | perl -MURI::Escape -lne 'print uri_escape($_)'")
	on error eMsg number eNum
		error "Can't urlEncode: " & eMsg number eNum
	end try
end urlEncode

Above my code in Alfred?

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...