Jump to content

Read from two text files, and output one text file


Recommended Posts

  • Moderators

NoobieAutoitUser,

Ran the original script (to my surprise) it worked perfectly.

What else would you expect? :shocked:

Your initial post showed 2 equal length files and asked how to interleave them - so that is what the code I gave you did. If you do not correctly phrase the question then that is your problem, not mine - other than the waste of my time in producing code which is not wanted. But all that does is make me less likely to help the next time you post. :)

hot202,

I like it how people write the scripts for someone with 12 posts or less. But when I asked kinda the same thing the other day I just got told what func to look at.

All you know he could of had 300+ posts and just made a new account to ask this.

People help people with less posts alot more.

Stop acting like a child who sees another with bigger lollipop. ;)

Those of us who help out here do it for free and because we like it - it is entirely up to us how we answer each post. And just to prove you wrong - do you remember this topic? Now wind your neck back in. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

@Melba23

Ran the original script (to my surprise) it worked perfectly.

You misunderstand. You have no idea how happy I was to see that script spit out "ouput.txt" with things the way the were supposed to be. I have been trying to do something like this for a little over a year.

If you do not correctly phrase the question then that is your problem, not mine - other than the waste of my time in producing code which is not wanted. But all that does is make me less likely to help the next time you post.

You are correct I did not ask the question right, and I humbly ask for forgiveness. I did not know that in order for your script to work that I had to use the same amount of lines in both text files (See Below). Chalk that up to a learning experience.

Thanx for your reply. I checked out the link about "arrays". Wow talk about intimidating a n00bie ;) From what I gathered that is a good tutorial. I shall reference that in the future as I build more complex scripts.

I am getting an error on the code you posted.

The error is here

"$aFile_New[(2 * $i) - 1] = $aFile_Show2[$i]"

The error message is this:

"Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded."

From my limited understanding of whats going on, it looks like "$aFile_Show2" has not been "declared".

Any more input, or help will be appreciated.

Above was my first reply to your script. After a few replies from "Realm" I came to the conclusion that I needed to make the lines in the text files the same. A big thanx goes out to "Realm" for his help.

@hot202

I like it how people write the scripts for someone with 12 posts or less. But when I asked kinda the same thing the other day I just got told what func to look at.

All you know he could of had 300+ posts and just made a new account to ask this.

People help people with less posts alot more.

_FileReadToArray

_FileWriteFromArray

_ArrayInsert

_ArrayDelete

maybe _ArrayConcatenate

I have never done anything to you. Why did you come into my post throwing crap around?

Again I say thank you to "Melba23", and "Realm" for helping with this. Without both of you I would still be trying to get this to work. I am sure that there are a lot of ungrateful peeps out there, but I am not one one them.

FYI: This is my second posting here asking for help. To be honest some peeps are quick to get an attitude. Not trying to be a smart ass here, but if someone is asking for help, means they don't quite understand what they are doing, and they need help.

Link to comment
Share on other sites

NoobieAutoitUser,

I am glad you have come to a solution ;)

Again I say thank you

My pleasure, I had the time!

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...