Jump to content

Recommended Posts

Posted
#include <MsgBoxConstants.au3>
Global $Skipline = 0 ;0==> first line

Example()


Func Example()
    ; Read the current script file into an array using the filepath.
    Local $aArray = FileReadToArray(@ScriptFullPath)
    If @error Then
        MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
    Else
        Local $temprf
        For $i = 0 To UBound($aArray) - 1 ; Loop through the array.
            If $Skipline = $i Then ContinueLoop
            $temprf &= $aArray[$i]
        Next
    EndIf
    MsgBox(0, 0, $temprf)
EndFunc   ;==>Example

 

Posted
#include <MsgBoxConstants.au3>
Global $Skipline = 0 ;0==> first line

Example()


Func Example()
    ; Read the current script file into an array using the filepath.
    Local $aArray = FileReadToArray(@ScriptFullPath)
    If @error Then
        MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
    Else
        Local $temprf
        For $i = 0 To UBound($aArray) - 1 ; Loop through the array.
            If $Skipline = $i Then ContinueLoop
            $temprf &= $aArray[$i]
        Next
    EndIf
    MsgBox(0, 0, $temprf)
EndFunc   ;==>Example

 

Awesome, just what I was looking for. Thanks a bunch, Celtic88 ;)

Posted

Awesome, just what I was looking for. Thanks a bunch, Celtic88 ;)

One more thing: how could I add line breaks (@CRLF) after every line to maintain the original format as result?
Right now the result is one really long line ^_^

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
  • Recently Browsing   0 members

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