Results 1 to 18 of 18
-
2018-02-23, 04:50 AM (ISO 8601)
- Join Date
- Jul 2010
A Windows program that types a text file into other programs?
I'm looking for a program that I can put a text file into, and later trigger it with a key combination or something so that it enters that text file into the current application.
So, for example, if I had a multi-line message or list of / commands I wanted to enter in Minecraft, I could paste it into this hypothetical program, go into Minecraft, open chat and hit the key combination to "paste" multiple lines of text or command code, with Enter automatically used at every line break.
-
2018-02-23, 05:45 AM (ISO 8601)
- Join Date
- Jun 2008
- Location
- New Zealand
- Gender
Re: A Windows program that types a text file into other programs?
That is something that AutoHotkey can do, but it's not the easiest tool to use.
-
2018-02-23, 08:10 AM (ISO 8601)
- Join Date
- Jul 2010
-
2018-02-23, 09:07 AM (ISO 8601)
- Join Date
- Apr 2008
- Location
- Germany
- Gender
Re: A Windows program that types a text file into other programs?
I'm going to guess there is a reason why copy and paste is not an option? I feel this would be easiest but it requires the additional step of marking/ copying the text..
Then again I guess pasting might not work in every environment.
-
2018-02-23, 09:13 AM (ISO 8601)
- Join Date
- Jan 2009
Re: A Windows program that types a text file into other programs?
On that note, I'm guessing Notepad won't work, too.
When I code in R, I generally write complex/multi-line code in Notepad, copy all, then paste in R. Two key clicks (the copy, then the paste). Unless Minecraft doesn't allow the Paste function built into Windows operating systems to work, that should work.
I realize I'm probably misunderstanding the need.
-
2018-02-23, 11:09 AM (ISO 8601)
- Join Date
- Jul 2010
Re: A Windows program that types a text file into other programs?
Because I need to execute hundreds or thousands of commands one after the other.
If I type the commands into Notepad with carriage returns between them, Minecraft ignores the carriage returns and puts them all on one line, then throws an error because the concatenated line doesn't fit the syntax for the single command it sees at the start of the line.
I can copy and paste the commands one after the other, but that involves alt-tabbing between my text file and Minecraft hundreds or thousands of times hitting CTRL-C and CTRL-V Enter, making sure to select exactly the right line each time. I have done this for sequences of about 10-20 commands, and it got very tiresome after maybe 5. Hundreds or thousands in a row are right out.
It would really be nice to automate that process in the manner I specified in the OP.
I can write code to automatically generate a text file with all the commands I need for the things I'm planning to do, at which point a solution like I asked for would take me the rest of the way.
If I had easy access to Minecraft functions, that would do it, but unfortunately this is on a Realm, where functions have to be added to the world save file offline. So, every time a new function is needed , the world file must be downloaded, altered, and uploaded again. This is impossible to do on the fly without disrupting people's play, not to mention being a massive pain in the <REDACTED> compared to a solution like I outlined in the OP.
-
2018-02-23, 01:36 PM (ISO 8601)
- Join Date
- Apr 2008
- Location
- Germany
- Gender
Re: A Windows program that types a text file into other programs?
Ah, sorry, I somehow misunderstood exactly what you were meaning to do. Hm... Still seems like something easy enough to program.. I'm not an expert but the most uncommon thing to do seems to get it to enter the text.. Or copy - paste line by line. I might look into it later but I can't right now.
-
2018-02-23, 03:20 PM (ISO 8601)
- Join Date
- Jan 2009
Re: A Windows program that types a text file into other programs?
I don't know how to do this or 100% if it is possible, but I'd think VBA might be able to.
Have your code-to-be-copied in Notepad or something similar.
Program something in VBA -- I've found Excel handy to use as a front, even if I'm doing random stuff like creating folders or renaming PDFs -- with code to do something like
--open Notepad file
--LOOP
----read in line x
----go to open window (here, Minecraft) and copy text***
----x=x+1
----REPEAT UNTIL END
The step with the *** is what would be really hard and I'm not sure if is doable. But since it is Windows code interacting with a program running on Windows, I'd think it's possible.
If Excel doesn't auto-reformat stuff, you could copy the code from Notepad into Excel first, and then have the VBA do the easier job of grabbing it from row 1, 2, 3, and so on during the loop instead of directly from the Notepad file.
-
2018-02-23, 04:51 PM (ISO 8601)
- Join Date
- Jun 2013
- Location
- Bristol, UK
Re: A Windows program that types a text file into other programs?
Does Minecraft have an escape character that you could insert into your text file to re-enable linefeeds?
The end of what Son? The story? There is no end. There's just the point where the storytellers stop talking.
-
2018-02-24, 01:33 AM (ISO 8601)
- Join Date
- Mar 2005
- Location
- 61.2° N, 149.9° W
- Gender
Re: A Windows program that types a text file into other programs?
Bash?
We use GitBash at work, the other guys use it for git but I'm a native *nix user and I'd noticed it was a full bash shell. We had a issue with a legacy data loading program not being able to handle a 2.7 GB file. While others were panicing over having to decipher and rewrite undocumented legacy code I googled and modified a one line awk script to split the file into 30ish manageable chunks. I've also had occasion to use bash scripts to open and close a web browser at a specific site on a timer, and to backend for a little video streaming server that converted most video formats to one that the client could display.
-
2018-02-24, 01:44 AM (ISO 8601)
- Join Date
- Apr 2015
Re: A Windows program that types a text file into other programs?
It's been a few years, but I had decent luck with one of those gaming macros that can be programmed to click or type according to a script. However, I don't know whether or not it would count as easier than AutoHotKey, but I recall it got the job done. This was a few machines ago, so I can't easily check what it was, but it might come to me. Until then, maybe search for some of the more popular game auto-clickers and see if one will work?
-
2018-02-24, 05:31 AM (ISO 8601)
- Join Date
- Dec 2005
- Location
-
2018-02-24, 05:59 AM (ISO 8601)
- Join Date
- Aug 2013
Re: A Windows program that types a text file into other programs?
VBA has the ability to pass special characters such as carriege returns through the code if you want. Running it from Wordpad is unnecessariy complex, put the commands in a spreadsheet instead. The tricky part I would forsee is getting ti to put it in the right place in Minecraft.
Part of me feels though that Minecraft should have some kind of function in it for scripting natively.Last edited by snowblizz; 2018-02-24 at 06:05 AM.
-
2018-02-24, 05:33 PM (ISO 8601)
- Join Date
- Mar 2007
- Location
- Oregon, USA
Re: A Windows program that types a text file into other programs?
While I haven't used Realms myself, I understand command blocks can be enabled; and there are tricks for executing multiple sequential commands from a single command block.
FeytouchedBanana eldritch disciple avatar by...me!
The Index of the Giant's Comments VI―Making Dogma from Zapped Bananas
-
2018-02-24, 06:03 PM (ISO 8601)
- Join Date
- Jul 2010
Re: A Windows program that types a text file into other programs?
That does work, but it has limitations that wouldn't be shared by what I'm looking for.
Looking into AutoHotKey, it looks like I'd have to make another program to generate the AutoHotKey code for each macro. Putting text into a program which generates code I have to insert into an AutoHotKey macro does not sound as convenient to do each time as what I'm looking for.
Also, looking into this a bit more, it seems as though some delay needs to be added at each carriage return, which is why a new custom program or AutoHotKey are the only solutions I know so far that will work.
-
2018-02-24, 11:37 PM (ISO 8601)
- Join Date
- Jan 2009
Re: A Windows program that types a text file into other programs?
By 'delay', do you mean a literal delay of a few seconds between lines of code?
If yes, and if you can get VBA to work as the system, I recall it has a code to pause a few seconds between executing codes. I forget the line of code to cause a few-second lag, but it'd probably be easy to find on Google or StackExchange.
-
2021-04-27, 10:01 AM (ISO 8601)
- Join Date
- Apr 2021
Auto Clickers
Hello Everyone!
Does anyone know how to speed up auto clicker playback?
Please let me know.
-
2021-04-27, 10:38 AM (ISO 8601)
- Join Date
- Mar 2007
- Location
- Grognardia
- Gender
Re: A Windows program that types a text file into other programs?
Metamagic Mod: Auto Necro more like
(Avatar by Cuthalion, who is great.)