• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Uptime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Uptime


  • Subject: Uptime
  • From: Gnarlodious <email@hidden>
  • Date: Sun, 12 Sep 2004 10:24:30 -0600

Title: Uptime
Uptime (AppleScript)     

Saturday, August 21, 2004


-- http://Gnarlodious.com/Apple/AppleScript/
-- Uses CronniX http://www.koch-schmidt.de/cronnix/ to periodically show your uptime in iChat's status display
-- Set up CronniX like this: http://Gnarlodious.com/Apple/AppleScript/iChat/Uptime.png

set upString to do shell script "uptime | tr -d ',' "


if (do shell script "echo " & upString & "| awk '{print $4}' ") = "days" then
   display dialog "edit me"
   
set upTime to (do shell script "echo " & upString & "| awk '{print $3}' ") as number
   if upTime > 7 then

      

      
set numberString to "012"
      
set randomString to ""
      
repeat until (count of items in randomString) is equal to 2
         set i to some item of numberString
         set randomString to randomString & i
      end repeat

      

      
tell application "iChat"
         
set prevStatus to status message
         set status message to upTime
         delay randomString as number
         set status message to prevStatus
      end tell

      

   
end if
end
if


Top | Made with Script Debugger 3.0
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Uptime
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Re: Chevrons test
  • Next by Date: Re: Chevrons test
  • Previous by thread: Re: Address Book scripting
  • Next by thread: Re: Uptime
  • Index(es):
    • Date
    • Thread