Messages - ottenm [ switch to compact view ]

Pages: prev1 2 3 4 5 [6] 7 8 9 10 11 ... 19next
26
Sorry I can't quite get my head around a way to do this from farr.

I currently have a farr hotkey defined with the "Text for Search Edit Box" set to "search\s".  And "search" is defined as an alias with about 15 results, the first of which is a google search.  So when I use the hotkey I type my search text into farr and hit enter, which opens my browser (firefox) with the google results.

I have firefox set to open links like this in the current tab, which is what I prefer most of the time.  But there are times I'd basically like farr to open a new tab in ff and then open the google results there (effectively opening my results in a new tab, but without changing that preference in firefox).

I found 'sendkeys' in farr, but can't get my head around getting farr to switch from whatever app I start in, over to Firefox, then send the keys to open a tab, then go back to farr and run the 'search' alias.

Thanks for any help!

27
Find And Run Robot / Re: help searching recipes.docx from farr?
« on: July 12, 2014, 06:36 PM »
Firstly, Mouser is clearly one of the greatest individuals of all time!  I hope it is known to anyone or anything that ever lives with Mouser that he is never to be hassled with thing like sock pickup, dish cleaning, or anything else at that level.

I was wrong about being able to open a MS-Word document scrolled to a particular bookmark.  I could only get it to work from hyperlinks inside Word documents, not from arbitrary/html url's outside Word.  "file:///recipes.docx#bookmark_name" opens the file, but ignores the bookmark.  Many fruitless hours of forum scanning behind this conclusion despite this dated KB article: http://support.microsoft.com/kb/310520.

Ultimately, I wrote a script to take the name of a bookmark on the command-line.  It opens recipes.docx scrolled to that bookmark.  RecipeOpen.vbs:

Option Explicit

Dim objWord
Dim currentDocument

set objWord = CreateObject("Word.Application")
objWord.DisplayAlerts = 0
objWord.visible = true
objWord.Documents.Open "c:\!projects\recipes.docx", false, False '(path, confirmconversions, readonly)

If WScript.Arguments.Count = 1 Then
set currentDocument = objWord.Documents(1)
   currentDocument.Bookmarks(WScript.Arguments.Item(0)).Select 'bookmark to bottom of screen
   objWord.ActiveWindow.LargeScroll 1 'scroll down 1 frame
   objWord.ActiveWindow.SmallScroll -3 'scroll back a few lines (bookmark to top of screen)
Else
   MsgBox "No bookmark name passed to RecipeOpen.vbs"
End If

objWord.Application.Activate 'move focus to ms-word ;(

Second script RecipeBookmarks.vbs scans my recipes.docx file for bookmarks and creates RecipeBookmarks.txt just as Mouser described above.  Each line contains: search text | url, such as "Top Drawer Seafood  Chowder  | c:\!Projects\RecipeOpen.vbs link20".  Got to remember to run this guy whenever I add a new recipe to the docx file.

Option Explicit

Dim objWord
Dim currentDocument
Dim bmk
Dim fs
Dim f

Set objWord = CreateObject("Word.Application")
objWord.DisplayAlerts = 0
objWord.Documents.Open "c:\!projects\recipes.docx", false, True '(path, confirmconversions, readonly)
Set currentDocument = objWord.Documents(1)

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile("c:\!Projects\RecipeBookmarks.txt", True)

For Each bmk In currentDocument.Range.Bookmarks 'replace trims newlines
    f.WriteLine(Replace(bmk.Range.Text, vbCr, "") & " | c:\!Projects\RecipeOpen.vbs " & bmk.Name)
Next

currentDocument.SaveAs "c:\temp\recipes.htm", 8
currentDocument.Close
Set currentDocument = Nothing
objWord.Quit
Set objWord = Nothing
f.Close
Set f = Nothing

Lastly, inside FARR > Options > Aliases/Keywords/Groups I opened myaliases.alias and created a new Alias with the Trigger/Keyword set to "recipes" and the Result(s) set to "recipes | #filecontents C:\!Projects\RecipeBookmarks.txt".

Works like a charm!  Mouser for president!!

Thanks for all the great tools and support!

28
Find And Run Robot / help searching recipes.docx from farr?
« on: July 11, 2014, 02:11 PM »
I have a bunch of cooking recipes stored in a Microsoft Word document.  Each recipe has a title in bold and underlined, followed by plain text with the ingredients and instructions.  Ideally, I'd like to be able to search the recipes from FARR.  Maybe type something like "recipes chicken" into FARR and have the recipes that have "chicken" in their title show up in the results list.  When you select a recipe from the results list in FARR, it opens the ms-word doc to that page/recipe.  (Search by ingredients would be cool too, but feels pretty steep)

I are a good programmer and can write scripts, apps, vba macros, .... and the like.

The only thing I've found so far on the ms-word side is the ability to create a url that will open a document to a particular bookmark in that document.  Not a bad start, I can easily go through the doc and make each recipe title it's own bookmark.  But how to feed something like the list of bookmarks to FARR results?

Thanks for any suggestions, however tangential!

29
Find And Run Robot / possible to re-attach 'options' to Alt-O?
« on: February 20, 2014, 10:16 AM »
I see in the forum that Alt-O got unwired from the 'options' panel due to an external conflict.  I know how to add hotkeys, but don't know how to tell it to open the farr options panel.  Is it possible?

Thanks-

30
Find And Run Robot / lost control panel items in top results
« on: February 19, 2014, 07:14 AM »
Hello-

Items in the control panel ("Add or Remove Programs" and the like) used to come up as I typed, but somewhere along the line they stopped. ;(

Under 'options' and aliases I have 'cpanel' checked, and I do see the control panel items when I type 'cpanel' (and hit 'Enter'), but they used to come up directly (as I was typing 'add or rem....').

After opening the file cpanel.alias I created a shortcut called 'AddOrRemovePrograms' and pointed it to %windir%\system32\control.exe with all the params copied from cpanel.alias.  If I put the shortcut in one of my folders, *that* works, but maybe a better way?

Thanks for any help.  Running Win XP Pro if that makes a diff.

Pages: prev1 2 3 4 5 [6] 7 8 9 10 11 ... 19next
Go to full version