AutoHotkey Community

It is currently May 27th, 2012, 1:11 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Extract One By One??
PostPosted: March 29th, 2010, 5:55 pm 
Offline

Joined: October 30th, 2009, 7:32 am
Posts: 65
Location: Kerala, India
Is there any way to extract a given file, without extracting the whole thing ??

_________________
Image

Don't Take Life Too Seriously,Because In The End, You Won't Escape It Alive Anyway ;)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2010, 5:58 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Why not? Please check the wrapper!..
http://www.autohotkey.net/~Skan/wrapper ... 00/AxC.ahk
AxC_UnPack() will do it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 6:11 am 
is it possible for u to up the file size limit of 16mb/file to a 100mb? If can, please do so! tks in advance :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 6:45 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
luki wrote:
is it possible for u to up the file size limit of 16mb/file to a 100mb?


I would not recommend it. But if you wish so, alter 16 to 100 in the following part of the source code.

Code:
axc_pack()
...
  if (sz<1||sz>(16*1024*1024))
     continue
...
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject: My Bad!
PostPosted: April 5th, 2010, 4:31 am 
Offline

Joined: October 30th, 2009, 7:32 am
Posts: 65
Location: Kerala, India
SKAN wrote:
Why not? Please check the wrapper!..


Sorry, got it now, i didn't went through the whole thing !
Anyway, cheers & Keep up the good work :D

_________________
Image

Don't Take Life Too Seriously,Because In The End, You Won't Escape It Alive Anyway ;)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2011, 3:32 pm 
Hey SKAN and everybody else that might be able to help,

I've just recently discovered this great lib and decided to include it into one of my applications as a, sort of, "Imageblock" (holds all images the application uses in a AxC² file).

But I encountered a huge problem with the UnpackAll() function.

It does unpack every file into the specified folder but none of the files can be used with Gui, Add, Picture because the AutoHotKey Executable somehow disallows the access, so every extracted file seems to be already in use and can't be added to an AHK Gui (Unlocker says the path isn't released).

Is there any fix, or am I missing something?

Example script:
Code:
If (FileExist("Images.bin") = "")
  axc_Pack("Images.bin","Image.png")
axc_UnpackAll("Images.bin","Images")
Gui, Add, Picture,, Images\Image.png
Gui, Show


Complete script with example file:
http://www.mediafire.com/?7e2vvo27q8nr8t2


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2011, 3:50 pm 
I have fixed the bug, the handle of the files wasn't closed, get the bugfree function here:

Code:
axc_unpackall(packfile,dir="",progress="axm_progress") {
  ifequal,dir,,setenv,dir,%a_workingdir%
  u:="uint",i:="int",s:="str",h:=dllcall("_lopen",s,packfile,i,0),varsetcapacity(x,4,0)
  varsetcapacity(hdr,24),dllcall("_lread",u,h,s,hdr,i,24),fls=numget(hdr,8),f:=0
  if (h<1||(numget(hdr)<>0xB2437841)||(numget(hdr,4)<>0x3F800000)||fls<1)
{ dllcall("_lclose",u,h)
  return -1
} varsetcapacity(z,1),dllcall("_lread",u,h,s,z,i,1),z:=asc(z),varsetcapacity(crc,z)
  dllcall("_lread",u,h,s,crc,i,z),csvof:=numget(hdr,12),csvsz:=numget(hdr,16)
  dllcall("_llseek",u,h,i,csvof,i,0),varsetcapacity(csv,csvsz)
  dllcall("_lread",u,h,s,csv,i,csvsz)
  if ( dllcall(&CRC,s,csv,u,csvsz,i,-1,u,0x04C11DB7,"cdecl uint") <> numget(hdr,20) )
{ dllcall("_lclose",u,h)
  return -2
} loop,parse,csv,`n
{ loop, parse, a_loopfield, csv
  f%A_Index%:=a_loopfield
  dllcall("_llseek",u,h,i,f3,i,0),varsetcapacity(bin,f2),dllcall("_lread",u,h,s,bin,i,f2)
  If ((e:=dllcall(&CRC,s,bin,u,f2,i,-1,u,0x04C11DB7,"cdecl uint")+0)<>f4)
{ msgbox,16,Checksum Error!,CRC32 failed on %f1% %e%
  continue
} ifnotexist,% (tf:=dir "\" f7),filecreatedir,%tf%
; ifnotequal,progress,,setenv,dummy,% %progress%(f1,a_index,fls,packfile)
  h2:=dllcall("_lcreat",s,tf "\" f1,i,0),f:=f+1
  dllcall("_lwrite",u,h2,s,bin,u,f2),dllcall(lc,u,h2)
  filesettime,%f5%,%tf%\%f1%,c
  filesettime,%f5%,%tf%\%f1%,m
  filesetattrib,+%f6%,%tf%\%f1%
  DllCall("_lclose",u,h2)
} Return f+dllcall("_lclose",u,h)
}


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Bon, sks and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group