0

I'm trying to edit a 3rd party script written in AppleScript (OAS...I think) to dim the volume after showing changes. I've tried changing the opacity & switching to a transparent image using a repeat loop & current date without success.

set T1 to seconds of (current date)
set T2 to T1 + 5
repeat with T1 from T2 to T2
   set opacity to 0 (*or do shell script...)
end repeat

This should work I'm just struggling with implementation.

  • Are you sure you mean "dim the volume" not something else? – JMY1000 Feb 16 '16 at 3:08
  • *Dim the volume HUD. I'm asking generally how to implement a command after a set time in applescript. – noshery Feb 16 '16 at 3:20
  • Ah, got it. Making an answer now! – JMY1000 Feb 16 '16 at 3:21
0

Use the delay command. It's very simple: it simply delays by the given time in seconds. Example: delay 5 would delay for 5 seconds.

  • @noshery Great. If that solves the problem, don't forget to mark this as solved! – JMY1000 Feb 16 '16 at 3:23
  • The code runs a couple of "if" loops and executes "do shell script" to display an image in geek tool. Theoretically I could use this delay function afterward but how would I apply an image. – noshery Feb 16 '16 at 3:34
  • @noshery I'm a little confused as to what you mean. What's preventing use from using the delay function? What can't you use it after? Can you provide more context? – JMY1000 Feb 16 '16 at 3:51
  • I'm not sure how to call an image in geek tool using Applescript. The way this code does it is by using, do shell script ("image path"). This would rerun the code & I'd like to simply hide that final image after using delay. – noshery Feb 16 '16 at 3:55
  • @noshery I'm still not entirely clear. Can you post the relevant code somewhere so I can look at it? – JMY1000 Feb 16 '16 at 3:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .