AutoHotkey Community

It is currently May 26th, 2012, 7:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: May 23rd, 2008, 10:44 pm 
Let me set a scene, single folder large number of randomly named files,

Lets imagine names, Andrew, Brian, Robert, Paul

Need to open files in (some kind) of order just so every file eventauly gets opened.

lets imagine in the code selects Andrew.doc it opens it in word, it now begins a search for keywords found in a text file called 'keywords' heres some Age, colour, fish.

It finds fish first. Each keyword is associated with a list of phrases eg. #This fish is smelly,
#This is a big fish
#This is an ugly fish,

in a dropdown box these options can be selected from. Enter is pressed and the comment inserted.

next keyword is found..... searching... found Age - dropdown box again this time 13 is selected from the list of options in 'keywords.txt' for the word Age.

User presses - WIN N and the next file in the specified directory is opened and used.





I know its a big request and its not even a request really more a request for pointers and anyone suggest scripts I might be able to perfor 'a cut and shut' job to stick bits together and get it to work.... All comments welcome.


Thankyou

Andrew


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 11:05 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
are you forced to do word files?

txt files are easier to search

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 11:11 pm 
Use Loop get the file-names/paths, save those paths in a variable, next you'd open the files from the variable you saved one by one with the Run command or COM or control-o in Word. Then do a control-f to call up the find window, and get the found and highlighted text with COM, compare it against the keywords you saved in a ini/tab-delimited file, again with Loop, then show a Gui with the options you found, and insert the selected one with Send or the Clipboard.

MS Office Automation Functions (via COM) [thanks Sean]

There might be a way to do the search via COM too, and not the find-dialog, so you could create an AHK Gui for that.

HTH


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, kkkddd1, tomL and 69 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group