Author Topic: How to pin-code with OsMode, inside Lisp-Ascii?>  (Read 217 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Newt
  • Posts: 160
How to pin-code with OsMode, inside Lisp-Ascii?>
« on: March 29, 2021, 10:31:07 AM »
Q1=How we can transform "PROCESSOR_IDENTIFIER" to
Word-Pin?(for selling lisp on internet)
Code: [Select]
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
ProgramFiles=C:\Program Files
PROMPT=$P$G
Please, you help me ,
 :tongue2:Warning. Even my-self cannot execute the "pp_rolisonfelipe_jcpin25.lsp"
without (setvar "Osmode" 598) at  line-command, before C:Q2[enter].


Code - Auto/Visual Lisp: [Select]
  1. ;;My Name="pp_rolisonfelipe_jcpin25.lsp"
  2. (defun pp_codeblock( / $rr addps mes dyn nop lpt movd edi mes llmail lds ldc)  
  3.   (setq;|a8334|;
  4.          addps (jc_pin25 1082 (list  "ADD_LIST"))
  5.          dyn (jc_pin25 58503 (list  "[YNC]" "\nSalva0 sysvar(y.yes)(n.no): "))
  6.          nop (if (=  dyn "Y") (jc_pin25 1082 (list  "GETVAR")) nil)
  7.          lpt (list "ANGDIR" "ANGBASE" "CMDECHO" "ATTREQ" "ATTDIA" "DIMZIN")
  8.          j_lstore (if nop (mapcar nop lpt) nil)
  9.          MES (list "JAN./2021" "FEV./2021" "MAR+τ./2021" "MAR+τ./2021" "ABRIL./2021" "MAIO./2021" "JUN./2021" "JUL./2021" "AGO./2021" "SET./2021" "OUT./2021" "NOV./2021" "DEZ./2021")
  10.          verba (list "Mihai Eminescu@Luceafarul" "A fost odata ca-n povesti" "A fost ca niciodata" "Din rude mari Ómparatesti" "O prea frumoasa fata" "---------------------" "Si era una la parinti" "Si m‚ndra-n toate cele" "Cum e Fecioara Óntre sfinti" "Si luna Óntre stele")
  11.          llmail (list "infoline.czechia@autodesk.com" "autodesk@cargraphics.com" "agandara@cargraphics.com" "michele.silva@cargraphics.com.br" "alexandra.ladaniuski@cargraphics.com.br" "agandara@cargraphics.com" "autodesk@cargraphics.com" "adriana.cardenas@cargraphics.com.br" "rama.dunayevich@autodesk.com")
  12.          lds (list "REVISAO" "ESCPROJJ" "END_OBRA" "CONTRATO" "MES" "VERBA" "LLPROJJ" "LLSPROJ" "LLNCITY" "LLNOME" "LLENDE" "LLMAIL")
  13.          ldc (list "REVISAO" "ESCPROJJ" "CONTRATO" "NES" "VERBA" "LLPROJJ" "LLNCITY" "LLENDE"))
  14.  (sEtq movd ""
  15.   movd (strcaT movd "dcl_settings : default_dcl_settings { audit_level = 0; }\n//////////////////////\nEXECUTAR_TELA_CARIMBO : dialog  ");;
  16.   movd (strcaT movd "\n{label = \"STANDARD┬⌐2021\";\n:row{\n : boxed_column{ label=\"[ INFORME OS DADOS DA OBRA ]\";\n : popup_list {label = \"SOLICITANTE         \"       ; key = \"LLNCITY\"                             ;fixed_width=true;width=30;edit_width =70;}\n : popup_list {label = \"TITULO PROJETO  \"                ; key = \"LLPROJJ\"                             ;fixed_width=true;width=30;edit_width =70;}\n : popup_list {label = \"SUBTITULO           \"    ; key = \"LLSPROJ\"                             ;fixed_width=true;width=30;edit_width =70;}\n : edit_box        {label = \"ENDERECO OBRA \"             ; key = \"END_OBRA\"                            ;fixed_width=true;width=30;edit_width =70;}\n ");;
  17.   movd (strcaT movd " }\n}\n:row{\n : boxed_column{ label=\"[ DADOS COMPLEMENTARES  ]\";\n : popup_list {label = \"TIPO RECURSO    \"           ; key = \"VERBA\"                                       ;fixed_width=true;width=0;edit_width =70;}      \n : edit_box   {label = \"NO.   CONTRATO   \"          ; key = \"CONTRATO\"                            ;fixed_width=true;width=0;edit_width =70;}\n }\n}\n:column{\n : boxed_row{ label=\"[ DADOS DO DESENHO ]\";\n : popup_list {label = \"MES/ANO\"                          ; key = \"MES\"                                 ;fixed_width=true;width=20;edit_width =10;alignment=centered;}  \n : edit_box   {label = \"ESCALA \"                            ; key = \"ESCPROJJ\"     ");;
  18.   movd (strcaT movd "                   ;fixed_width=true;width=0;edit_width =10;}\n : edit_box {label = \"REVISAO \"                           ; key = \"REVISAO\"                             ;fixed_width=true;width=0;edit_width =10;}\n }\n}\n:column {\n :row{ label=\"\";\n : button {label = \" SAIR \"                                         ; key = \"BT-SAIR\" ; fixed_width=true;width=15;alignment=centered;}\n : button {label = \"FORMATO AMBAS\"                              ; key = \"BT-CA-AMBAS\"                 ; fixed_width=true;width=0;alignment=centered;is_default=true;}\n : button {label = \"FORMATO STANDARD\"                        ; key = \"BT-CA-EMPRESA\"                       ; fixed_width=true;width=0;alignment=centered;is_default=true;}\n ");;
  19.   movd (strcaT movd " spacer_1;\n }\n }\n ok_cancel;\n spacer;\n}\n "))
  20.  
  21.   (setq;|a16528|;
  22.          edi (jc_pin25 2416 (list  movd "EXECUTAR_TELA_CARIMBO"))
  23.          movd "") (jc_pin25 20094 (list  "MES")) (mapcar addps MES) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "VERBA")) (mapcar addps VERBA) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLPROJJ")) (mapcar addps lpt) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLSPROJ")) (mapcar addps ldc) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLNCITY")) (mapcar addps lds) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLNOME")) (mapcar addps lpt) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLENDE")) (mapcar addps lpt) (jc_pin25 38045 (list )) (jc_pin25 20094 (list  "LLMAIL")) (mapcar addps llmail) (jc_pin25 38045 (list )) (if (not NN_MES) (setq;|a16938|;
  24.          NN_MES "0")) (if (not NN_VERBA) (setq;|a16964|;
  25.          NN_VERBA "0")) (if (not NN_REVISAO) (setq;|a16990|;
  26.          NN_REVISAO "R0")) (if (not NN_ESCPROJJ) (setq;|a17016|;
  27.          NN_ESCPROJJ "1: 50")) (if (not NN_END_OBRA) (setq;|a17042|;
  28.          NN_END_OBRA "RUA ")) (if (not NN_CONTRATO) (setq;|a17068|;
  29.          NN_CONTRATO "ADD N-™ CONV+ΦNIO")) (if (not NN_PROJJ) (setq;|a17094|;
  30.          NN_PROJJ "0")) (if (not NN_SPROJ) (setq;|a17120|;
  31.          NN_SPROJ "0")) (if (not NN_CITY) (setq;|a17146|;
  32.          NN_CITY "0")) (if (not NN_NOME) (setq;|a17172|;
  33.          NN_NOME "0")) (if (not NN_ENDE) (setq;|a17198|;
  34.          NN_ENDE "0")) (if (not NN_MAIL) (setq;|a17224|;
  35.          NN_MAIL "0")) (foreach nop lds (set (jc_pin25 1082 (list  "dyn")) (eval (jc_pin25 1082 (list  (strcat "NN_" nop))))) (setq;|a17328|;
  36.          mes (if (=  dyn nil) "0" (jc_pin25 55118 (list  nop dyn))))) (foreach nop ldc (set (jc_pin25 1082 (list  "dyn")) (strcat "(SETQ NN " nop " $value)")) (action_tile nop dyn)) (action_tile "BT-CA-EMPRESA" "(DONE_DIALOG 2)") (action_tile "BT-CA-AMBAS" "(DONE_DIALOG 1)") (action_tile "BT-SAIR" "(DONE_DIALOG 0)") (action_tile "accept" "(done_dialog 3)") (action_tile "cancel" "(setq acl nil)(done_dialog 4)") (setq;|a17580|;
  37.          $rr (start_dialog)) (unload_dialog edi)
  38. $rr)
  39.  
  40.  
  41. ;;;rem:Use this function only for DEBUG mode
  42. (Defun ACRX_T(s183 / rr) (setq rr nil)
  43.     (setq rr (if (=  (type s183) (quote STR))
  44.           s183 (prompt "\nt183errorS**")))
  45. rr)
  46.  (setq acad_iso11w100-extmin 1558 acad_iso11w100-extmax 59089)
  47.  (setq acad_isoQsortTime 00:00.00)
  48.  (setq runiftry11w125 (list (cons 19780209 "pp_rolisonfelipe.lsp")
  49.  (coNs 38603 "end_list");;County.xml=8
  50.  (coNs 19496 "start_list");;County.xml=8
  51.  (coNs 1644 "read");;County.xml=5
  52.  (coNs 28160 "alert");;County.xml=2
  53.  (coNs 10493 "vl-prin1-to-string");;County.xml=1
  54.  (coNs 2854 "dfn_dcl_i_save");;County.xml=1
  55.  (coNs 14928 "open");;County.xml=1
  56.  (coNs 18122 "wcmatch");;County.xml=1
  57.  (coNs 59089 "dfn_getx_readkey");;County.xml=1
  58.  (coNs 1558 "assert_cxx");;County.xml=1
  59.  (coNs 25163 "strcase");;County.xml=1
  60.  (coNs 4898 "close");;County.xml=1
  61.  (coNs 54116 "new_dialog");;County.xml=1
  62.  (coNs 54552 "set_tile");;County.xml=1
  63.  (coNs 53270 "vl-filename-mktemp");;County.xml=1
  64.  (coNs 19675 "write-line");;County.xml=1
  65.  (coNs 40567 "grread");;County.xml=1
  66.  (coNs 56446 "load_dialog");;County.xml=1
  67. ))
  68. (setq getmypid (list "54193") acad__assertNo 0 setmypid "https://youtu.be/cuBbQ6K45YY?t=21")
  69. (defun jc_pin25(mypid loopwne / rom subf j_retw)
  70.    (setq j_retw (abs (getvar "OSMODE")))
  71.    (setq subf (cdr (assoc (boole 6 mypid j_retw) runiftry11w125)))
  72.    (setq setmypid (list "\n" subf "=" getmypid))
  73.    (setq rom (apply (read subf) loopwne))
  74.    (setq getmypid (itoa acad__assertNo) acad__assertNo (1+ acad__assertNo))
  75. rom)
  76.  
  77.  (setq acad_isoQsortTimp 00:00.00)
  78.  (setq acad_isoSortTotal 00:00.00)
  79.  (princ)
  80.  
  81. ;;rem:dfn_cad_amain
  82. (DeFun C:q2()
  83.   (setq;|a873|;
  84.          dfn_pp_v1chkR nil)  
  85.   (pp_rolisonfelipe_app)
  86. )
  87.  
  88. (defun assert_cxx (/ $rr)
  89.   (setq;|a1348|;
  90.          khc85 "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD"
  91.          acad__assertNo 0
  92.          kHereAiciHeirIciAqui 0767004316
  93.          erlsp khc85)
  94. )
  95. ;;{--}
  96. (Defun asserte(mssg / $rr)
  97.   (if (=  erlsp nil) (jc_pin25 1088 (list )) (if (/= (type acad__assertNo) (quote INT)) (setq;|a3591|;
  98.          acad__assertNo 0))) (if (/= mssg nil) (setq;|a3635|;
  99.          erprv erlsp
  100.          acad__assertNo (+ acad__assertNo 1)
  101.          erlsp (strcat (jc_pin25 10923 (list  mssg)) ":" (itoa acad__assertNo))) (foreach $rr (list "\nAssertE=" erlsp "*" erprv) (princ $rr))) (if (>= acad__assertNo kHereAiciHeirIciAqui) (jc_pin25 27734 (list  (strcat "Hi! eBreakPoint kHereAiciHeirIciAqui=" (itoa kHereAiciHeirIciAqui)))))
  102. erlsp)
  103.  
  104. (DeFun C:pp_rolisonfelipe_app()
  105.      (pp_rolisonfelipe_app )
  106. )
  107.  
  108. (prompt "\nCommand.com: Q2[enter]\n")
  109. (Defun pp_rolisonfelipe_app( / )
  110.  
  111. ;------------------------Stdcall "pp_codeblock "
  112.   (setq _ax (pp_codeblock ))
  113. ;------------------------
  114.  
  115.   (princ "\nEnd")  
  116. T)
  117. ;(User Labels)
  118. ;(pp_codeblock)
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. (setq j_lstore nil)
  145.  
  146. ;Lib:free
  147. (defun dfn_dcl_i_save(a110 fncn / rr dI qm nn fc) (asserte "A110")
  148.   (setq;|a20164|;
  149.          qm nil
  150.          nn (jc_pin25 53824 (list  "0user.dcl"))
  151.          fc (jc_pin25 14342 (list  nn "w"))) (if fc (progn  (jc_pin25 20109 (list  a110 fc)) (jc_pin25 4468 (list  fc)) (setq;|a20288|;
  152.          fc nil))) (setq;|a20304|;
  153.          dI (jc_pin25 56872 (list  nn))) (setq;|a20328|;
  154.          rr dI) (if (and  (>  dI (- 1)) (not (jc_pin25 53554 (list  fncn dI)))) (setq;|a20398|;
  155.          qm "<a110error>Acad__eFileNotOpen\n <file>\n"
  156.          qm (strcat qm nn "</file>\n <defun>:" fncn "</defun>\n</a110error>")
  157.          rr (list (jc_pin25 27734 (list  qm)) (princ qm))
  158.          rr (- 3)))
  159. rr)
  160.  
  161.  
  162. ;;Inf:Wait until press keys k
  163. (defun dfn_getx_readkey(k574 t469 / retc kbd msg two chk lei)
  164.   (setq;|a23220|;
  165.          retc (chr 0)
  166.          kbd (if (>  k574 "") k574 "")) (setq;|a23280|;
  167.          msg (if (>  t469 "") t469 "\nByA:DragneAdrian2019=T469error<>Str:")) (prompt msg) (progn (setq;|a23330|;
  168.          chk (if (>  (strlen kbd) 1) 0 1)) (while (=  chk 0) (progn  (setq;|a23386|;
  169.          two 0) (while (/= two 2) (setq;|a23424|;
  170.          lei (jc_pin25 39969 (list ))
  171.          two (car lei)) (setq;|a23472|;
  172.          retc (jc_pin25 24605 (list  (chr (cadr lei))))) (setq;|a23512|;
  173.          chk (if (>  kbd "") (if (jc_pin25 17564 (list  retc kbd)) 1 0) 0)))))) (princ retc)
  174. retc)
  175.  
  176. (defun vl_load_com(/ $rr)
  177.  (if (null con_modspace)  (progn (vl-load-com) (prompt "\n\n")
  178.  (setq vlax_true :Vlax-True
  179.        vlax_false :Vlax-False
  180.        kHomeRegistry "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD")
  181.  (setq con_acadapp (vlax-get-acad-object))
  182.  (setq con_acdoc (vla-get-activedocument con_acadapp))
  183.  (setq con_acdocUtility (vla-get-utility con_acdoc))
  184.  (setq con_modspace (vla-get-modelspace con_acdoc))
  185.  (setq con_appwiz (vla-get-application con_acadapp))
  186.  (setq con_chspace (vlax-get-property con_acdoc
  187.           (if (zerop (getvar "CVPORT")) (read "PaperSpace") (read "ModelSpace"))))
  188.  ;; set a reference to the current model space
  189.   ))
  190. )
  191.  
  192. ;Lib:free
  193.  ;;{$R dfn_cad_amain_eof2 T229@:024116run="devcinfo.exe
  194.  (prompt "\ncommand.com: Q2[enter]\n")
  195. ;;</dfn_cad_amain_eof2>
  196. [code]
  197.  
  198.  
« Last Edit: March 29, 2021, 12:59:02 PM by d2010 »

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9596
Re: How to pin-code with OsMode, inside Lisp-Ascii?>
« Reply #1 on: March 29, 2021, 12:42:58 PM »
I am not sure how to replace the text with a word pin (as you type, like a password prompt). But if you are just talking about encryption of an existing string you could employ a simple ROT13 or any other simple encryptions (even a simple XOR encryption will do for most cases-i.e. not overly sensitive data).

I tried to run that lisp and I get a "string type error" meaning, it didnt work. Sorry.
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org