LanPaste

Announce your Work In Process and finalized projects here.
Post Reply
User avatar
Jare
Moderator
Moderator
Posts: 860
Joined: Mon Aug 27, 2007 10:18 pm
Location: Helsinki

LanPaste

Post by Jare » Mon Apr 07, 2008 2:22 pm

LanPaste is a small program that connects two computers clipboards through LAN. The program is hosted by first computer - and second is running it through LAN.

When the program sees a change in clipboard, it saves the clip to a file. And when the program (on the another computer) sees this file, it will put contents of the file to the clipboard. Very simple - and it works.

The program uses CBSDK.

Instructions are in Finnish and in English.

Download:
http://koti.mbnet.fi/jare1/lanpaste/LanPaste.rar

Edit: I Made a little improvement: the program does not waste processing time anymore.

User avatar
Mr. O
Newcomer
Posts: 32
Joined: Thu Nov 15, 2007 5:10 am
Location: United States

Re: LanPaste

Post by Mr. O » Tue Apr 08, 2008 8:23 pm

If you would be willing to post the code for LanPaste on the forum others may be able to help. Just a suggestion.
Mr. O

User avatar
Jare
Moderator
Moderator
Posts: 860
Joined: Mon Aug 27, 2007 10:18 pm
Location: Helsinki

Re: LanPaste

Post by Jare » Wed Apr 09, 2008 9:21 am

Mr. O wrote:If you would be willing to post the code for LanPaste on the forum others may be able to help. Just a suggestion.
Mr. O
The code is included in the rar archive. Currently I don't have any great problems with the program, so I don't have a need to post it here. If I'll run into problems with the code, I'll post it and ask help. :)

If someone wants to develop/modify the program, he can make his changes and post the new code to this topic, if he wants to.

But thanks for suggestion!

User avatar
Mr. O
Newcomer
Posts: 32
Joined: Thu Nov 15, 2007 5:10 am
Location: United States

Re: LanPaste

Post by Mr. O » Fri Nov 21, 2008 4:02 am

I have thought of a theoretical way to share the clipboard among multiple computers. Take the program and put it on multiple computers and just run two computers on one copy of this program. In theory the changes in one copy of the program would spread to the other copies on the other computers.

User avatar
Ozcar
Advanced Member
Posts: 439
Joined: Mon Aug 27, 2007 8:43 pm
Location: Helsinki

Re: LanPaste

Post by Ozcar » Sun Nov 23, 2008 12:14 am

Well, yeah. That's what internet-based games are all about ;). You know, changing themselves as other people do something on their versions of the program. (Static CS would be kind of dull to play). But I see what you mean. It wouldn't be very hard to do, actually. The program would just check if it's contents have been modified and if so, it would send instructions to all other connected computer about how to modify themselves. Or send a file for instance (file sharing, yay ^^). It would have to be coded into the program, though. Just running the same program on two computers, even if they are connected, would accoplish nothing. You can run two notepads on your computer and still the other one stays blank when you write into the other =).
Ratkaisit juuri universaaliongelman! Hienoa, ota keksi.

Filosofia on ajattelun taidetta, mutta sen maalari elää juoden apurahojaan masennukseensa.

User avatar
Jare
Moderator
Moderator
Posts: 860
Joined: Mon Aug 27, 2007 10:18 pm
Location: Helsinki

Re: LanPaste

Post by Jare » Sun Nov 30, 2008 1:12 am

Ozcar wrote:Well, yeah. That's what internet-based games are all about ;). You know, changing themselves as other people do something on their versions of the program. (Static CS would be kind of dull to play). But I see what you mean. It wouldn't be very hard to do, actually. The program would just check if it's contents have been modified and if so, it would send instructions to all other connected computer about how to modify themselves. Or send a file for instance (file sharing, yay ^^). It would have to be coded into the program, though. Just running the same program on two computers, even if they are connected, would accoplish nothing. You can run two notepads on your computer and still the other one stays blank when you write into the other =).
Why wouln't it work? Imagine this example:

User on computer1 puts "some text" to the clipboard. The program's instance (located on computer1) saves this message to a file.

Computer2 is also running an instance of the program located on computer1 and another instance, which is located on computer 2. The first instance on computer2 reads the message from computer1 and modifies content of computer2's clipboard. After that the second instance on computer2 notices the modification and passes it forward.

Computer3 is running an instance of the program which is located on computer2, and finally a user on this computer will see "some text" on his clipboard.

Notepad is a different thing because it does not do anything if there were changes in filesystem or memory. It only does something, if there was some direct input from keyboard or mouse which is directed to an activated instance of Notepad. Since two instances cannot be activated simultaneously, the input cannot affect on both instances. Also the instances (of Notepad) does not automatically put/read anything to/from any shared file or shared memory address. This is where Notepad and LanPaste make a difference.

User avatar
Ozcar
Advanced Member
Posts: 439
Joined: Mon Aug 27, 2007 8:43 pm
Location: Helsinki

Re: LanPaste

Post by Ozcar » Mon Dec 01, 2008 12:37 am

Had you bothered to read my message, you would have noted that I said it would work. Notepad was just the first thing that sprung to my mind. What I meant is that even if you run a program that hasn't been coded to do file-sharing on two computers it would not affect the other computer even if the two computers were connected. You have to make the file-sharing a feature of the program for it to work. Imagine your example if the programs weren't programmed to check if the content has been modified, that's what I mean. But if you just make a program designed to transfer data, then it's relatively easy to do. Just as it is easy to make a boat if you want, but you can't expect that anything put on water will float. You have to design it for that very purpose (crappy example, I know, but I am too tired to come up with anything clever).
Ratkaisit juuri universaaliongelman! Hienoa, ota keksi.

Filosofia on ajattelun taidetta, mutta sen maalari elää juoden apurahojaan masennukseensa.

User avatar
Jare
Moderator
Moderator
Posts: 860
Joined: Mon Aug 27, 2007 10:18 pm
Location: Helsinki

Re: LanPaste

Post by Jare » Tue Dec 02, 2008 2:07 pm

Ozcar wrote:Had you bothered to read my message, you would have noted that I said it would work.
Oh, I made a poor quote. Actually I was refering to this part:
Ozcar wrote:Just running the same program on two computers, even if they are connected, would accoplish nothing.
Ozcar wrote:Notepad was just the first thing that sprung to my mind. What I meant is that even if you run a program that hasn't been coded to do file-sharing on two computers it would not affect the other computer even if the two computers were connected.
Neither it would affect any of the first two computers. if it hasn't been coded to do file sharing, then it's clear that it would not do it. But as "a program" I meant a program which uses such a feature - like LanPaste which is the subject of this topic.

So the point is: We currently do have a program which is able to do the job that we were discussing about. Or atleast I think this way. I haven't tested it (yet).

User avatar
-Z-
Devoted Member
Posts: 682
Joined: Tue Aug 28, 2007 3:33 pm
Location: In ur danmaku, grazin ur bullets

Re: LanPaste

Post by -Z- » Tue Dec 02, 2008 6:22 pm

Epic battle of the century: Jare vs. Ozcar.
"Fallout 3 (#10) marked a shift in the industry, a move that saw the western RPG begin to surpass its Japanese counterparts." -IGN top 100 RPGs of all time

User avatar
Ozcar
Advanced Member
Posts: 439
Joined: Mon Aug 27, 2007 8:43 pm
Location: Helsinki

Re: LanPaste

Post by Ozcar » Wed Dec 03, 2008 12:00 am

=D Epic, yeah.

I was just referring to Mr. O's idea in the first place. Running one copy of a program that isn't coded to do file sharing on two computers would accomplish nothing. Are we all clear =)? Good.

This has been fun, though. I wish more internet arguments were like this one.
Ratkaisit juuri universaaliongelman! Hienoa, ota keksi.

Filosofia on ajattelun taidetta, mutta sen maalari elää juoden apurahojaan masennukseensa.

User avatar
-Z-
Devoted Member
Posts: 682
Joined: Tue Aug 28, 2007 3:33 pm
Location: In ur danmaku, grazin ur bullets

Re: LanPaste

Post by -Z- » Wed Dec 03, 2008 12:20 am

Ozcar wrote:=D Epic, yeah.

I was just referring to Mr. O's idea in the first place. Running one copy of a program that isn't coded to do file sharing on two computers would accomplish nothing. Are we all clear =)? Good.

This has been fun, though. I wish more internet arguments were like this one.
The words "argument" and "internet" don't usually fit in the same sentence; They're called "flamewars" here on the intertubes. Guess that just proves how unique and last-of-it's-kind this forum is ; P

Anyway, I'm doing nothing but talking off-topic here, so I'll just be taking my leave before the mods notice this thread --->
"Fallout 3 (#10) marked a shift in the industry, a move that saw the western RPG begin to surpass its Japanese counterparts." -IGN top 100 RPGs of all time

User avatar
Jare
Moderator
Moderator
Posts: 860
Joined: Mon Aug 27, 2007 10:18 pm
Location: Helsinki

Re: LanPaste

Post by Jare » Wed Dec 03, 2008 11:44 am

Ozcar wrote:I was just referring to Mr. O's idea in the first place. Running one copy of a program that isn't coded to do file sharing on two computers would accomplish nothing. Are we all clear =)? Good.
Yes, but he was talking about "the program", so I'm pretty sure that he meant LanPaste, which is coded to do filesharing through Windows LAN. So that's where we got the difference. :D
-Z- wrote:Anyway, I'm doing nothing but talking off-topic here, so I'll just be taking my leave before the mods notice this thread --->
It's just the same thing that I've been doing here for three posts now. Maybe I should finish it too. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests