View Full Version : Unzipping/rezipping button files
clueless
05-29-2008, 10:10 AM
Hi, I'm making a 3rd party plugin for AMS which involves editing .btn button files during during runtime. Ive found plenty free OCX's for extracting files from a rar (i thinks AMS uses the rar format for button files?) but no dll's that lets me zip them back up again (silently). Does anyone know of anything (free) that could do the job?
holtgrewe
05-29-2008, 11:54 AM
I don't know if this will help, this was just recently 'bumped up'...
http://www.indigorose.com/forums/showthread.php?t=18574
clueless
05-29-2008, 12:44 PM
i've read that some people want winrar support in ams.. and then i found this.. a dll from and for winrar to pack, unpack etc rar files.. its it totally free for commercial and non-commercial use
This is the dll i have already got , i could be wrong but i dont think this can pack files as well as unpack. Ive practicaly finished the plugin to its just i never expected this to be an issue. :rolleyes
AudioSam
05-29-2008, 01:56 PM
I don't know if this will help.
It works for me to make the NEWBUTTON.btn file.
Give it a try by extracting a button into a folder on your desktop:
Folder Name on desktop : BUTTON TEST
Remove the original (Original.btn) file from the (BUTTON TEST) folder.
Put this on an on click of button of a test app:
FileTable = {"C:\\Documents and Settings\\Administrator\\Desktop\\BUTTON TEST\\*.*"};
Zip.Add("C:\\Documents and Settings\\Administrator\\Desktop\\BUTTON TEST\\NEWBUTTON.btn", FileTable, false, "", 5, nil, false);
You can now drag this NEWBUTTON.btn to your test app and veiw the app.
It worked for me.
I know you have some other steps to add, but maybe this will help some.
Not exactly what you asked for, but it may help you to get something going if you don't already have this figured out.
Added : I didn't go through the steps of getting my desktop folder.
I am running under Admin, so some of you would need to get your desktop folder.
AudioSam
AudioSam
05-29-2008, 02:19 PM
I think AMS uses the zip extension, Not rar for button files.
Then just change zip to btn and the btn file will work.
If memory is correct, when I used the rar extension for zipping it wouldn't work after changing it to btn.
AudioSam
RizlaUK
05-29-2008, 02:26 PM
I think AMS uses the zip extension, Not rar for button files.
Then just change zip to btn and the btn file will work.
yup, AMS uses zip format for .btn, .det and .apz files
i made a button packer/unpacker tool with PB when i first tried the zip functions, cant find it not tho, lol
AudioSam
05-29-2008, 02:29 PM
Hi Rizla,
I hope what I posted will help.
If not, add your touch and I know it will then.:yes
AudioSam
clueless
05-29-2008, 03:13 PM
Thanks , i think a zip format will be easier to find software for than the Rar format. The Zip functions that AMS allready has would be perfect except this is for a 'plugin' for AMS written in Visual Basic.
AudioSam
05-29-2008, 06:19 PM
Thanks , i think a zip format will be easier to find software for than the Rar format. The Zip functions that AMS allready has would be perfect except this is for a 'plugin' for AMS written in Visual Basic.
Hi Clueless,
Sometimes I think I understand the question untill I go back
and read it again... sorry m8 :huh
So that I and and maybe some other members may gain a little knowledge,
could you, or someone, explain the benefit of using a plugin to zip files
with, rather than you use the AMS zip function?
Thanks,
AudioSam
FoxLeader
05-29-2008, 07:14 PM
From what I understood, it's simply that he's coding with VB as it is not an AMS app. So he needs a plugin to code this with Visual Basic.
But I think that the very powerful piece of software/environnement that is Visual Basic should have this, unless you're using VB4...
Yvon Robert
05-29-2008, 10:42 PM
1) To test use a standard AMS button (mame.btn) any button
2) Rename your button file (name.zip) changing extension btn to zip
3) Use winzip or winrar to unzip the file (name.zip)
4) Surprise you obtain 3 image files corresponding to 3 different button state plus a _XML file.
5) You can edit the _xml file with wordpad or Dreamveaver check this file .
How to make a button the best way is to use the button maker from AMS and naturally you can design 3 buttons corresponding to each state, adding a _XML file edited with name plus zipping the file, (new.zip) plus renaming the extension new.btn.
Resume:
a) Create 3 button png or bmp file
b) Add a _xml file previously edited with wordpad
c) Zip the 4 files
d) Rename .zip file to .btn file
e) Copy your button file (.btn) file in the library AMS
clueless
05-31-2008, 04:12 AM
I found a dll and some vb code that can do the job. :)
in case anyone else needed this http://www.sfr-fresh.com/windows/misc/zip232dN.zip
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.