Jump to content

Recommended Posts

this will not work with conventional zip files. it is its own special file format.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

  • 2 months later...

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
#Include "Package.au3"
Global Const $sPackage = @ScriptDir & '\MyData.pkr'
$hPackage = _PK_Open($sPackage)$tData = DllStructCreate('byte[' & _PK_GetPacketDataLength($hPackage, -1) & ']')
_PK_ExtractPacketData($hPackage, -1, DllStructGetPtr($tData), DllStructGetSize($tData))
ConsoleWrite(DllStructGetData($tData, 1) & @CR)
_PK_Close($hPackage)
$Form1 = GUICreate("[#] Form1 [#]", 623, 442, 192, 124)
$Pic1 = GUICtrlCreatePic($tData, 24, 24, 577, 401)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

dont read1,2,3,4,5, jpeg ,bmp or pngread give me exam codethank you now

Edited by mesale0077
Link to comment
Share on other sites

I don't understand what you want but I see no "" character in path.

Global Const $sPackage = @ScriptDir & 'MyData.pkr'

EDIT:

I think that "" has been lost in all posts after forum update.

Edited by Yashied
Link to comment
Share on other sites

sorry

binary data read jpeg

#Include "Package.au3"

Global Const $sPackage = @ScriptDir & 'MyData.pkr'
dim $tbinaryData[6]

$hPackage = _PK_Open($sPackage)
for $rr= 1 to 5
$tData = DllStructCreate('byte[' & _PK_GetPacketDataLength($hPackage, -1) & ']')
_PK_ExtractPacketData($hPackage, -1, DllStructGetPtr($tData), DllStructGetSize($tData))
ConsoleWrite(DllStructGetData($tData, 1) & @CR)

next
_PK_Close($hPackage)


$Pic1 = GUICtrlCreatePic($tbinaryData[3], 24, 24, 577, 401)

read binary data (jpg,bmp,png read to file MyData.pkr)

like Coins & Banknotes Manager source

Edited by mesale0077
Link to comment
Share on other sites

Is this a typo "$tbinaryData{" because it is in your code twice, and I'm thinking it's either a cut and paste error, or a typo on what you posted.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 6 months later...
OK,
 
It is definitely good solution for saving all data needed for my scripts in single file, but I'm confused for reading data from that file .Do I need first to extract data out of package file, or can simply read from it to my scripts (for example pictures, icons, etc.)? :huh:
Link to comment
Share on other sites

  • 6 months later...
Link to comment
Share on other sites

  • 4 years later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...