Loading ...
Sorry, an error occurred while loading the content.

[Clip] Revised MD5 checksum clip

Expand Messages
  • Charles M. Raine
    This is a fairly major revision of this clip. I found some deficiencies in the way the clip displayed the initial criteria and the handling of missing
    Message 1 of 1 , Nov 21, 2005
    • 0 Attachment
      This is a fairly major revision of this clip. I found some deficiencies in
      the way the clip displayed the initial criteria and the handling of missing
      information. The file selection criteria is only displayed for the second
      and third initial criteria.

      Enjoy!

      H="GetMD5 ID"
      ;_Modified-Updated~Created
      ;_20051114_3:57:08p_hsavage@...
      ;_20051121_8:30:01p_C. M. Raine
      ^!ClearVariables
      ^!SetWizardTitle CHECKSUM MD5 ID for
      ^!SetWizardLabel Select Primary Criteria
      ;
      ^!Set %md5%=^?{Selected Text or File
      Checksum==SELECTED_TEXT|FILE_TEXT|_WHOLE_FILE}
      ;
      ^!IfSame 'SELECTED_TEXT' '^%md5%' SELECTED_TEXT
      ^!SetWizardLabel Browse and Select File
      ^!Set %filename%=^?{(T=O)GET MD5 CHECKSUM for=C:\}
      ^!Goto ^%md5%
      :SELECTED_TEXT
      ^!If ^$GetSelSize$=0 Next Else Skip_2
      ^!Info Make Text Selection and try again...
      ^!Goto EXIT
      ^!SetClipboard ^$GetMD5Text(^$GetSelection$)$
      ^!Goto END
      :FILE_TEXT
      ^!Set %md5%=^%md5% for ^$GetFileName(^%filename%)$
      ^!SetClipboard ^$GetMD5Text(^$GetFileText(^%filename%)$)$
      ^!Goto END
      :WHOLE_FILE
      ^!Set %md5%=^%md5% for ^$GetFileName(^%filename%)$
      ^!SetClipboard ^$GetMD5File(^%filename%)$
      :END
      ^!Info ^%md5^%nl%^$GetClipboard$
    Your message has been successfully submitted and would be delivered to recipients shortly.