Sign in to follow this  
Followers 0
Guest DaveAvery

Need help with Notepad script

2 posts in this topic

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



Those who are interested can see the conclusion to this saga in another thread.

Share this post


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