Jump to content

Search the Community

Showing results for tags 'newline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello! When utilizing GUICtrlSetData to edit what is displayed in a GUICtrlCreateEdit field, is there a way to just make it write new lines rather than clearing what's there and writing the new information? For example ... GUICtrlSetData ($editField, "Line one"&@CRLF , "") GUICtrlSetData ($editField, "Line two"&@CRLF , "") GUICtrlSetData ($editField, "Line three"&@CRLF , "") What happens now if those three things run one after another, the Edit field displays "Line One" , then that is replaced with "Line Two" and so on with the previous information disappearing and the subsequent taking its place. I'd like for it to say all three, one after another. Any documents on how I may accomplish this? Thanks! -Reiz
  2. Is there a way to determine Newline (@CR, @LF, or @CRLF) from FileReadLine? I have a script that reads a file via FileReadLine, and writes out another file via FileWriteLine. I want to preserve the Newline character from the original file in the new file. Opt("MustDeclareVars", 1) ;0 = no, 1 = require pre-declare #include <File.au3> #include <Array.au3> Local $gInPath = $CmdLine[1] Local $NumberOfLines = $CmdLine[2] Local $gInDrive, $gInDir, $gInFName, $gInExt, $gOutPath Local $gMsgBoxTitle = "Error in " & @ScriptName Local $InLine Local $LineCount Local $oFileIn Local $oFileOut Local $FileStringAppend If FileExists($gInPath) Then Else MsgBox(4096, $gMsgBoxTitle, "This file does not exist" & @CRLF & $gInPath) Exit EndIf _PathSplit($gInPath, $gInDrive, $gInDir, $gInFName, $gInExt) If $NumberOfLines >= 1000000 Then $FileStringAppend = $NumberOfLines / 1000000 & "M" ElseIf $NumberOfLines >= 1000 Then $FileStringAppend = $NumberOfLines / 1000 & "K" Else $FileStringAppend = $NumberOfLines EndIf $gOutPath = _PathMake($gInDrive, $gInDir, $gInFName & "_" & $FileStringAppend, $gInExt) If FileExists($gOutPath) Then MsgBox(4096, $gMsgBoxTitle, "File already exists" & @CRLF & $gOutPath) Exit EndIf $oFileIn = FileOpen($gInPath, 0) $oFileOut = FileOpen($gOutPath, 1) ; Check if file opened for reading OK If $oFileIn = -1 Then MsgBox(4096, $gMsgBoxTitle, "Unable to open file for read" & @CRLF & $gInPath) Exit EndIf ; Check if file opened for writing OK If $oFileOut = -1 Then MsgBox(4096, $gMsgBoxTitle, "Unable to open file for write." & @CRLF & $gOutPath) Exit EndIf ; Read in lines of text until the EOF is reached $LineCount = 0 While 1 $InLine = FileReadLine($oFileIn) $LineCount += 1 If @error = -1 Then ExitLoop If $LineCount > $NumberOfLines Then ExitLoop FileWriteLine($oFileOut, $InLine & @CRLF) WEnd FileClose($oFileIn) FileClose($oFileOut)
×
×
  • Create New...