Selecting the first file from a group of opened files in Photoshop
Hi, I've been digitizing microfiche with 200 or so pages photographed onto one image file, laid out in a grid pattern. I've been using actions in Photoshop to cut out one page, create a new file in Photoshop from that page, then return to the first, master file and do it again with the next page in the series. So when it is complete I have each individual page as an individual image file which I then save with a batch process. I've been doing this for a while and have managed to make it work but I always run into the problem, when creating this action again, of getting Photoshop to select that first master file each time instead of selecting just the previous file. I know I can get it to select the previous file, or the previous file -1, -2, -3, etc. I've somehow been able to get this to work in the past by creating an action that selects a large enough group back, like previous file -19 or something, and through some bug or sheer luck it has worked and will always select that first file. But it doesn't always work and it always takes some frustration to luck into it when it does. Now I can't seem to get it to work at all. Is there a straightforward way I can simply tell it to select the first file everytime? If not, does anyone know how or why the method I used previously sometimes works and sometimes doesn't, and how I can make it work again? I'm using PS CS5 in Windows 7. Thanks!
Just put this code on a file and put that 'namedfile.jsx' inside the scripts folder on photoshop.
Open or re-open photoshop to load the script and create an action linked to a shortcut selected by you and save this script going to File>Scripts>namedfile.jsx
It is just to press the shortcut key and the active image go back to the image opened before.
When it is the first one it runs the script the same but it remains there.
Here is the script:
// Go back to the previous opened image
#target photoshop
// Go back to the previous opened image (not the previous viewed) . If it is the first, it remain there.
if(documents.length>0) {
var thisIndexImage = getActiveDocumentIndex();
var theDocs = app.documents;
if ( thisIndexImage != 0 ) {
var flatAnterior = theDocs[thisIndexImage - 1];
} else {
var flatAnterior = theDocs[0];
app.activeDocument = flatAnterior;
} else {
alert ("You must have opened images to run this script.")
// Get the active document number - the number of opening order
function getActiveDocumentIndex(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
return desc = executeActionGet(ref).getInteger(stringIDToTypeID('itemIndex'))-1;
If you want to go directly to the first of all the images (in opening order) it is simpler:
Just create this script:
var first = app.documents[0];
app.activeDocument = flatAnterior;
Similar Messages
-
Raw Files from LR do not open automatically in Photoshop raw processor
I like to edit my images in Photoshop. Could you please advise why after I upload raw files into LR and using photoshop as external editor, the file opens but not in the PS (photoshop) raw processor. I have to work around this by first finding the image in windows explorer and dragging this file into PS. Shouldn’t the file open automatically in the PS raw processor ?
Are you using Photo > Edit in Photoshop (or Ctrl/Cmd+E)?
Are you getting any error messages? Does Photoshop open at all?
Marek
Marek Mularczyk
Adobe Certified Expert and Instructor
Adobe Photoshop Lightroom 1, 2, 3
Adobe Photoshop CS3, CS4, CS5
Adobe Dreamweaver CS3, CS4, CS5
Adobe Flash CS3, CS4, CS5 -
How to select the first record?
Hi,
Could anyone tell me how to select the first record of every
group?
ex, I want to find out every customer their first purcaseDate.
CustomerID PurcaseDate Region
A00000001 2001/01/01 AA
A00000001 2001/02/02 AA
A00000002 2001/03/01 AC
A00000002 2001/05/07 AC
A00000003 2001/03/05 DD
result:
A00000001 2001/01/01 AA
A00000002 2001/03/01 AC
A00000003 2001/03/05 DD
ThanksVincent,
You could do it as Carl suggested, with a couple of
corrections. You would need to include the CustomNo column in
the order by clause of your cursor. You would also need to add
a where clause to your update statement, otherwise everywhere
Region in the table would be updated with the same value of the
last CustomNo in the cursor, regardless of the CustomNo in the
table. See corrected code below:
DECLARE
CURSOR cust
IS
SELECT DISTINCT CustomNo, Region, Purchase_Date
FROM my_table
ORDER BY CustomNo, Purchase_Date, Region;
c_customer VARCHAR2 (9) := '...';
c_region VARCHAR2 (2) := '..';
cntr NUMBER := 0;
BEGIN
FOR x IN cust
LOOP
IF x.CustomNo != c_customer
THEN
c_customer := x.CustomNo;
c_region := x.Region;
ELSE
UPDATE my_table
SET Region = c_region
WHERE CustomNo = c_customer;
cntr := cntr + 1;
IF cntr = 25
THEN
COMMIT;
cntr := 0;
END IF;
END IF;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
Another option is that you could just use one update statement,
like this:
UPDATE my_table a
SET Region =
(SELECT DISTINCT Region
FROM my_table b
WHERE (CustomNo, Purchase_Date) IN
(SELECT CustomNo, MIN (Purchase_Date)
FROM my_table
GROUP BY CustomNo)
AND a.CustomNo = b.CustomNo)
Barbara -
Extracting the first page from all pdf's in a folder and save them to a new file
Hi,
As Bridge apparantly is unable to create a decent-looking PDF from a bunch of other PDF's, we're looking for alternative solutions. The problem is, that I haven't done much scripting in Acrobat.
Pseudocode:
Select Folder where PDF files are stored
Create list of PDF files
Get first page from each and add it to temporary new PDF
Save temporary new PDF in high quality
Would that be possible in Acrobat? And where would I start? I can't even find a Scripting Guide for Acrobat (like the ones for Illustrator and InDesign).. and there seems to be no sample scripts included either :-(
Thanks,
ThomasThis can be done using a combination of an Action and a script. The script in the Action will collect the paths of the files you want to process and the folder-level script will extract the first page from each file and generate a new PDF from it. You don't need a plugin for this task, so you don't really need the SDK.
The Acrobat JavaScript Reference can be found here: http://www.adobe.com/devnet/acrobat/javascript.html -
Hello,
I have a strange issue on my Windows 8.1 machine. The icon for for an executable file on the network shows blank, if I select the second icon from the library. (File->Properties->Change Icon and select the second icon - This file has two icons)
If I re-create the IconCache.db, then it is showing correctly. But I do not want to do this every time.
Regards
MattehwIt indicates your Icon Cache is corrupted and you need to rebuild it.
Open the command prompt window, type each of the following and after every command, hit the Enter button:
cd /d %userprofile%\AppData\Local
attrib –h IconCache.db
del IconCache.db
start explorer
S.Sengupta, Windows Entertainment and Connected Home MVP -
How to select the max rowid from a subquery with group by
Hi Gurus,
Kindly help how to fix the following query because I'm getting Oracle error:ORA-01446.
select * from edy_raw_data a
where rowid in ( select max(rowid) from(
select email,max(date_updated) from edy_raw_data b
where b.email=a.email
group by email ))
The query select the max rowid from a sub query with group by.
Thanks in Advance.
BenjieWhy do you need to compare with rowid?
Wouldn't this suffice?
select * from edy_raw_data a
where (email,date_updated) = (select email, max(date_updated) from edy_raw_data b
where b.email=a.email
group by b.email ))* Note: untested -
Need help with java File IO ( Removing the first line from a file )
Hi guys ,
I am currently doing a project in which I need to extract out the values from the second line of a file to the end. The question is how do I ignore the first line ??
I thought of two possible answers myself. One is to use randomaccessfile to read and rewrite. But the file may be HUGE so storing the whole file in memory is not a very good idea.
Second is to jump to second line before doing while ((str = in.readLine()) != EOL) ... or just delete the first line from the file. Can anyone suggest a better solution or show me some sample codes ? Thanks.
regards
billyamJust skip the first line (bufferedReader.readLine()), add a comment, and then handle the rest of your file
-
When viewing pick lists from different web sites my iPad 2 (safari) selects the first choice on the list and loads it without allowing me to pick my option; is there a way to change this default?
With your playhead over the clip in the timeline and that V track's 'track selector' as the only one active...hit the 'f' key.
This will load the original clip into the viewer at the matching point of the frame in the timeline.
K -
Getting the first row for each group
Hi Everyone,
I have a query which returns a number of rows, all of which are valid. What I need to do is to get the first row for each group and work with those records.
For example ...
client flight startairport destairport stops
A fl123 LGW BKK 2
A fl124 LHR BKK 5
B fl432 LGW XYZ 7
B fl432 MAN ABC 8
.... etc.
I would need to return one row for Client A and one row for Client B (etc.) but find that I can't use the MIN function because it would return the MIN value for each column (i.e. mix up the rows). I also can use the rownum=1 because this would only return one row rather than one row per group (i.e. per client).
I have been investigating and most postings seem to say that it needs a second query to look up the first row for each grouping. This is a solution which would not really be practical because my query is already quite complex and incorporating duplicate subqueries would just make the whole thing much to cumbersome.
So what I really new is a "MIN by group" or a "TOP by group" or a "ROWNUM=1 by group" function.
Can anyone help me with this? I'm sure that there must be a command to handle this.
Regards and any thanks,
Alan Searle
Cologne, GermanySomething like this:
select *
from (
select table1.*
row_number() over (partition by col1, col2 order by col3, col4) rn
from table1
where rn = 1In the "partition by" clause you place what you normally would "group by".
In the "order by" clause you define which will have row_number = 1.
Edit:
PS. The [url http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#i81407]docs have more examples on using analytical functions ;-)
Edited by: Kim Berg Hansen on Sep 16, 2011 10:46 AM -
System only loading the first column from csv
Trying to load data from Excel saved as csv, but the preview and PSA shows data loaded only for the first column from the csv file. All other columns are not loaded from the csv. Changed the lengths of the fields from the datasource to match the ones in the csv to 8, but it only seems to load the first column. What could be the cause?
Hi
Check the file format once and general tab in Data source(make sour you selected comma separated file and symbol)
check below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/01ed2fe3811a77e10000000a422035/frameset.htm
Regards,
Venkatesh -
I clicked on iMessage on my Macbook Pro today for the first time, and now NOTES keeps opening up every 5 seconds, with a new note. I cannot stop it from opening. If I close it or force close, it opens again in 5 seconds. I can't get rid of it. I have tried to clear out the iMessage settings I had put in, and I've tried to adjust the Accounts to not include notes to synch. But, Notes will not stop. It opens a new note, and even if you ignore it, it assumes preference every 5 seconds, and the Mac is impossible to use.
Do you have any Boot Camp or other secondary partitions set up on your system? If so then try running a disk verification routine (chkdsk, etc.) in Windows to repair the disk. While I've not heard of it happening recently, in the past errors in these partitions have resulted in stubborn ghost files appearing in OS X.
-
I can't open the RAW files from my new Nikon D4s camera in photoshop? How do I download the latest software for RAW files? Cheers!
What version of Photoshop are you running? You will need at CS5, CS6, CC or CC2014. Each version needs a different ACR-plug-in to open files from that camera.
If you are on CS4 or earlier, you'll need to upgrade—or, in the alternative; look for, download, instal, launch and run the free, stand-alone DNG Converter 8.6 on each file of raw NEF files to convert them to raw DNGs first so you can open them in your version of Photoshop and ACR plug-in higher than 2.4. -
Issues exporting file from Target group
Hi Experts,
Can someone let me know the process for exporting file from Target group, I am working on CRM 7.0 .
or give me the SNOTE to implement the same.
Thanks
LeelaHi,
for small Target Groups (i.e. Target Groups that can be displayed completely on the UI, < 10k members) you can export them via the export to spreadsheet button on the header of the Target Group item page (right side). Note that only the members that are shown in the table on the UI are exported. For bigger Target Groups, you can only export them to the application server. To do this, you will have to press the "Export to File" button on the header of the Target Group page. this will schedule a job which exports your Target Group to the application server. You can download it from there using report CRM_MKTTG_FEXP_SHOW_FILE.
Hope this helps
--klaus -
On Adobe's web site it states the trial version has all functionality. FAQ, common questions & answers | Adobe Photoshop Elements 13 "These trial versions are fully functional, so every feature and aspect of the product is available for you to test-drive. Product trials can easily be converted for unrestricted use without the necessity to reinstall the software in most cases."
However, I cannot load pictures into the photomerge panorama window either from' browse' or 'add open files'. When I select either way nothing happens.This happens if I enter panorama from photo editor and/or organizer.
Can anybody enlighten me about this?
Thanks,
BarryIt seems your Samba is denying access to these files & dirs. My best guess would be that either the Samba user is not allowed to write (and read) those (in which case you'd have to modify the permissions accordingly) or Samba sets, when the share is mounted, the permissions such that your user is not allowed to read and write (you may in this case try to just set permissions for you to allow you what you want to do; or use "create mask" or "directory mask" or "writable" in your samba config. ).
Also, what do the logs say about this? According to your samba conf they are in /var/log/samba/%m.log where %m is the hostname or IP. -
I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?
Canon 1DX support was added to ACR in version 6.7, 7.1. An updated CS6 should be at level ACR 8.6. If your ACR is not at level 8.6 try using CS6 menu Help>Updates. If that does not install ACR 8.6 try downloading the ACR and DNG 8.6 converter and see if ACR 8.6 will install into your CS6.
Adobe - Adobe Camera Raw and DNG Converter : For Windows
Adobe - Adobe Camera Raw and DNG Converter : For Macintosh
Maybe you are looking for
-
Error while deploying application to weblogic 10.3
Hello! I am getting below error while deploying my portal application in weblogic 10.3 server. The application code was migrated in weblogic workshop from version 8.1 SP3. I believe I might be missing some reference of library. If anyone can point ou
-
What is the alternative for DisplayMemberPath="Value" for Windows Store applications?
I think there is a bug with Windows Store Applications when it comes to using DisplayMemberPath="Value". Here is my code <ComboBox Height="40" VerticalAlignment="Stretch" SelectedValuePath="Key" DisplayMemberPath="Value" x:Name="comboBox1" FontSize="
-
2602 AP in Stand-Alone- Utilizing Both Bands
We typically use the 2602 series AP in lightweight mode, however I have a scenario where we are going to be installing one with the stand-alone software. I understand that we will not be able to utilze certain features that you get with the WLC such
-
I have yet to be able to update to 5.1.1. It will not down load to my iTunes either. My iPad comes back with an undesignated error, saying it cannot update.
-
NEED TO KNOW HOW TO VIEW .ASHX FILES
TO LOOK AT OLD BANK STATEMENTS, I NEED TO BE ABLE TO SEE THESE FILES. AS THE WINDOW POPS UP IN THE BROWSER, IT SHOWS NOTHING BUT BLACK. I USED TO BE ABLE TO READ THESE STATEMENTS. DONT KNOW IF THEY CHANGED THEIR FORMAT OR I SOMEHOW CHANGE A SETTING.