AutoHotkey Community

It is currently May 26th, 2012, 5:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: April 28th, 2009, 2:39 pm 
Offline

Joined: April 18th, 2007, 9:03 am
Posts: 127
Hi

i have manges to sort a hole list with number from 1-16911
unfortunately there are some few numbers missing. It is 15241 lines in the txt file and i need to figure out how to find the missing numbers

ex:
Code:
1
2
4
5
6
9



Code:
FileRead, MyVar, number.txt ;first of i need to read the file

;handel the code

FileAppend, %missing%`n, missing.txt ;and appand the missing numbers to a text file


in this case it gona append
3
7
8

Edit: i figure it out by myself

_________________
you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)...


Last edited by lilljimpa on April 28th, 2009, 5:38 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2009, 2:56 pm 
Offline

Joined: February 22nd, 2009, 7:51 pm
Posts: 47
Location: Poland
It's not exactly what you want, but I would use something like this:
Code:
Loop FileRead, YourFile.txt
{
   if (A_Index := A_LoopReadLine)
   {
      MsgBox %A_Index% is missing
      Break
   }
}

After running it, you must fill the gap manually and restart this script.
Maybe someone else will have a better idea...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2009, 3:04 pm 
Code:
FileRead, Content, Existing.txt
Loop, Parse, Content, `n
{
   If (InStr(A_LoopField, A_Index) = false)
      MissingNo .= A_LoopField "`n"
   }
FileAppend, % MissingNo, Missing.txt
Not tested.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2009, 3:17 pm 
Offline

Joined: April 18th, 2007, 9:03 am
Posts: 127
MissingNo wrote:
Code:
FileRead, Content, Existing.txt
Loop, Parse, Content, `n
{
   If (InStr(A_LoopField, A_Index) = false)
      MissingNo .= A_LoopField "`n"
   }
FileAppend, % MissingNo, Missing.txt
Not tested.


hmm, that printed out exactly the same numbers that i had

_________________
you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, Bing [Bot], BrandonHotkey, G. Sperotto, Miguel, Mtes, rafaelloureiro, Yahoo [Bot] and 72 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group