select object in scene view

I'd like to be able to script for selecting objects in the scene view, instead of the game view. Is this possible?

(one Selection)
Selection.activeTransform = yourTransform;
(more Selections)
Selection.objects = yourObjects;

For example add this script to a gameObject in your Scene.
using UnityEditor;
using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class TestClass : MonoBehaviour
{
public GameObject allGameObjects;

void Update()
{
    allGameObjects = FindObjectsOfType<GameObject>();

    // call Function
    SelectOneGameObject();
    //SelectAllGameObjects();
}

public void SelectOneGameObject()
{
    Selection.activeTransform = allGameObjects[0].transform;
}

public void SelectAllGameObjects()
{
    Selection.objects = allGameObjects;
}

}