Jump to content

Two Questions


Recommended Posts

Hi @all,

i have 2 Qusetions.

1. I want to make a input where you can type only numbers and a comma (",").

2. I want to read some lines in a file but it dont works, help.

FileReadLine(@ScriptDir & "\Settings\nothing.txt" ,"Here i want the lines 12,13,14...30")

Thanks :P

Link to comment
Share on other sites

Not sure about the input box as I have not gone deeply in to them. But I am sure you can check the input and then have the user fix the input.

For the second part, since you did not post any other code beyond that line. Make sure you are opening the file first.

$file = FileOpen(@ScriptDir & "\Settings\nothing.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileReadLine($file, 10)

For that example it only reads line 10. Actually I think you need a new one for each line like:

FileReadLine($file, 10)
FileReadLine($file, 11)
FileReadLine($file, 30)

"Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend.

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...