kenn Posted December 29, 2005 Share Posted December 29, 2005 The attached file contains func VarsToString and func StringToVars and supporting functions. Execute(VarsToString('a,b,c','s')) saves the names, values and scopes (local, global) of variables $a, $b and $c in string $s. Execute(StringToVars('s')) restores all the variables in string $s, preserving scope if possible. Supported variable types are Array (any dimensions), Array in Array, BinaryString, Bool, Float, HWnd, Int, Keyword (default only) and String. Objects and Structs are NOT supported.VarsToString.au3 Link to comment Share on other sites More sharing options...
w0uter Posted December 29, 2005 Share Posted December 29, 2005 an struct is an array isnt it ? My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
kenn Posted December 29, 2005 Author Share Posted December 29, 2005 an struct is an array isnt it ?A struct is NOT an array.Information about the struct is stored in an array, but the struct itself is stored in allocated memory. Link to comment Share on other sites More sharing options...
LxP Posted December 30, 2005 Share Posted December 30, 2005 Fantastic stuff! I like the way that you accept input variables -- it allows for any amount of data to be saved into one location. You may wish to consider making the output slightly more 'friendly' for writing to files etc.; I would suggest escaping anything that isn't a letter, number or otherwise 'standard' character (including things like line feeds) because saving states across sessions is probably where your work would be extremely useful. Link to comment Share on other sites More sharing options...
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