Having accessing problems

I made an objectA that has a script attached to it. I am accessing this objectA in a script that is located in another objectB. I am having trouble accessing the script of ObjectA from ObjectB. Could someone help, please.

You don't really describe enough to know what's wrong, so I'll just explain how to do what you describe in the general case and you can fix what you are doing wrong/differently.

scriptA.js (Attached to object A)

var foo : int = 42;

scriptB.js (Attached to object B)

function Start() {
    var objectA : GameObject = GameObject.Find("Object A");
    //It would be faster and more efficient if it were tagged
    //and GameObject.FindWithTag("A"); were used,
    //or you could just store it as a public variable.
    var bar : scriptA = objectA.GetComponent(scriptA);
    Debug.Log("The meaning of life, the universe and everything is "
              + bar.foo.ToString());
}

or in mono (C#)

scriptA.cs (Attached to object A)

public int foo = 42;

scriptB.cs (Attached to object B)

public void start Start() {
    GameObject objectA = GameObject.Find("Object A");
    //It would be faster and more efficient if it were tagged
    //and GameObject.FindWithTag("A"); were used,
    //or you could just store it as a public variable.
    ScriptA bar = objectA.GetComponent<scriptA>();
    Debug.Log("The meaning of life, the universe and everything is "
              + bar.foo.ToString());
}