=== modified file 'source/config/__init__.py'
--- source/config/__init__.py	2012-02-09 01:42:11 +0000
+++ source/config/__init__.py	2012-03-11 13:06:05 +0000
@@ -272,7 +272,7 @@
 		configPath=globalVars.appArgs.configPath
 	if not os.path.isdir(configPath):
 		os.makedirs(configPath)
-	for subdir in ("appModules","brailleDisplayDrivers","speechDicts","synthDrivers","globalPlugins"):
+	for subdir in ("appModules","brailleDisplayDrivers","speechDicts","synthDrivers","globalPlugins","search"):
 		subdir=os.path.join(configPath,subdir)
 		if not os.path.isdir(subdir):
 			os.makedirs(subdir)

=== modified file 'source/cursorManager.py'
--- source/cursorManager.py	2012-01-04 07:53:24 +0000
+++ source/cursorManager.py	2012-03-13 16:08:43 +0000
@@ -18,6 +18,8 @@
 import config
 import braille
 import controlTypes
+import os
+import re
 
 class CursorManager(baseObject.ScriptableObject):
 	"""
@@ -34,6 +36,10 @@
 
 	_lastFindText=""
 
+# For specific search
+
+	_lastSpecificFindText=""
+
 	def __init__(self, *args, **kwargs):
 		super(CursorManager, self).__init__(*args, **kwargs)
 		self.initCursorManager()
@@ -85,6 +91,7 @@
 				wx.CallLater(100, self.doFindText, d.GetValue())
 		gui.runScriptModalDialog(d, callback)
 
+
 	def doFindText(self,text,reverse=False):
 		if not text:
 			return
@@ -117,6 +124,62 @@
 		self.doFindText(self._lastFindText,reverse=True)
 	script_findPrevious.__doc__ = _("find the previous occurrence of the previously entered text string from the current cursor's position")
 
+
+# For specific search
+
+	def standarFileName(self, fileName):
+		notAllowed = re.compile("\?|:|\*|\t|<|>|\"|\/|\\||") # Invalid characters
+		allowed = re.sub(notAllowed, "", unicode(fileName))
+		return allowed
+
+	def getFile(self):
+		obj=api.getForegroundObject()
+		file = obj.name
+		i = file.rfind(" - ")
+		file = self.standarFileName(file)
+		file = file[:i]+".txt"
+		path=config.getUserDefaultConfigPath()
+		config.initConfigPath(None)
+		path=path+"\\search\\"+file
+		abspath=os.path.abspath(path)
+		return abspath
+
+	def saveSpecificFindTextDialog(self):
+		d = wx.TextEntryDialog(gui.mainFrame, _("Type the text you wish to save"), _("Save text for specific search"), defaultValue="")
+		def callback(result):
+			if result == wx.ID_OK:
+				# Make sure this happens after focus returns to the document.
+				wx.CallLater(100, self.saveSpecificFindText, d.GetValue())
+		gui.runScriptModalDialog(d, callback)
+
+	def saveSpecificFindText(self, text):
+		f = open (self.getFile(), "w")
+		f.write(text.encode("latin-1"))
+		f.close
+
+	def script_specificSave(self,gesture): 
+		self.saveSpecificFindTextDialog()
+	script_specificSave.__doc__ = _("Save a text string for a specific search")
+
+	def doSpecificFindTextDialog(self):
+		d = wx.TextEntryDialog(gui.mainFrame, _("Type the text you wish to find"), _("Specific search"), defaultValue=self._lastSpecificFindText)
+		def callback(result):
+			if result == wx.ID_OK:
+				# Make sure this happens after focus returns to the document.
+				wx.CallLater(100, self.doFindText, d.GetValue())
+		gui.runScriptModalDialog(d, callback)
+
+	def script_specificFind(self,gesture): 
+		f = open(self.getFile(), "r")
+		self._lastSpecificFindText = f.read()
+		f.close()
+		self.doSpecificFindTextDialog()
+	script_specificFind.__doc__ = _("find a text string from the current cursor position for a specific page")
+
+
# End for specific search
+
+
+
 	def script_moveByPage_back(self,gesture):
 		self._caretMovementScriptHelper(textInfos.UNIT_LINE,-config.conf["virtualBuffers"]["linesPerPage"],extraDetail=False)
 
@@ -281,6 +344,8 @@
 		"kb:NVDA+Control+f": "find",
 		"kb:NVDA+f3": "findNext",
 		"kb:NVDA+shift+f3": "findPrevious",
+		"kb:control+shift+NVDA+s": "specificSave",
+		"kb:control+shift+NVDA+f": "specificFind",
 	}
 
 class _ReviewCursorManagerTextInfo(textInfos.TextInfo):

=== modified file 'source/virtualBuffers/__init__.py'
--- source/virtualBuffers/__init__.py	2012-01-25 05:45:14 +0000
+++ source/virtualBuffers/__init__.py	2012-03-11 10:27:58 +0000
@@ -158,7 +158,8 @@
 		lineEnd=ctypes.c_int()
 		NVDAHelper.localLib.VBuf_getLineOffsets(self.obj.VBufHandle,offset,config.conf["virtualBuffers"]["maxLineLength"],config.conf["virtualBuffers"]["useScreenLayout"],ctypes.byref(lineStart),ctypes.byref(lineEnd))
 		return lineStart.value,lineEnd.value
- 
+
+
 	def _getParagraphOffsets(self,offset):
 		lineStart=ctypes.c_int()
 		lineEnd=ctypes.c_int()

