Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I specify udp port with applescript? #61

Open
moshed opened this issue Dec 5, 2016 · 4 comments
Open

How do I specify udp port with applescript? #61

moshed opened this issue Dec 5, 2016 · 4 comments

Comments

@moshed
Copy link

moshed commented Dec 5, 2016

i know in shell i can do echo -n black | nc -4u -w0 localhost <port number> but i cant figure out how to accomplish this in applescript (besides using do shell script "command")

http://imgur.com/a/tlRXc

this would suggest its possible to set the udp port but i cant figure out the syntax.

@tonsky
Copy link
Owner

tonsky commented Dec 6, 2016 via email

@moshed
Copy link
Author

moshed commented Dec 6, 2016

hmm ok ill try and report my results here thanks!

@npazo
Copy link

npazo commented Dec 14, 2016

I found that doing do shell script doesn't work as you would expect. Because the echo it uses by default doesn't support -n. Therefore I had to provide the full path to echo. Thus my AppleScript line became:

do shell script "/bin/echo -n 'blue' | nc -4u -w0 localhost 1738"

Might want to add to the README for anyone else that tries to do this.

@moshed
Copy link
Author

moshed commented Dec 15, 2016

yeah i arrived at same conclusion @npazo did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants