←  APIs and Utilities

ComputerCraft | Programmable Computers for Minecraft

»

CC-copy -- Your solution to servers withou...

Orwell's Photo Orwell 17 Dec 2012

No, it can be any extension. Run this command in the command line to see if it's not something like "chat.lua.txt": Edit: this will list all the files by their full name.
dir C:\Users\ads\Desktop\cc-copy_bin\
Also, be sure to put the lua program in that same directory.

Edit: You can also just type this in command line:
notepad C:\Users\ads\Desktop\cc-copy_bin\chat.lua
Notepad will open, then copy the content of the program into notepad and save it. After that, dissy's command should work just fine.
Quote

Kingston's Photo Kingston 17 Dec 2012

Not working :/

Edit: Not working even after your edit, comrade Orwell.
Quote

Kingston's Photo Kingston 17 Dec 2012

I quit.
Quote

Mr. Fang's Photo Mr. Fang 21 Dec 2012

Works like a charm after about 3 minutes of fiddling with it.
Quote

Orwell's Photo Orwell 21 Dec 2012

Cool. :) What did you fiddle with if I may ask? I'd be happy to make it more user friendly if you have suggestions.
Quote

Mr. Fang's Photo Mr. Fang 21 Dec 2012

Here's what I did.
1.I placed the cc-copy.exe on my desktop
2. I opened the CMD thingy via Start+R
3. I created a .txt on my desktop named text.txt then opened it
4. Started Tekkit and opened a computercraft computer on the server that doesn't have HTTP
5. Typed "edit startup" onto my ComputerCraft Computer
6. saw this entire msg when I typed out what you asked:
"C:\Users\Fang>\desktop\CC-copy.exe -w Tekkit -t 5 -s 15 --old desktop\text.txt "
7.Ran the program (pressed enter) with my notepad open and my Tekkit open to the ComputerCraft Computer's file edit screen
8.Watched as it typed it for me
9.Checked the code and made sure it was all right...I found some things in the beginning that looked wrong but idk...I'll look later into that
10.Was done!
Quote

ti07shadow's Photo ti07shadow 01 Jan 2013

Yea I have a bit of a issue with this.. When I type in

C:\Users\David\Desktop\cc-copy_bin\CC-copy.exe -w Tekkit -t 1 -s 4000 test.txt

it gives me the following

4000 test.txt
Found Tekkit Window
Couldn't open file 'test.txt'.
Done writting file
Quote

Orwell's Photo Orwell 01 Jan 2013

 ti07shadow, on 01 January 2013 - 06:09 PM, said:

Yea I have a bit of a issue with this.. When I type in

C:\Users\David\Desktop\cc-copy_bin\CC-copy.exe -w Tekkit -t 1 -s 4000 test.txt

it gives me the following

4000 test.txt
Found Tekkit Window
Couldn't open file 'test.txt'.
Done writting file
That's because the file test is not in the directory you're running the command from. Best way is to put all involved files in the same directory and cd to it. Then run the commands. Or else you can use the full path to test.txt in the command.
Quote

SteakSAUSE's Photo SteakSAUSE 02 Jan 2013

I'm trying to use this program with the FTB MindCrack Pack, but I am unsure what the window name would be, anyone have an idea?
Quote

Orwell's Photo Orwell 02 Jan 2013

It's just the title of the window running minecraft. :) I just checked, and in your case it would be "MindCrack Pack" (put it in between quotes after the -w ).
Quote

DjKiDD's Photo DjKiDD 19 Jan 2013

THANK YOU!
This is an amazing help on the server I play on :P

I keep experiencing this same bug... it always duplicates the last character of the code being uploaded
Quote

Orwell's Photo Orwell 22 Jan 2013

 DjKiDD, on 19 January 2013 - 11:31 AM, said:

THANK YOU!
This is an amazing help on the server I play on :P

I keep experiencing this same bug... it always duplicates the last character of the code being uploaded
Yeh, I seem to remember that it can be fixed by putting one empty line under the code.
Quote

AkaZombie's Photo AkaZombie 10 Feb 2013

 Kingston, on 17 December 2012 - 03:39 AM, said:

It still can't find the specified file. Are you sure it must be a .lua?
Perhaps you have to drag the chat file into cmd like the CC-Copy.exe
Quote

Orwell's Photo Orwell 10 Feb 2013

 AkaZombie, on 10 February 2013 - 06:57 AM, said:

 Kingston, on 17 December 2012 - 03:39 AM, said:

It still can't find the specified file. Are you sure it must be a .lua?
Perhaps you have to drag the chat file into cmd like the CC-Copy.exe
Chat file? :mellow:
Quote

superaxander's Photo superaxander 15 Feb 2013

 Orwell, on 10 February 2013 - 07:16 AM, said:

 AkaZombie, on 10 February 2013 - 06:57 AM, said:

 Kingston, on 17 December 2012 - 03:39 AM, said:

It still can't find the specified file. Are you sure it must be a .lua?
Perhaps you have to drag the chat file into cmd like the CC-Copy.exe
Chat file? :mellow:
The name of his file was chat.lua
Quote

CupricWolf's Photo CupricWolf 05 Mar 2013

I notice that in
void stopEditingFile() {
    sendKey(VK_CONTROL);
    sendKey(VK_RETURN);
    sendKey(VK_CONTROL);
    sendKey(VK_RIGHT);
    sendKey(VK_RETURN);
}
you don't use the interval between each
sendKey()
. Just thought you might want to know. I couldn't save the files on my server, it types it out just fine but then sends the final key strokes much too quickly.
Quote

icecube45's Photo icecube45 17 Mar 2013

Hey, used this program a while ago, and it doesnt seem to work now, It will switch to the tekkit window, but nothing will happen, it will type it into any other program however
Quote

Mads's Photo Mads 17 Mar 2013

Where did you get the BYTE type? Is it in windows.h, or did you just typedef char BYTE; ?
Anyway, nice program. Can't test it though, I'm on Linux.
Quote

AliveGhost's Photo AliveGhost 16 Jul 2013

Hey,

It all seems to be running okay, apart from it says "Couldn't open file 'desktop\mainprog'. How can I get the cmd to open it?

Cheers,
AliveGhost
Quote

Orwell's Photo Orwell 17 Jul 2013

 AliveGhost, on 16 July 2013 - 05:32 PM, said:

Hey,

It all seems to be running okay, apart from it says "Couldn't open file 'desktop\mainprog'. How can I get the cmd to open it?

Cheers,
AliveGhost
What exact command you're running? I might be able to help you better that way. The trick is to use the full path name in between quotes. E.g.:
CC-copy.exe "C:\Users\username\desktop\mainprog"
Quote