Jump to content

Search the Community

Showing results for tags 'cr'.

  • 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 1 result

  1. Evening, I've been copying a lot of text from PDF files and other documents. Problem is, this text appears badly mangled when pasted again, causing formatting issues. I've been trying to write a script that would automatically reformat the copied string: #include #include #NoTrayIcon Opt("TrayMenuMode", 1) $AboutTrayItem = TrayCreateItem("About") TrayCreateItem("") $ExitTrayItem = TrayCreateItem("Exit") TraySetState() $hDLL = DllOpen("user32.dll") Beep(1100,300) While 1 While _IsPressed("11",$hDLL) If _IsPressed("43",$hDLL) Then ClipPut(StringStripWS(StringReplace(StringReplace(_ClipBoard_GetData(),@lf," "),@cr," "),4)) Beep(1300,150) While _IsPressed("43",$hDLL) Sleep(250) WEnd EndIf WEnd Local $msg = TrayGetMsg() Select Case $msg = $AboutTrayItem MsgBox(64, "About", "When CTRL+C is pressed, a reformatted version of the string that has thereby been copied, without any newline characters, should be placed on the clipboard.") Case $msg = $ExitTrayItem ExitLoop EndSelect WEnd DllClose($hDLL) Beep(600,300) So far, it's working for some of my sources. Others, like this two-column book, I still can't nicely copy from. How do I get out all line breaks, newlines, carriage returns etc. out of a string? Thanks in advance!
×
×
  • Create New...