image
image

Go Back   macosx.com > Content & Information > Apple News, Rumors & Discussion

Reply
 
Thread Tools
  #1  
Old December 5th, 2001, 02:42 AM
Jasoco's Avatar
Video Gamer/Collector
 
Join Date: Jun 2001
Location: Doylestown PA
Posts: 499
Thanks: 0
Thanked 0 Times in 0 Posts
Jasoco is on a distinguished road
Can I make an AppleScript to display Uptime in dialog?

Well, can I? So I can doubleclick on it and it will pop up a box with all the info that pops up when I type Uptime in the terminal. Without having to launch Terminal.
__________________
Confucious Say: Jasoco, change your gosh darn SIGNATURE! it's been like that forever!
Never disobey Confucious.

Jasoco.net - GeekPub Forums
Reply With Quote
  #2  
Old December 8th, 2001, 02:55 AM
Registered User
 
Join Date: Sep 2001
Location: Berkeley, CA
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
brachiator is on a distinguished road
yes

display dialog (Shell "uptime") buttons {"OK"}


of course, if you want an applet that you can double-click rather than run in script menu, you'll have to save as compiled
Reply With Quote
  #3  
Old December 9th, 2001, 01:57 PM
Jasoco's Avatar
Video Gamer/Collector
 
Join Date: Jun 2001
Location: Doylestown PA
Posts: 499
Thanks: 0
Thanked 0 Times in 0 Posts
Jasoco is on a distinguished road
Unhappy

It won't run. It says Expected ", " but found ".
__________________
Confucious Say: Jasoco, change your gosh darn SIGNATURE! it's been like that forever!
Never disobey Confucious.

Jasoco.net - GeekPub Forums
Reply With Quote
  #4  
Old December 10th, 2001, 08:34 PM
Monster Destroy
 
Join Date: Sep 2000
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
jcbphi is on a distinguished road
I believe the above script requires a scripting addition to be installed, OSX Power Additions Lite. I believe Shell is one of its commands. I don't know if there is anyway to do this with the standard Applescript (while Terminal is scriptable, its not very full featured). Try downloading and installing it, though I can't promise this will help (I don't have the software installed on this machine to check).

http://www.vampiresoft.com/Products/...oweraddos.html
Reply With Quote
  #5  
Old December 11th, 2001, 03:12 PM
Excalibur's Avatar
Registered User
 
Join Date: Sep 2001
Location: Bay Area, CA
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Excalibur is on a distinguished road
Smile This will work

I got this one to work for me. Save as an application and all you have to do is double click it.

Code:
tell application "Terminal"
	do script with command "uptime"
	delay 1
	set the_results to contents of window 1
	close every window
end tell
display dialog paragraph 4 of the_results buttons {"OK"}
__________________

.: Quicksilver G4 1.33GHz: OSX 10.4.1: Radeon9800Pro: 1.5GB: 80GB
.: Al 15" 1.25GHz: 10.4.1: Radeon9600Mobility: 512MB: 80GB: Superdrive: AE: Bluetooth
.: www.excalibur-design.com :.
.: End of line...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal ASCII/ANSI display bluehz Unix & X11 3 May 4th, 2003 12:50 PM
Help! OS X won't display the standard Font dialog! cerbero Mac OS X System & Mac Software 0 March 30th, 2003 12:58 PM
[HOWTO] - Use niutil gatorparrots HOWTO & FAQs 6 December 10th, 2002 04:24 PM
how do I make an applescript to logout? xaqintosh Mac OS X System & Mac Software 12 December 6th, 2002 04:50 PM
How to compile stuff fintler Unix & X11 1 August 28th, 2002 08:57 AM


All times are GMT -5. The time now is 09:15 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.