Hi,
I recently installed version 5 of the windows scripting runtime and was 
playing with writing scripts for windows(the windows scripting host).  
This got me thinking about how JFW 3.3 allows you to create objects and the 
scripting engine provides a number of objects that give useful information 
about windows.  As an initial script along these lines for JFW 3.3 I wrote a 
script to get the free space on drive C.  
If you install version 5 of the scripting runtime you can add the following 
script to your default.jss file and attach it to a key(I used alt+shift+f).  
Now when ever I press the alt+shift+f combination I get a report of free space 
on drive C no matter where I am in windows.
This is just a beginning of what can be done with the objects made available 
through the scripting host.
If you want to give it a try, and have the scripting files installed, paste 
the following function into default.jss and attach it to a key.


Script GetFreeSpace ()
var
Object fso, 
Object d,
String s
        let fso = CreateObject("Scripting.FileSystemObject")
        let d = fso.GetDrive(fso.GetDriveName("c:"))
        let s = "Available space on drive C = "
        let s = s + IntToString (d.AvailableSpace/1024)
        let S = s + " KBytes"
        saystring (s)
EndScript

Let me know what everyone thinks.
Brett Lewis

------------------------------------------------------------
 Get your FREE web-based e-mail and newsgroup access at:
   http://MailAndNews.com and http://MailAndNews.co.uk

 Create a new mailbox, or access your existing IMAP4 or
 POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------

-
Visit the jfw ml web page: http://jfw.cjb.net

Reply via email to