Τρίτη 29 Απριλίου 2014

Πρόγραμμα σε Μ2000 με αγγλικούς χαρακτήρες

M2000 Script SINGCODE.GSB

Module SIGN {
                ' no GUI --- using only open file dialog and message box.
                folder$ = "C:\Program Files\DevStudio\VB\NewM2000\"
                {
                      Flush
                      ok = False
                      EXEORCAB folder$
' multiline variable assignment
                      singtoolpath$ = {signtool.exe sign /a @@
}
                      Try ok {
                            Read f$
                            If f$ = "" Then Error 100 ' make ok as false;
                      }
                      If ok Then {
                            f$ = quote$( f$ ) ' place inside quotes " "
                            singtoolpath$ = Replace$( "@@", f$, singtoolpath$ )
                            Report singtoolpath$ ' this is a special print command
                            Dos singtoolpath$ ;  ' execute dos command and wait
                            Wait 500  ' wait 500 miliseconds for filesystem to flush buffers
                            ? "ok"  ' this is as a normal Print command
                      }Else Exit ' exit  from block { } so here we don't have any after else;
                      folder$ = File.Path$( f$ )
                      If Ask( "Another Sign - Press Ok for Yes" ) = 1 Then Loop
                      }
                }
Module EXEORCAB {Read f$
                Open.File "", f$, "Files for signature", "Application (*.exe)|*.exe| Cabinet File (*.cab)|*.cab"
          }
 SIGN : End

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου

You can feel free to write any suggestion, or idea on the subject.