Al Jones Posted March 31, 2009 Posted March 31, 2009 I'm either looking for the wrong thing or ... I have another program in VB.net that reads a font file (TTF / TTC) and extracts information for the various tables. Is it possible in autoit to do the equivalent of C's fseek(), fread()?? If it can, would you point me to the functions, I don't see them. I've read a lot of discussion about struct's in the forum, but don't see them defined as a (argh) variable type (realizing that one uses a struct to define a variable). What I'd like to do, I think, is to define an array of structs -- possible?? Unless you can point me to something that does similar, I'd be happy with the requisite referenses. //al
Moderators SmOke_N Posted March 31, 2009 Moderators Posted March 31, 2009 (edited) fread is FileRead fseek you can use the Winapi.au3 library to change file positions, but most will use StringRegExp()/StringInStr() to get their positions within the file on a specific string manipulation query. Structs can be type defined: typedef struct { char sz_example[20]; int i_example; } t_struct; Can be translated like:$t_struct = DllStructCreate("char sz_example[20]; int i_example") Edited March 31, 2009 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Al Jones Posted March 31, 2009 Author Posted March 31, 2009 Let's translate my request a little, I'm looking at reading in offsets (binary data) which points to some other table in the file - almost without exception this is all strict binary (non-ascii) data. That data is mostly contained in a struct - though I suppose I could take a previously read file offset and add the offset to the element in the structure to read that particular field. Just wondering if this could be done - reasonably - in Autoit?? //al
maqleod Posted March 31, 2009 Posted March 31, 2009 Let's translate my request a little, I'm looking at reading in offsets (binary data) which points to some other table in the file - almost without exception this is all strict binary (non-ascii) data. That data is mostly contained in a struct - though I suppose I could take a previously read file offset and add the offset to the element in the structure to read that particular field.Just wondering if this could be done - reasonably - in Autoit??//alI've looked for this same thing because I'm used to C, but no, autoit does not really have the same functions. _WinAPI_SetFilePointer(), _WinAPI_WriteFile(),_WinAPI_ReadFile() are the closest you are going to get. [u]You can download my projects at:[/u] Pulsar Software
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now