Author Topic: resource dll  (Read 3532 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7527
resource dll
« on: August 27, 2004, 11:43:42 AM »
What is the fastest way to add bmp's to a dll and have the resource name be the same as the filename minus the extension? I have 70 that I want to compile. I've been using res hack but been adding them one at a time .

Thanks,

Ron :(

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

M-dub

  • Guest
resource dll
« Reply #1 on: August 27, 2004, 11:51:50 AM »
I was going to say Resource Hacker, but you're obviously as annoyed with it as I am....I mean, it works, but it takes a while to do.  I would also be very interested in any replies you get.

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
resource dll
« Reply #2 on: August 27, 2004, 11:56:25 AM »
You dont have VB huh?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

M-dub

  • Guest
resource dll
« Reply #3 on: August 27, 2004, 11:58:26 AM »
Uhh...Yeah, but still have LOTS to learn about it.  Apparently, we haven't covered the DLL section of the course yet! ;)
I'll have to give that a try!
Thanks!

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
resource dll
« Reply #4 on: August 27, 2004, 12:01:11 PM »
Well if you got VB, read up on it. Making an empty dll is REAL easy. (cant get much easier then that. :lol:)

If you dont, Reshacker is the best i can think of. (Actualy its the only thing i can think of. LoL)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ronjonp

  • Needs a day job
  • Posts: 7527
resource dll
« Reply #5 on: August 30, 2004, 10:24:51 AM »
It can be done fairly quick with resource hacker if you generate a script. I modified one of the lisp routines I have to make the script from acad. All you have to do is precede it with:


Code: [Select]
[FILENAMES]
Exe=      yourpath with no spaces in the name\empty.dll

SaveAs=         yourpath with no spaces in the name\empty2.dll



[COMMANDS]




here is the script:


Code: [Select]
(defun C:resource (/ FULL_NAME LOG_NAME FNAME_DIR FNAME_LIST PAREN
  SCR_NAME FILE IN)
  (setq FULL_NAME (getfiled "Select a lisp file" "" "bmp" 8))
  (if FULL_NAME (progn
    (setq LOG_NAME (getvar "loginname"))
    (setq FNAME_DIR (vl-filename-directory FULL_NAME))
    (setq FNAME_LIST (vl-directory-files FNAME_DIR "*.bmp"))
    (setq PAREN "\"")
    ;;; Write script File
    (if FNAME_LIST (progn
      (setq SCR_NAME (strcat FNAME_DIR "\\resource.scr"))
      (setq FILE (open SCR_NAME "w"))
      (setq IN 0)
      (repeat (length FNAME_LIST)
        (setq FNAME (nth IN FNAME_LIST))
        (setq FNAME (vl-filename-base FNAME))
        (write-line (strcat "-Add" "space" FNAME_DIR "\\" FNAME ".bmp" "," "space" "BITMAP" "," FNAME "," ) FILE)

       (setq IN (1+ IN))
      );;repeat
      (close FILE)
;;; Uncomment this line of code to execute the script file
;;      (command "script" SCR_NAME)
    ))
  ))
  (princ)
)



Look in the help file on how to run a script.


Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

daron

  • Guest
resource dll
« Reply #6 on: August 30, 2004, 10:59:02 AM »
Ron, are you actually starting to learn this lisp stuff?

ronjonp

  • Needs a day job
  • Posts: 7527
resource dll
« Reply #7 on: August 30, 2004, 11:28:20 AM »
I've been trying to learn but mostly still a "thief".  :D  (the code above isn't mine)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC