|
Loading...
|
applescript-users@lists.apple.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Do shell script question - timeouts Alex Zavatone Sun Apr 01 12:00:47 2012
mdns doesn't stop. It keeps running.
Even if I remove the redirects, control is never returned from the shell
Try this:
on run
set myShellString to "mdns -B _afpovertcp._tcp. local"
do shell script myShellString
end
Don't forget to killall mdns afterwards.
I just got an idea to have a little instant simple sharing between all my
machines since iChat file transfer fails on 1/2 of my Macs now and I've got
enough 10.6.x macs that Airdrop is not a solution.
Just want to instantly discover all the AFP macs on the network, check for a
volume on it that is hostname - Share, log on to it and drop off a file, then
dismount. A simple file send to the other Mac in my list.
It's a little project I might have time to get together and this might be fun.
On Apr 1, 2012, at 2:34 PM, Doug McNutt wrote:
> At 12:34 -0400 4/1/12, Alex Zavatone wrote:
>> Hi. I was thinking of writing a quick automatic file sharer by detecting
>> all the local machines on a network and setting up a share on each.
>>
>> To do this, I was trying this:
>>
>> set myShellString to "mdns -B _afpovertcp._tcp. local > ~/AFP.txt 2>&1"
>> do shell script myShellString
>>
>> set myShellString to "killall mDNS"
>> do shell script myShellString
>>
>> But the shell command mdns doesn't stop, so the execution doesn't proceed
>> past the first shell script, so I tried this:
>>
>> on main()
>> try
>> with timeout of 1 second
>> set myShellString to "mdns -B _afpovertcp._tcp. local >
>> ~/AFP.txt 2>&1"
>> do shell script myShellString
>> end timeout
>> end try
>>
>> set myShellString to "killall mDNS"
>> do shell script myShellString
>> end main
>>
>>
>> But that seems sort of lame, almost like a cop out. Is there is a preferred
>> method to say to the shell to run for a while, to not wait for a response,
>> or is this the way to do it?
>
>
> The redirection of both stdout and stderr you're calling for results in no
> information returning to AppleScript.
>
> I would hope that a child-died signal would tell the script to proceed but I
> wonder??
> What shows up in APF.txt?
>
>
>
> --
>
> Applescript syntax is like English spelling:
> Roughly, though not thoroughly, thought through.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list ([EMAIL PROTECTED])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/applescript-users/zavpublic%40mac.com
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to [EMAIL PROTECTED]
_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list ([EMAIL PROTECTED]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/applescript-users/alexiscircle%40gmail.com Archives: http://lists.apple.com/archives/applescript-users This email sent to [EMAIL PROTECTED]
- Do shell script question - timeouts Alex Zavatone 2012/04/01
- Re: Do shell script question - timeouts Doug McNutt 2012/04/01
- Re: Do shell script question - timeouts Alex Zavatone 2012/04/01 <=
- Re: Do shell script question - timeouts Alex Zavatone 2012/04/01
- Re: Do shell script question - timeouts Joe 2012/04/01
- Re: Do shell script question - timeouts Alex Zavatone 2012/04/01