Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

widget.system Function



Ok. I am working on developing a widget which executes the following command

var commandLoc = widget.system("/usr/bin/which " +
someUnixCommand,null).outputstring //The someUnixCommand is a variable
set earlier in the script

My problem is this; The string returned from this command contains the
end of line character "\n" which completely messes up the string when
I try to execute the commandLoc string in a different instance of the
widget.system call.

Is there a way in JavaScript to evaluate this string and remove the
"/n" from the string returned in the widget.system call? I am sure
that there is some way to do it but I just cannot think of it off the
top of my head!

Thanks in advance.

--
Jesse Almanrode
Webmaster/Systems Administrator
www.jacomputing.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.