Load files from one zip file with password

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
Juan Carlos
Posts: 793
Joined: Mon Sep 06, 2010 1:02 pm

Load files from one zip file with password

Post by Juan Carlos »

I work and try to load files from one zip file with password protection with this:

Code: Select all

zip.SetDefaultPassword("DataGame2.zip", "Sexy")

LoadSample(1, "DataGame2.zip/Sonidos/InsertCoin-Tirada.ogg")
LoadSample(2, "DataGame2.zip/Sonidos/NoMoneda-Tirada.ogg")
LoadSample(3, "DataGame2.zip/Sonidos/SlotMachine-Pago.ogg")
LoadSample(4, "DataGame2.zip/Sonidos/ClickBoton1.ogg")
LoadSample(5, "DataGame2.zip/Sonidos/ClickBoton3.ogg")
LoadSample(6, "DataGame2.zip/Sonidos/Payoff-Bell.ogg")
Where the DataGame2.zip is the zip file and "Sexy" is the password, but I don't know if I'm the things well, because the instruction zip.SetDefaultPassword doesn't find the zip file, and passoword I don't know if it works.
User avatar
airsoftsoftwair
Posts: 5106
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Load files from one zip file with password

Post by airsoftsoftwair »

What is the exact error you get?
User avatar
Juan Carlos
Posts: 793
Joined: Mon Sep 06, 2010 1:02 pm

Re: Load files from one zip file with password

Post by Juan Carlos »

The instruction not find the zip file, I write:
zip.SetDefaultPassword(1, "Sexy")
zip.SetDefaultPassword(1, "DataGame2.zip", "Sexy")
zip.SetDefaultPassword("DataGame2.zip", "")
The three forms but with same result, file doesn't find.
And I can't open the zip file to get the graphics as with zip file without password.
User avatar
airsoftsoftwair
Posts: 5106
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Load files from one zip file with password

Post by airsoftsoftwair »

zip.SetDefaultPassword() only works with archives opened through zip.OpenArchive(). It's currently not supported to specify a password when opening files from zip archives using normal Hollywood commands like LoadSample(), etc but I can implement that for a future version.
User avatar
Juan Carlos
Posts: 793
Joined: Mon Sep 06, 2010 1:02 pm

Re: Load files from one zip file with password

Post by Juan Carlos »

Yes, and thank you, the idea is to use zip files with the data from games, and with password you protect them, or in case of maje a strip poker that ypu can see the videos or pictures witout play the game.
User avatar
airsoftsoftwair
Posts: 5106
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Load files from one zip file with password

Post by airsoftsoftwair »

Code: Select all

- New: When opening a file stored inside a password-protected zip file using standard Hollywood
  functions like LoadSample(), LoadBrush(), OpenMusic(), OpenFile() etc. it's now possible to
  set a "Password" tag in the optional table argument to specify the password that should be
  used to decrypt the zip file; this allows you to open files directly from password-protected
  zip files without any detour
Post Reply