Tuesday, April 21, 2009

Connet to Server using Apple Script

tell application "Finder"
set desktop background color to {255, 123, 45}
try
mount volume "smb://10.176.162.31/Premedia"
mount volume "smb://10.176.162.31/SourceFiles"
mount volume "smb://10.176.162.37/FinalWorks"
end try
tell application "Firefox"
activate
Get URL "http://172.17.112.43/Premedia"
end tell

end tell

var myAppleScript = new File ("/Users/vanatrajan/Desktop/Test.scpt");

myAppleScript.execute();

tell application "Finder"
set desktop background color to {255, 123, 45}
end tell


2 comments:

  1. var docRef = app.activeDocument;
    var PathCount = activeDocument.pathItems.length;
    var PathList = new Array( );
    for (var i = 1; i < PathCount; i++) {
    PathList[i] = activeDocument.pathItems[i].name;
    DuPath(PathList[i]);
    }

    function DuPath(pname){
    var id197 = charIDToTypeID( "slct" );
    var desc56 = new ActionDescriptor();
    var id198 = charIDToTypeID( "null" );
    var ref55 = new ActionReference();
    var id199 = charIDToTypeID( "Path" );
    ref55.putName( id199, pname );
    desc56.putReference( id198, ref55 );
    executeAction( id197, desc56, DialogModes.NO );


    var id200 = charIDToTypeID( "copy" );
    executeAction( id200, undefined, DialogModes.NO );


    var id201 = charIDToTypeID( "slct" );
    var desc57 = new ActionDescriptor();
    var id202 = charIDToTypeID( "null" );
    var ref56 = new ActionReference();
    var id203 = charIDToTypeID( "Dcmn" );
    ref56.putOffset( id203, 1 );
    desc57.putReference( id202, ref56 );
    executeAction( id201, desc57, DialogModes.NO );

    var id204 = charIDToTypeID( "past" );
    executeAction( id204, undefined, DialogModes.NO );


    var id205 = charIDToTypeID( "Dslc" );
    var desc58 = new ActionDescriptor();
    var id206 = charIDToTypeID( "null" );
    var ref57 = new ActionReference();
    var id207 = charIDToTypeID( "Path" );
    ref57.putClass( id207 );
    desc58.putReference( id206, ref57 );
    executeAction( id205, desc58, DialogModes.NO );


    var id208 = charIDToTypeID( "slct" );
    var desc59 = new ActionDescriptor();
    var id209 = charIDToTypeID( "null" );
    var ref58 = new ActionReference();
    var id210 = charIDToTypeID( "Dcmn" );
    ref58.putOffset( id210, -1 );
    desc59.putReference( id209, ref58 );
    executeAction( id208, desc59, DialogModes.NO );

    }

    ReplyDelete
  2. http://dev.fyicenter.com/Interview-Questions/ASP/What_is_a_variable_.html

    ReplyDelete