Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Search without opening INDD file?

New Here ,
Jul 22, 2024 Jul 22, 2024

How to search text in indd files, without opening it? 

have atleast 50 files, & need to search words in the file, everytime I have to open all 50 indd files, and then using its find dialog box (search all documents) i get my work done. but opening 50 files every time is very much crazy. Do we have any solution for that? 

TOPICS
How to
3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2024 Jul 23, 2024

oh god, can u make a Mac version also, thousands of mac users will be very greatfull for your efforts. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2024 Jul 23, 2024
quote

oh god, can u make a Mac version also, thousands of mac users will be very greatfull for your efforts. 


By @Mr1857

 

I know - but I don't have a Mac so I've no idea if it can be done in AppleScript - maybe some of the functionality but not all.

 

JavaScript is completely out of the question - limited UI, system integration, control over external apps, code can't be fully secured, etc.

 

And then some of the functionality can't even be done with plugins...

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2024 Jul 23, 2024

Just in case:

RobertatIDTasker_0-1721750859946.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 24, 2024 Jul 24, 2024

spotlight dosent search in INDD txt. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 24, 2024 Jul 24, 2024

To do this on a Mac I don't think it you would have to replicate the functionality of Robert's tool.

 

It's definitely essential to actually open the InDesign files — any attempt to read them from outside the program is more trouble than help. They can be opened without showing a window though, which makes the process much quicker.

 

Perhaps @Mr1857 can give us a bit more detail of what they need to do?
   Does the found text need to be replaced or just recorded?
   Does a note need to be kept of where it is found?
   Are all the InDesign files in a single directory or is there a list of their locations?
   Is there a list of the search strings that a script could process?
   How often does the searching have to be done?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 24, 2024 Jul 24, 2024

1. the text is only for searching purpose, i want to find any verse or word, from lots of INdd files. 

2. i should know where this word is.

3. all Indd files are in one folder, having sub folders subject wise.

4. there is no specific list, 

5. i have to search thuru these files - almost daily.

 

like Microsoft word and excel - spotlight can search in these files without opening it. but indd i cannot do that, i have to open all the files and use INDD dialog box for it. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 24, 2024 Jul 24, 2024
LATEST

This helps, but to actually write something that works the detail is essential.

 

So:

   1.  Just one word or verse each time you run the search?

   2. You need to be much more specific here. Do you just want to know the word is in files x, y and z or do you want to know it is on page 5 of x and page 9 of y? And do want to generate a list of these locations?

   3. Not in one folder then but in multiple folders inside one folder? And only one level down or indeterminate levels down?

   4. OK

   5. OK

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 24, 2024 Jul 24, 2024

Here's a crude example:

 

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application id "com.adobe.InDesign"
	set x to "نَعْبُدُ"
	set NextFile to (open file "Macintosh HD:Users:nickpassmore:Desktop:Arabic Text.indd" without showing window)
	set properties of find text preferences to {case sensitive:true, whole word:true, include footnotes:false, include hidden layers:false, include locked layers for find:false, include locked stories for find:false, include master pages:false}
	set find what of find text preferences to x
	tell document 1
		set TextFound to find text
	end tell
	display dialog ("Found " & (count of items of TextFound) & " instances") buttons {"Cancel", "OK"} default button "OK" giving up after 5
	close document 1
end tell
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2024 Jul 23, 2024

Export any file to PDF (what you probably do anyway) and in Acrobat Pro you can use the index function.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines