IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label Expected. Show all posts
Showing posts with label Expected. Show all posts

Tuesday, February 5, 2013

Help Expected end of line, etc. but found end of script.

here is the sctipt ive tried to write, its not finished so some of the things my seem a bit weird at the moment but here it is as it stands

 

global okflag

set okflag to false

set front_app to (path to frontmost application as Unicode text)

 

-- check if iTunes is running

tell application "System Events"

          if process "iTunes" exists then

                    set okflag to true --iTunes is running

          end if

end tell

 

if okflag is true then

 

          set Timer to ""

  display dialog "Sleep Time (Minutes)" default answer Timer buttons {"Cancel", "OK"} default button 2

          set Timer to text returned of the result

 

          delay Timer * 60

 

          tell application "iTunes"

                    set currentVolume to the sound volume

                    if (player state is playing) then

                              repeat

                                        --Fade down

                                        repeat with i from currentVolume to 0 by -1

                                                  set the sound volume to i

                                                  delay 1

                                        end repeat

                                        pause

                                        --Restore original volume

                                        set the sound volume to currentVolume

                                        exit repeat

                              end repeat

 

                    if okflag is false then

 

                    display dialog "iTunes not playing" buttons {"OK"} default button 1 with icon stop

 

                    end if

                    end

 

it doesnt seem to work after the tell "iTunes part i copied and pasted from another applescript

(the purple text)


View the original article here