Saving the scene w/ Javascript

I have been trying to figure out how to use the link:editorapplication.SaveScene and I can’t see to get it to work. I would appreciate if anyone who knows how to use this feature could give an example of how to make this work (with javascript). The path that I am trying to save it to is Assets/Saves/Save1.unity. Also I would like this to be a save as.

Okay after hours of trying to figure this out and I’m posting this for anyone following the question here is how you autoSaveAs your scenes:

#pragma strict
import UnityEditor;
function Start () {


function Update () {
    EditorApplication.SaveScene(FileLocationInQuotes, true/false); 

true means save as false means overwrite.
FileLocation example: "Assets/Scenes/SceneName.unity
I recomend adding a timer to the save because it causes a lot of lag trying to save every frame.