Disk space function

Björnke von Gierke bvg at mac.com
Sun Jun 1 19:27:02 EDT 2003


this is fun and all, but why don't you just use the "diskSpace" 
function build right into RunRev?

On Montag, Jun 2, 2003, at 00:22 Europe/Zurich, Ken Ray wrote:

> Scott, you can use AppleScript to get it on the Mac, and use a shell
> command in Windows:
>
> Windows:
>
> on mouseUp
>   local tSpace
>   set the hideConsoleWindows to true
>   put shell("cd c:\ & dir") into tDirList
>   -- substitute 'd:\' or any other drive you want to test
>   put line (lineOffset("bytes free",tDirList)) of tDirList into
> tSpaceLine
>   get matchText(tSpaceLine," ([0-9,]*?) bytes free",tSpace)
>   replace "," with "" in tSpace
>   -- Now do something with tSpace
> end mouseUp
>
> Mac (appleScript):
>
> tell application "Finder"
>   get the free spaced of disk "Stormwinds"
> end tell
>
> Hope this helps,
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
>> -----Original Message-----
>> From: use-revolution-admin at lists.runrev.com
>> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
>> Scott Kinder
>> Sent: Sunday, June 01, 2003 7:08 AM
>> To: use-revolution at lists.runrev.com
>> Subject: Disk space function
>>
>>
>> Hi,
>>
>> I'm trying to make a 'digital tape recorder' and it would be
>> ideal to let people know in an updated dialog:
>>
>> Current file size of your recording is: 2mb
>> Space left on your drive is: 20gb
>>
>> Looks like you might have to use the detailed directories and
>> just add everything up.  Has anyone worked out anything better?
>>
>> Thanks,
>> Scott
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-> revolution
>>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list