Jump to content
Sign in to follow this  
Guest DaveAvery

Need help with Notepad script

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)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.