Sign in to follow this  
Followers 0
BPBNA

Reading lines from a program

2 posts in this topic

Hi,

I work at an IT help desk and I was bored one night so my co-worker had me write a program to pull up information from our program that we used to create call tickets. The purpose of this script is to search for all the tickets closed the day before, then pick 4 at random and pull some information out and write it to a file. I have no problem getting most of the information out except when I try to get the issue(what the call was about). It seems that any time the second line in the issue is blank, it exits the loop. Ive looked over it a bunch of times and I can't figure out why it does that. It should check to see if the new line is the same as the previous one and it that happens 12 times(didn;t work with 3 so I kept increasing it and it was getting better but doesnt seem to fix it), then it assumes that it is at the end of the issue. That is the only time it should exit the loop so I cant figure out why it would exit with just one blank line. the "$line = $line - 1" line is just so that i'm not writing the same thing to the array multiple times therefore writing the same line to the file 3 times.

I have edited out any sensitive information in the screenshot.

callclosedrandom.au3

Share this post


Link to post
Share on other sites



Nevermind... figured it out... I always seem to make stupid little mistakes. Forgot to reset $x to 0 after each loop

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
Sign in to follow this  
Followers 0