Zmodem commented on a Page, drive properties  -  Sep 10, 2008

Hey, thanks and I'm glad you enjoyed that! :-D You can also cut corners in the code in a bunch of spots. I will suggest more in the morning, but basically, in your sclick event, you've got a ton of room for space-saving. Your recursive usage of the $($+(... is completely unnecessary. In other words, you can replace your sclick dialog event with this:

on *:dialog:drive.properties:sclick:*: {
  var %a = did -a drive.properties 5
  if (($did = 4) && ($disk($did(drive.properties,3)))) {
    did -r drive.properties 5
    set %drive $did(drive.properties,3)
    %a Listing %drive Properties
    %a ------------------------
    %a Path: $disk(%drive).path
    %a Type: $disk(%drive).type
    %a Label: $disk(%drive).label
    %a Size: $bytes($disk(%drive).size,g) Gbs
    %a Free: $bytes($disk(%drive).free,g) Gbs
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.