// Simple Extract Script for Testing
#target photoshop

// Simple output function
function writeFile(path, content) {
    var file = new File(path);
    file.encoding = "UTF8";
    file.open("w");
    file.write(content);
    file.close();
    return file.exists;
}

// Main function
function main() {
    $.writeln("Script started");
    
    // Try to write to Desktop
    var outputPath = "~/Desktop/ps_output_test.txt";
    var success = writeFile(outputPath, "Test content - " + new Date().toString());
    
    $.writeln("Write attempt to " + outputPath + ": " + (success ? "SUCCESS" : "FAILED"));
    
    // No alert to avoid user interaction
    $.writeln("Script completed");
}

main();