I'd first try to answer this question:
can PhotoShop be command line (or in .NET by Process.Start) launched with a specific file name, and any parameters that might affect the "whatever" view after the file is launched: I'd start here: [
^] : this search was limited to the last year.
It seems to me, from scanning the titles returned from the above search, there's some hint of passing in JavaScript, but I haven't tried this, and don't intend to. Caveat emptor.
Then, maybe, go to Adobe's website, and download their api docs, scripting docs, and SDK, for whatever version of PhotoShop you are using. For resources from Adobe, and a forum for PhotoShop scripting outside Adobe see: [
^].
I have extended a JavaScript program, originally written by Filip Van Tendeloo[
^], outside of PS CS 6, that I then have made execute automatically every time any document is loaded in PhotoShop.
The script creates guidelines automatically. It includes interactive input dialogs for column heights, and row, widths.
You may want to use that ability to run a script automatically when PS opens a document. You write a .jsx file which is then stored, for CS 6, for example, on my machine, in :
>C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts\Event Scripts Only
The code, for the script I mentioned:
if(app.documents.length > 0)
{
var psDoc = app.activeDocument;
var colWidth = parseFloat( prompt("Column size?", 60.0) );
var docWidth = psDoc.width;
var colCount = docWidth / colWidth;
for(i = 0; i < colCount; ++i)
{
psDoc.guides.add(Direction.VERTICAL, i * colWidth);
}
var rowHeight = parseFloat( prompt("Row size?", 60.0) );
var docHeight = psDoc.height;
var rowCount = docHeight / rowHeight;
for(i = 0; i < rowCount; ++i)
{
psDoc.guides.add(Direction.HORIZONTAL, i * rowHeight);
}
}