Advertisement
retroman

Untitled

May 19th, 2025
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.65 KB | None | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3.  
  4. rem Define array of strings
  5. set strings[0]=3005 B1 c1 = 3005 B2 s1;
  6. set strings[1]=3023 P1 r2 = 3023 P2 l2;
  7. set strings[2]=3710 T3 s4 = 3710 T4 s3;
  8.  
  9. rem Path to ldcad32.exe (if not in PATH, set the full path)
  10. set "LDCAD=ldcad32.exe"
  11.  
  12. rem Loop through array
  13. set i=0
  14. :loop
  15. set "line=!strings[%i%]!"
  16. if defined line (
  17.    rem Generate .ldr file
  18.     echo !line! | ls2ldr.exe > "!line!.ldr"
  19.     echo Created "!line!.ldr"
  20.  
  21.     rem Launch ldcad32 and wait for it to close
  22.     start /wait "" "%LDCAD%" "!line!.ldr"
  23.     echo Closed LDCad for "!line!.ldr"
  24.  
  25.     set /a i+=1
  26.     goto loop
  27. )
  28.  
  29. endlocal
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement