Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'If behind a proxy server ...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
If behind a proxy server ...
Authored by: tbolt502 on Mar 01, '04 02:22:20PM
Another addition.

In a previous hint, the author had iTunes turn down the volume before speaking.

I think this was a nice touch and use it often in scripts.
This would then become:

on idle
    do shell script "curl"
		tell application "iTunes"
			set sound volume to 15
			delay 1
			say "Your Network Connection is now available"
			display dialog "Network Connection now available."
			delay 1
			set sound volume to 75
		end tell

    on error
      -- say "DSL still down."
  end try
  return 120
end idle

[ Reply to This | # ]
If behind a proxy server ...
Authored by: geordie on Mar 01, '04 06:40:41PM
Thanks for the hint about lowering the volume. However, no offense, that is just wrong to do it. You should never reset something to a different value than what it was before you started. Use the lines:

   set oldVolume to sound volume
   set sound volume to 15
   ...  say stuff ....
  set sound volume to oldVolume
I would actually probably set it to 20% percent of the previous volume instead of static value of 15 in the second line as well, but that is more a personal taste thing.

[ Reply to This | # ]