Jump to content

Recommended Posts

Hello peeps, can any one please give an example of passing an array[1D] to another script, then read and display it. Thanks :)

Share this post


Link to post
Share on other sites
1 hour ago, Hanukka said:

Hello peeps

(Peeps huh) ...

Hallo @Hanukka,

For starters: Why did you think the Examples forum would be the right forum to post your question after you read the forum purpose?

Jos

Moved.


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

:P ...thanks for moving it to the right category @jos....I am new to this forum n b4 posting the question i found only 2 available options (for i guess the forum select) and the rest were greyed out...i just chose randomly. Also i dont know anything bout forum propose

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

@coffeeturtle..Thanks but I actually wanted to know if there was any way of doing this via cmd. Also i dont know about flat files but I could do it using the normal text file. But it is not as efficient as the cmd way. There is a method to pass normal variables using cmd, but i couldn't find one for arrays. :(

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By DJKMan
      This script is fairly straightforward. If you ever worked with large files before then this may be of help. By large I mean files of 2 MB or so. Granted this doesn't sound so big but going through the file and parsing it to a 2D array all at once took an astronomical amount of time so I wrote my own function to handle this. I discovered that chunking a large array can boost the performance of iterating through the elements and theoretically this should maintain the performance no matter how large the array size is. I know there is room for improvement so please feel free to contribute! 
      Note: I wasn't able to fully test this on larger files such as 200 MB in size due to AutoIt complaining about an error allocating memory while executing _FileReadToArray(). Any help is appreciated.
      Features:
      Chunking (Performance will never degrade over time; I.E. Capable of parsing 200 lines or 20,000 and no performance hit will occur) Automatically re-sizes to dynamic columns  Preserves Columns while parsing FAST!!!!!! (I can parse a file that contains 24,000 lines with variable columns up to 8 columns and it will finish under a second.) Script:
      _ArrayTo2DArray.au3
      Example usage:
      Local $aExport ;Initialize array _FileReadToArray("LARGE TEXT.txt", $aExport) ;Returns 1D array of file Local $aSheet = _ArrayTo2DArray($aExport) ;Converts it to 2D Example Text File:
      LARGE TEXT.txt
       
      This script was inspired by >this post.
      *Updated attachment: Minor bug fixes*
       
      *UPDATE June 6, 2013: I apologize! I just realized I made a complete mess of the algorithm. I'm working on a fix now.*
      *UPDATE June 6, 2013: Bug fixed! It's attached in the post now.
×
×
  • Create New...