Program code for newbie (Radiomodule 433Mhz)

Hi! I have 433mhz reciever and transmitter, two arduinos. I need help with the next code:

On the transmitter part - when (for example) pin2 is HIGH send the signal to reciever part, and only when the reciever part recieve the signal make pin3(on reciever part) HIGH. The state of pin3 must be HIGH only when signal recieved, I don't need to make it HIGH for all the time.

Can anyone help me with the code and explanations ?

when (for example) pin2 is HIGH send the signal to reciever part

Send what signal? Those radios are designed to send data, not signals. You could send "Hey, wake up. Pin 2 is (or just became) high" (or something simpler) when pin 2 is (or becomes) high.

So, is it real to make some pin HIGH when data recieved?

A receiver can't just detect if a transmitter is turned on or off. You have to transmit a complex code to the receiver.

The receiving Arduino then checks if the code is valid.

The "heavy lifting" is all done with a library, so you can program with just a few lines. I use "RCSwitch" in my home automation setup, but there are others.

The RCSwitch library has send and receive demos to play with.

Because codes are used, you can switch thousands of separate things/pins on or off. Leo..

Can the code be like that:

arduino pin3(on transmitter part) is HIGH, if HIGH send the code for reciever, reciever reed the code and if code readen and right set the pin4 HIGH on the arduino on reciever part?

Yes. Download the RCSwitch library and look at the examples.