Jacob_DiDiodato icon

Auto Program Writer

Jacob_DiDiodato | PRO | 02/24/17 12:25:13 AM UTC | 0 ⭐ | 12641 👁️ | Never ⏰ | []
AutoIt |

1.29 KB

|

None

|

0 👍

/

0 👎

;Project Name: autoProgramWriter.au3
;Author Name: Jacob DiDiodato
;Project Version: 1.0
;Last Edit: Thursday February 23rd 2017 @ 8:11 PM
;This program, when given a filename, will write all the characters of that file to notepad++ save for extra new lines. MAKE SURE THAT WHEN USING THIS PROGRAM THAT AUTO-INDENTING ON NOTEPAD++ IS DISABLED.
;To disable auto-indenting do the following Settings -> Preferences -> http://www.filedropper.com/pdndisableauto-indent
 
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
 
$fileName = InputBox("filename", "Enter the filename to type")
$file = FileOpen($fileName)
$readFile = FileRead($file)
 
;MsgBox(0, "text", $readFile)
 
;Split the entire file into single characters
$chars = StringSplit($readFile, "")
 
;Run notepad - if you don't have it it could be a problem
Run("C:\Program Files (x86)\Notepad++\notepad++.exe")
 
WinWaitActive("[CLASS:Notepad++]", "", 10)
 
;Write all the characters to notepad++
For $i = 1 To $chars[0]
   If $chars[$i] == Chr(9) Then
      Send("{TAB}")
   ElseIf $chars[$i] == Chr(10) Then
      ;Send("{ENTER}")
   Else
      Send($chars[$i], 1)
   EndIf
   ;Edit this if you want it to write faster or slower. Smaller numbers make it faster and larger numbers make it slower
   Sleep(10)
Next
 
FileClose($file)

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎