This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MudkipTheEpic's profile picture

Mudkip's Autotyper

Started by MudkipTheEpic, 26 September 2013 - 05:03 PM
MudkipTheEpic #1
Posted 26 September 2013 - 07:03 PM
Mudkip's AutoTyper


EDIT: Facepalm. I messed up something.

Feel free to lock this until it's fixed. :/

Although I would like some advice on HOW to fix.

Fixed.


Hey everyone, this is a little Java experiment I made. It's not very user friendly (yet), but I believe it has potential.


Have you ever been on a server with HTTP off, and wanted a program you didn't want to take the trouble to type out manually? Use AutoType! It gives you 10 seconds to focus onto the Minecraft window, then starts automatically typing!


How To Run:

(No GUI Yet!)


java -jar AutoType.jar filepath

Download:


Source:



Bugs:

If you click out of the CC window while it's still typing, it keeps typing.

(Not sure how to fix)


Please report any and all bugs!
Edited on 26 September 2013 - 05:26 PM
nutcase84 #2
Posted 26 September 2013 - 07:12 PM

:(/>
MudkipTheEpic #3
Posted 26 September 2013 - 07:18 PM
Fixed bug that made quotes not typable.

EDIT: Fixed bug that made colons not typable.


Tell me whenever you see a key it can't type!

Edit: Fixed broken jarfile (Why won't it include Keyboard.class in the jar???)

EDITWALRUS: Fixed ALL special characters. (I think)
Edited on 26 September 2013 - 05:38 PM
Mr. Fang #4
Posted 26 September 2013 - 07:30 PM
I enjoy programs like this because I can more easily set up a Computer Software company in-game without HTTP. However, the penalty for clicking out of the Minecraft Window while it's typing can really become a nuisance. I hope you find a way to change it!
(Congrats on making such an awesome program.)
MudkipTheEpic #5
Posted 26 September 2013 - 07:51 PM
Greatly increased speed! Should still be typo-free!
Mackan90096 #6
Posted 27 September 2013 - 03:10 PM
:o/> Muddy!

Glad to see that you're alive :P/>

Also, I can't run it…
MudkipTheEpic #7
Posted 27 September 2013 - 03:30 PM
Show me your error.

–offtopic: Yes, I just went into language learning mode for a while.

Now I know Lua, Python, C, Java, and more.
apemanzilla #8
Posted 27 September 2013 - 11:17 PM
Sweet, this looks amazing!! Will this work on Mac?

Also, maybe you could add a hotkey (like F12 or something) that's pauses/stops the typer so you can safely switch windows.
MudkipTheEpic #9
Posted 28 September 2013 - 01:51 PM
Sweet, this looks amazing!! Will this work on Mac? Also, maybe you could add a hotkey (like F12 or something) that's pauses/stops the typer so you can safely switch windows.

Yes, it works on all platforms that support java.awt.Robot.

I am working on adding a Tray item (top gray bar of screen for Mac, bottom blue bar for Windows), so you can control it from there. It's still very buggy. I'm putting it on the dev branch of my Github repo.
Knux14 #10
Posted 30 September 2013 - 05:37 AM
Sweet, this looks amazing!! Will this work on Mac?

Also, maybe you could add a hotkey (like F12 or something) that's pauses/stops the typer so you can safely switch windows.
You can't make a keybind in Java because of Java, you can only put keylistener on a window or a pane so no keybind;
That would be a great idea but it will need to have an external component (JNI) to uses key in this program, and so be OS dependent …
MudkipTheEpic #11
Posted 24 December 2013 - 03:13 PM
Sweet, this looks amazing!! Will this work on Mac?

Also, maybe you could add a hotkey (like F12 or something) that's pauses/stops the typer so you can safely switch windows.
You can't make a keybind in Java because of Java, you can only put keylistener on a window or a pane so no keybind;
That would be a great idea but it will need to have an external component (JNI) to uses key in this program, and so be OS dependent …

True, but thanks to JKeyMaster, a public open-source library, I CAN!

Introducing…




Mudkip's Autotyper V2!

Changelog:
  • Fixed spaces and CC editor hating each other.
  • Removed buggy tray item
  • Added hotkey (F5) to stop/start the typing for select platforms. (X11, Mac, and Windows.) Don't worry if you aren't supported, you just won't be able to use the hotkey, the rest will work fine.
Still command line until I make the GUI.

Same download link, just redownload.

Report any bugs you find.
razaz03 #12
Posted 19 June 2014 - 07:16 AM
Sweet, this looks amazing!! Will this work on Mac? Also, maybe you could add a hotkey (like F12 or something) that's pauses/stops the typer so you can safely switch windows.
You can't make a keybind in Java because of Java, you can only put keylistener on a window or a pane so no keybind; That would be a great idea but it will need to have an external component (JNI) to uses key in this program, and so be OS dependent …
True, but thanks to JKeyMaster, a public open-source library, I CAN! Introducing… Mudkip's Autotyper V2! Changelog:
  • Fixed spaces and CC editor hating each other.
  • Removed buggy tray item
  • Added hotkey (F5) to stop/start the typing for select platforms. (X11, Mac, and Windows.) Don't worry if you aren't supported, you just won't be able to use the hotkey, the rest will work fine.
Still command line until I make the GUI. Same download link, just redownload. Report any bugs you find.

This is great!

- Quick question: could I perchance have the source pretty please? You've got some formatting issues (with #s and "s) and maybe an interface issue I'd like to resolve. I Will of course credit you with all the work and promote it as well.

Lemme know,

raz
sadow200 #13
Posted 16 July 2014 - 09:13 AM
When ever i have it type a program for me it seems to mess up at the end of it and mistype the last part of the code
MatthewC529 #14
Posted 04 August 2014 - 07:20 AM
Hmmm… looking at your source code… I am going to fix a few issues and do some clarification. This is a good starter application in Java! If you want take a look at my Java Programs at GitHub (as well as Modder's like Pahimar) for proper Java conventions, practice and some neat tricks you may not know.

I am going to fork your repository and apply some clean up, probably even clean up redundant code and problematic code, but it is up to you to accept it, either way I will fix what I think needs fixing and submit the pull request.

It's a smart application! Though it might be a heavyweight solution to a lightweight problem. java.awt.Robot isn't… always… reliable. If only the "Paste" event gave you the ENTIRE clipboard and not just the first line….
123Joshua321 #15
Posted 25 August 2014 - 10:09 AM
Runs fine and will do the keystrokes (types if I have something else open) but for some reason does not type into a computer in-game. I am using the tekkit (classic) mudpack, so would this have a difference?
Luca_S #16
Posted 19 December 2014 - 09:22 PM
This doesn't make sense: You need Java 8 to run this, but with java 8 Forge wont work
Dog #17
Posted 20 December 2014 - 01:18 AM
I've had problems with MC 1.6.4 and Java 8, but 1.7.10 (and Forge) seem to work fine. I'm guessing you're on 1.6.4 or prior, Luca0208?
Luca_S #18
Posted 20 December 2014 - 06:00 PM
Both MC 1.6.4 and 1.7.10 didn't worked, I will try again
tony1485 #19
Posted 20 December 2014 - 07:21 PM
This doesn't make sense: You need Java 8 to run this, but with java 8 Forge wont work
As far as I know, Forge 1217+ works with Java 8. For older Forge builds, LexManos has released a file you can put in your mods folder to make it work with Java 8.
https://twitter.com/LexManos/status/523464855907344384

What really doesn't make sense is that we need a program like this instead of a simple copy paste :P/>
Luca_S #20
Posted 21 December 2014 - 12:40 PM
I used this:


for i,v in pairs do
print(i,"=",v)
end

and the end was this:


for i,v in pairs do
  print)i,;V=
end
--Autotyped by Mudkip
Ugnwong #21
Posted 22 December 2014 - 02:50 AM
I used this:


for i,v in pairs do
print(i,"=",v)
end

and the end was this:


for i,v in pairs do
  print)i,;V=
end
--Autotyped by Mudkip

I am having a similar problem. This program works very well as long as the code is under 100 lines or so. Whenever I try to use it on a program that has 100+ lines, it starts to mistype at around the 100th line and screws up the whole program in CC. Am I doing something wrong with those programs? How could this be fixed?
MatthewC529 #22
Posted 24 December 2014 - 09:05 PM
As long as the original writer does not oppose, I plan on re-writing the autotyper while keeping the namesake out of respect. I want to re-write the code while adding the ability to download the files off of pastebin with a usable GUI.

Some of the problems identified are due to an understandable misunderstanding of how java.awt.Robot works. It never works as expected for long periods of time in my experience :P/> .

Could anyone who uses this help me in identifying the problems in the original code to resolve in the new code? Much appreciated.'

Ideally, this would become a simple client-side mod at some future point. Then we won't have the weirdness of cross-program interaction. The whole idea just kind of feels like a fix made of scotch-tape… not even duct tape. But useful nonetheless.

Also just to avoid wasting time, CC doesn't take Clipboard input right?

I used this:


for i,v in pairs do
print(i,"=",v)
end

and the end was this:


for i,v in pairs do
  print)i,;V=
end
--Autotyped by Mudkip

I am having a similar problem. This program works very well as long as the code is under 100 lines or so. Whenever I try to use it on a program that has 100+ lines, it starts to mistype at around the 100th line and screws up the whole program in CC. Am I doing something wrong with those programs? How could this be fixed?

This is a common issue with Robot in my experience.
Edited on 24 December 2014 - 08:12 PM
SquidDev #23
Posted 24 December 2014 - 09:12 PM
Also just to avoid wasting time, CC doesn't take Clipboard input right?

There is a 'paste' event, which works for simple read functions (and so the edit program). It can only handle single lines, but should work fine.
MatthewC529 #24
Posted 24 December 2014 - 09:20 PM
There is a 'paste' event, which works for simple read functions (and so the edit program). It can only handle single lines, but should work fine.

Ah. Well one-line is typically not useful for pasting a whole pastebin program. I suppose this AutoTyper would be useless in the first place if it handled multi-line paste events. The whole idea of using a java application to type into another java application just feels…. I can only describe it as 'janky'… It's a niche application since it is for non-http servers but it's a service nonetheless.

I will just re-write the Java Application with a nice friendly GUI and then maybe move it to a simple Client-side Mod that would hopefully work nicer with Minecraft and CC.

Thanks.

Edit: The Re-Write is Functional and a GUI is in Development. Now includes Pausing and Terminating. Found Here.
Edited on 26 December 2014 - 11:18 PM