Home > Community > Forums > PCB SKILL > encrypter skill

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 encrypter skill 

Last post Fri, May 3 2013 6:53 AM by aCraig. 5 replies.
Started by seyerfred 30 Apr 2013 01:15 PM. Topic has 5 replies and 878 views
Page 1 of 1 (6 items)
Sort Posts:
  • Tue, Apr 30 2013 1:15 PM

    • seyerfred
    • Top 500 Contributor
    • Joined on Tue, Mar 12 2013
    • Posts 30
    • Points 725
    encrypter skill Reply

    Hi

    i want to write a skill to encrypt my skill file but my code doenst wok.. please help..

    here is my code:

     (defun encrypt () 

    file = axlDMFileBrowse(nil nil ?optFilters "Skill files(*.il)|*.csf|Dat files(*.dat)|*.dat|)("?title"Select Skill file to Encrypt"))

    if(!isDir("~/skill/encrypt") then 

       createDir("~/skill/encrypt")

    fileparts = axlDMFileParts(file)

    filepartsFileWext = nth(2 fileparts)

    fileEncParts = strcat("~/skill/encrypt/" filepartsFileWext) 

    encrypt(file fileEncParts eLock)

        )

    axlCmdRegister("encrypt" 'encrypt)

    • Post Points: 35
  • Wed, May 1 2013 6:45 AM

    • aCraig
    • Top 50 Contributor
    • Joined on Sat, Aug 16 2008
    • Pepperell, MA
    • Posts 132
    • Points 2,070
    Re: encrypter skill Reply

    Couple of things. First "encrypt" is a reserved word so redefine your function, maybe "myencrypt". Second the syntax is wrong for axlDMFileBrowe.

    Craig

    • Post Points: 5
  • Wed, May 1 2013 7:22 PM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    Re: encrypter skill Reply

    Hi,

    I made changes to your program-See attachment.

    -Pawan

    Filed under:
    • Post Points: 20
  • Thu, May 2 2013 5:04 AM

    • seyerfred
    • Top 500 Contributor
    • Joined on Tue, Mar 12 2013
    • Posts 30
    • Points 725
    Re: encrypter skill Reply

    Thanks craig and pawan...

     program still not functioning...

    • Post Points: 35
  • Thu, May 2 2013 5:50 PM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    Re: encrypter skill Reply

    Try to provide the Absoulte Path to the files instead of Relative path and see if it helps.

    -Pawan

    • Post Points: 5
  • Fri, May 3 2013 6:53 AM

    • aCraig
    • Top 50 Contributor
    • Joined on Sat, Aug 16 2008
    • Pepperell, MA
    • Posts 132
    • Points 2,070
    Re: encrypter skill Reply

    Try this:

     

    (axlCmdRegister "myencrypt" 'myencrypt)
    (defun myencrypt ()
    (let (file fileparts filepartsFile fileEncParts)
      file = axlDMFileBrowse(nil nil ?optFilters "Skill files (*.il)|*.il|)" ?title "Select Skill file to Encrypt")
      (when file
        (unless (isDir "./encrypt")
           (createDir "./encrypt")
        )
        fileparts = (axlDMFileParts file)
        filepartsFile = (cadr fileparts)
        fileEncParts = (strcat "./encrypt/" filepartsFile "-enc.il")
        (encrypt file fileEncParts "eLock")
      )
    ))

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by seyerfred at 30 Apr 2013 01:15 PM. Topic has 5 replies.