16 Replies Latest reply on Feb 21, 2011 3:30 PM by Macro Details

    Tile vertically but a bit different

    phosphorspitter Level 1

      I run an action which zooms out two times then goes to a previous document, ror 4 documents the last step is a Insert Menu Item (Tile Vertically) and what I get is this:

      http://www.pixentral.com/show.php?picture=1HkD8HTcb54umwVOUCLoUpWC4hVY1

      but I would like to have it like this:

      http://www.pixentral.com/show.php?picture=1STF2vUiQX4zIhrZ4glWEjPRe0LxG

      This was done by manually dragging the borders inwards and up and down.

      My question is: Can this be automated?

        • 1. Re: Tile vertically but a bit different
          JJMack Most Valuable Participant

          You should put this in the Photoshop Windows or Mac  forum where actions are discussed.  Did you set your CS3 General Preference to zoom changes windows size? That may get you what you want... However when you upgrade from CS3 you'll find that Adob changed Photoshop User interface remove at least one view user interface and added tabed editing which changes the whole tile aranging feature in a way you can not do what you want.

          1 person found this helpful
          • 2. Re: Tile vertically but a bit different
            phosphorspitter Level 1

            Thanks for answering. Yes I have the preferences set to Zoom Resizes Window. I guess that you are right in that it can not be done since I also tried it on another machine with CS4.

            I am very good with writing actions but was thinking that a script could do it. As I sayd it tiles the only problem it shows that gray area around the document.

            • 3. Re: Tile vertically but a bit different
              Muppet Mark-QAl63s Level 4

              Just a suggestion… Why not create a new temp doc (black bg)… Tile all 4 images in that then view full screen… No frames at all much nicer…

               

              And just for fun an open documents viewer…

               

               

              #target photoshop
              
              function softProofDocs(delay) {
                   
                   if (app.documents.length == 0) {
                        
                        alert('NO document open?');
              
                        return;
              
                   } else {
                        
                        app.bringToFront();
                        
                        var allDocs = app.documents;
                        
                        var docRef = app.activeDocument;
                        
                        screenMode('FullScreen');
                        
                        // Can't run menu item here (No menu)…
                        
                        if (isMac()) {
                        
                             app.system("osascript -e 'tell application \"System Events\" to keystroke \"0\" using command down'");
                             
                        }
                                  
                        $.sleep(delay);
                                  
                        for (var i = 0; i < allDocs.length; i++) {
                             
                             if (allDocs[i] != docRef) {
                             
                                  app.activeDocument = allDocs[i];
                                  
                                  // Ditto here…
                                  
                                  if (isMac()) {
                                  
                                       app.system("osascript -e 'tell application \"System Events\" to keystroke \"0\" using command down'");
                                       
                                  }
                                  
                                  $.sleep(delay);
                                  
                             }
                             
                        }
                   
                        screenMode('Standard');
                        
                        app.activeDocument = docRef;
                        
                   }
                   
              }
              
              softProofDocs(3000); // In milliseconds
              
              
              function screenMode(viewMode) {
                   var desc = new ActionDescriptor();
                   var ref = new ActionReference();
                        var menuID = stringIDToTypeID( 'screenMode' + viewMode );
                        ref.putEnumerated(charIDToTypeID( 'Mn  ' ), charIDToTypeID( 'MnIt' ), menuID);
                        desc.putReference(charIDToTypeID( 'null' ), ref) ;
                   executeAction(charIDToTypeID( 'slct' ), desc, DialogModes.NO);
              }
              
              function isMac() {
                return /Macintosh/i.test($.os);
              }
              

               

               

               

              Doing it this way looks nicer on the mac (sizing after fullscreen) I suppose for windows you could alter the sizes first then fullscreen loop…

              • 4. Re: Tile vertically but a bit different
                JJMack Most Valuable Participant

                Like Actions have limitations so do Scripts.  Both have to use Photoshop Features not all things can be recorded or scripted.  Scripting is more powerful then Actions for you can use logic with scripting languages.  Adobe does not provide Script methods for all Photoshop features often you will see code in a Photoshop script that is not very readable. Often that code was derived from install the ScriptListener Plug-in when installed Photoshop will record everything that can be recorded by Photoshop  into two script files one javascript the other VBS.  There is no logic in there scripts but things that can not be scripted with normal Photoshop Scripting will be recorder in script code that uses the Action Manager.

                 

                You write your very good at writing actions I am also.  Have spent quite a bit of time learning to craft actions that work well on most Photoshop document. In fact I create actions that can not be made without the use of some scripting. Scripting is not easy for me actions are. So I have written some small easy to read scripts for use within Actions so a little bit of logic can be easily added to Actions.  I have also written a few scripts that are a bit more complicated that are designed to be run twice within an action. The First time one is run the script save some document state info into the documents meta-data and may do some Photoshop function. The second time the script is run the script may do some Photoshop function then restore the document state to the sate it had when first run and remover its footprint in the documents meta-data. A Save and Restor function for actions.   A third type script type is also included in my bag they are ones that are Photoshop Plug-ins with action support programmed into them.  These have a Dialog that will display when one is recording an action. The setting used in the Dialog are recorded into the action and when the Action is played the dialog is not display unless turn on in the action step instead the recorded setting are passed to the script.  I have put together a package on Crafting Photoshop Actions you may want to look at.

                 

                 

                http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip

                Contains:

                Action Actions Palette Tips.txt

                Action Creation Guidelines.txt

                Action Dealing with Image Size.txt

                Action Enhanced via Scripted Photoshop Functions.txt

                CraftedActions.atn Sample Action set includes an example Watermarking action

                Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.

                12 Scripts for actions

                • 5. Re: Tile vertically but a bit different
                  Michael L Hale Level 5

                  I think the best you will be able to do with actions or scripts is to make sure 'Zoom Resizes Windows' is checked in preferences. At the end of you current action add a zoom out then zoom in step. Select the next doc( ctrl-tab) and repeat the zoom steps. Repeat next and zoom twice more. Now your four documents will be in windows without extra space. But they will be aligned to the left instead of centered as they where.

                   

                  As far as I know the only way have full control over where the image are on the screen is to use Mark's suggestion and combine them in one document where you can contorl the placement in the document then show that doc full screen.

                  • 6. Re: Tile vertically but a bit different
                    Macro Details Level 2

                    Will try this tonight seems a good sugestion.

                    Thanks

                    • 7. Re: Tile vertically but a bit different
                      Macro Details Level 2

                      I have the action now running very well. Two Zoom outs-Previous Document again Zoom outs finally tile and then again Zoom out then Zoom In.

                      Works fine sofar even when mixed with documents in portrait and Landscape mode.

                      The reason I am doing all this is to give the customer a choice and hopefully to upsell and sell two or more prints.

                      Will give it a try with Mark's Suggestion.

                      Thanks for your help.

                      • 8. Re: Tile vertically but a bit different
                        Macro Details Level 2

                        To Muppet Mark.

                         

                        Tried your suggestion it looks nice but there is an inconvenience. To past the backgrounds I must flatten or merge visible and by doing so I loose the layers which I almost always need in tact because very often I have to change the slogans which are premade I I hide and show them how needed. Also I have some actions which change the styles of the text layers. I wrote an action to print first selecting the desired picture then Ctrl+A-Ctrl+C=Close no save-Ctrl+N then Ctrl+V and ready to print but as I sayd no layers. I think I can get along with what I have so far.

                        The tiling with zoom in and out works best and I can drag them in place very fast to make it look nice.

                        Tried your script but it shows only a black background with an emty white cutout then goes back to the main stacked documents. I am on Windows. Will see if I can find out the problem.

                        • 9. Re: Tile vertically but a bit different
                          c.pfaffenbichler Level 9
                          To past the backgrounds I must flatten or merge visible and by doing so I loose the layers which I almost always need

                          You could place the images as Smart Objects and maintain their layers intact within the SOs … though this may complicate the use of Actions.

                          • 10. Re: Tile vertically but a bit different
                            Muppet Mark-QAl63s Level 4

                            I cheated the script snippet I posted looks better 'as is' on the mac because it goes fullscreen (black) first… Then loops the open documents vooming to fit on screen after each swap. (it works pretty on the mac in this form). I think on the PC you would need to have all your open images @ fit screen first if windows allows that? (I really do have NO clue when it comes to PC sorry about that)…

                            • 11. Re: Tile vertically but a bit different
                              Michael L Hale Level 5

                              Mark, in your comments you have '// Can't run menu item here (No menu)…'. Are you sure? Command/ctrl - 0 is just a keyboard shortcut for the menu item.

                               

                              At least with CS5 a script can fit screen while in full screen mode.

                              • 12. Re: Tile vertically but a bit different
                                Muppet Mark-QAl63s Level 4

                                Mike, that was a comment to self… (as I do). I had first put in X's 'run menu item' to do this… but it threw an error which I thought may be because there was NO menu available? Anyhow I cheated and did a quick fix workaround…

                                • 13. Re: Tile vertically but a bit different
                                  Michael L Hale Level 5

                                  Mark, when I tested your script on WinXP in CS5 using a fit on screen menu command it works fine. In CS3 both your original version and mine using the menu command doesn't show the image. I had to add a waitForRedraw step to see the image in CS3 on WinXP

                                   

                                  #target photoshop
                                   
                                  function softProofDocs(delay) {
                                       if (app.documents.length == 0) {
                                            alert('NO document open?');
                                            return;
                                       } else {
                                            app.bringToFront();
                                            var allDocs = app.documents;
                                            var docRef = app.activeDocument;
                                            screenMode('FullScreen');
                                            menuItem(charIDToTypeID("FtOn")); 
                                            waitForRedraw();
                                            $.sleep(delay);
                                            for (var i = 0; i < allDocs.length; i++) {
                                                 if (allDocs[i] != docRef) {
                                                           app.activeDocument = allDocs[i];
                                                           menuItem(charIDToTypeID("FtOn"));
                                                           waitForRedraw();
                                                      $.sleep(delay);
                                                 }
                                            }
                                            screenMode('Standard');
                                            app.activeDocument = docRef;
                                       }
                                  };
                                   
                                  softProofDocs(3000); // In milliseconds
                                   
                                  function screenMode(viewMode) {
                                       var desc = new ActionDescriptor();
                                       var ref = new ActionReference();
                                            var menuID = stringIDToTypeID( 'screenMode' + viewMode );
                                            ref.putEnumerated(charIDToTypeID( 'Mn  ' ), charIDToTypeID( 'MnIt' ), menuID);
                                            desc.putReference(charIDToTypeID( 'null' ), ref) ;
                                       executeAction(charIDToTypeID( 'slct' ), desc, DialogModes.NO);
                                  };
                                  function menuItem ( menu ) {
                                      desc= new ActionDescriptor();
                                          ref = new ActionReference();
                                        ref.putEnumerated( charIDToTypeID( "Mn  " ), charIDToTypeID( "MnIt" ), menu );
                                      desc.putReference( charIDToTypeID( "null" ), ref );
                                     executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
                                  };
                                  function waitForRedraw() {
                                     var desc = new ActionDescriptor()
                                     desc.putEnumerated(charIDToTypeID("Stte"), charIDToTypeID("Stte"), charIDToTypeID("RdCm") )
                                  executeAction( charIDToTypeID("Wait"), desc, DialogModes.NO )
                                  };
                                  
                                  • 14. Re: Tile vertically but a bit different
                                    Macro Details Level 2

                                    I run Michael L. Hale's modified script and it works but then it goes back to the original canvas.

                                    Could this be modified that it stays in Full Screen Mode so one could cicle trough it with Ctrl+Tap?

                                    • 15. Re: Tile vertically but a bit different
                                      Michael L Hale Level 5

                                      Add


                                      screenMode('FullScreen');

                                       

                                      after the line

                                       

                                      softProofDocs(3000); // In milliseconds

                                      • 16. Re: Tile vertically but a bit different
                                        Macro Details Level 2

                                        Added it . Works great.

                                        Thank you.