Salir
  • Comunidad global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

Apply "View - Flip Horizontal" to all open windows (including clones)

Principiante de comunidad ,
Mar 26, 2022 Mar 26, 2022

Ive been trying to apply the View -- Flip Horizontal to all my open documents when working in some illustrations with an Script (the script is pretty simple). My problem is that the script sequentially jumps through the documents, but the "clone documents/windows" does not appear as a new document (because it is just a new window that mirror the document). For reference is when you do window -> arrange -> new ****.PSD

This is my code:

var idflipViewHorizontal = stringIDToTypeID( "flipViewHorizontal" );  
var workingDocument = app.activeDocument;  
for (var i = 0; i < app.documents.length; i++)  
{
app.activeDocument = app.documents;  
var docRef = app.activeDocument;

runMenuItem(idflipViewHorizontal);
};  
app.activeDocument = workingDocument;

But this just cycle through documents, and I think I need cycle through open windows/ document tabs, to apply the "view effect" cause this view -- flip horizontal doesnt actually change the doc, it is just a view mode.

TEMAS
Acciones y scripts , Windows
813
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Adobe
Principiante de comunidad ,
Mar 27, 2022 Mar 27, 2022

Ah I think I didnt Express that what I need is a way to change via script, the focus of the window, so I could change the view properties of it.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Mentor ,
Mar 28, 2022 Mar 28, 2022

Windows with document views are not documents themselves. That is, they cannot be switched by script or action in the usual way.

Perhaps instead of flipping the canvas horizontally via the view menu, you should use a similar transform command on the edit menu (it will actually flip the canvas and it will show up in all linked windows)

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Mar 28, 2022 Mar 28, 2022

Once I wrote autohotkey script that probably is usless for this problem, but I remember it did with new window for document that what Photoshop scripting couldn't do: Access to document windows, tabs

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Mar 29, 2022 Mar 29, 2022

Yeah, actually I used to do that, but when you work with very heavy files, the pc freezes for some time. I found out that if I use the View-> Flip Horizontal, the load is very very low, fliping almost inmmediatly and not affecting the file itself. Consider I am an Illustrator, Fliping is not actully to "Actually Flip" its just to find out mistakes you could be doing. Flipping is something an artist do constantly, but not actually left the image flipped.

I work with the main file in one monitor (to zoom and work in details), and a secondary clone/document view in another. that keeps theimage in normal size, and some references that I may be using for anatomy and portraits in another screen too. Thats why I tried to do the "fast flip"in all documents at once, but flipping canvas in 3-4 documents just to see if Iam not drawing an eye lower than the other... too much time wasted. Well anyway if this is not actually possible, Ill do it one by one with a shortcut, at the end it is faster than the canvas flip.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Mar 29, 2022 Mar 29, 2022

You mean when you choose View > Flip Horizontal and switch to the mirrored instance of image you can for example transform it faster than doing it on originaly opened image?

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Apr 01, 2022 Apr 01, 2022

View-> Flip Horizontal just flip your view of the image but the image itself is not changed. I meant that if I do it in the classical way, the software takes too long cause it actually edit the image. Literally I have to see the progress bar to do  the changes, view version is almost instantaneous. And I usually have more than 1 big file open (usually around 3) + extra instance so it takes more time. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 30, 2022 Mar 30, 2022

One can simulate keystrokes via Script so, if there would be only two instances of the open images (and no other open images) and you are working on the main-screen-instance of the image when triggering the Script, it might be possible to shift the focus via Script. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Mar 30, 2022 Mar 30, 2022

With VBScript 😉

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Apr 01, 2022 Apr 01, 2022

I kind of thought about it (and I found your other post answer too, the VBScript, before posting here), but I dont know if there is a way to count the number of open windows in the program, the instances? Cause if I have more than 1 file open it wouldnt work as expected, i would have to make sure I am in the right window and I work with more images, I would have to anyways change manually to the right window to start the script... so it goes back to the change all with script and the intances (usually 1) manually.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Apr 01, 2022 Apr 01, 2022

Autohotkey should be able to count the windows.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Campeón ,
Apr 04, 2022 Apr 04, 2022
MÁS RECIENTES
quote

 but I dont know if there is a way to count the number of open windows in the program, the instances?


By @juanalbertoart

 

Create a temporary empty small document. Remember its id. After that, send the CTRL+TAB press event to Photoshop using an external script or program. Check the id of the active document. If it matches, end the loop.

 

Something like this : )

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 28, 2022 Mar 28, 2022

Shouldn’t 

app.activeDocument = app.documents;  

be 

app.activeDocument = app.documents[i];  

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Apr 01, 2022 Apr 01, 2022

Yeah actually I think I erased that part when paste it here by accident, but it has it in the script. The way you say it is the correct one.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines