Jump to content

Need help with Notepad script


Guest DaveAvery
 Share

Recommended Posts

Guest DaveAvery

I am writing a notepad script that shoud read 80 characters and then insert a CR into the file or hit Enter so that after every 80 characters. A new line is started. After compiling and running the script my computer goes crazy and will not stop. I have posted my script below can someone help me out. Thanks

$answer = InputBox("File Name", "Please enter the name of your file","", _

" M")

$search = FileFindFirstFile($answer)

IF $search = -1 Then

MsgBox(0, "Error", "No file match the search pattern")

Exit

EndIf

If 1 Then

FileOpen($answer,0)

While 1

FileRead($answer, 80)

Send("{ENTER}")

Wend

EndIf

WinClose("& $answer &")

Send("!y")

FileClose($search)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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