Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; The turtle should be at the prompt in the directory you want the file added to.
- ; It will automatically name the files based on the filename being uploaded.
- ;
- ; ctrl+c - opens a dialog to upload a file
- ; ctrl+f - opens a dialog to upload all of the files in a folder
- ^!c::
- FileSelectFile, file, 1, , *.cc
- if file =
- return
- FileRead, code, *t %file%
- if ErrorLevel
- {
- MsgBox, Unable to read file
- return
- }
- IfWinNotActive, Tekkit
- WinActivate, Tekkit
- name := RegExReplace(file, ".*\\", "")
- Send {Space 5}{Enter}rm %name%{Enter}edit %name%{Enter}
- SendRaw %code%
- Send {LCtrl}{Enter}
- Send {LCtrl}{Right}{Enter}
- return
- ^!f::
- SendMode Event
- FileSelectFolder, dir
- if ErrorLevel
- return
- IfWinNotActive, Tekkit
- WinActivate, Tekkit
- Loop, %dir%\*.*
- {
- FileRead, code, *t %A_LoopFileFullPath%
- if ErrorLevel
- {
- MsgBox, Unable to read file
- return
- }
- Send {Space 5}{Enter}rm %A_LoopFileName%{Enter}edit %A_LoopFileName%{Enter}
- SendRaw %code%
- Send {LCtrl}{Enter}
- Send {LCtrl}{Right}{Enter}
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement