Limit number of items searched from selection

I recently set up a button to launch a Google search of the item selected in the lister with the following command:

@firstfileonly
"http://www.google.com/search?q={o}"

I find this useful when trying to identify files on my drive. If I leave off the "@firstfileonly", the command will launch a separate copy of my browser for each file selected which is convenient for checking multiple files at once. My concern is that I will inadvertently click the button with a folder full of files selected.

Is there an easy way to limit the number of files which will be searched? I know it should be easy enough using a loop and counter in VBScript but my programming experience is limited to Access VBA.

I just purchased Opus this weekend after playing with it for the last month and have a lot to learn yet. :smiley:

Bob

There's no easy way to set a limit other than all/one/none. You could add a confirmation dialog if that helps:

@Confirm Search for selected files? "http://www.google.com/search?q={o}"

VBScript is very similar to VBA so you'll probably find it easy to pick up if you want to go down that route.

[quote]There's no easy way to set a limit other than all/one/none. You could add a confirmation dialog if that helps:
[/quote]
Thanks Leo. I'll leave the @firstfileonly rather than be bothered with the confirmation dialog. I rarely would select more than 1 file anyway so I will keep it as is. Just wanted to see if there was a simple solution I was missing.

[quote]VBScript is very similar to VBA so you'll probably find it easy to pick up if you want to go down that route.
[/quote]
Can you recommend any good VBScript resources? I'm currently laid up after foot surgery so I should do it while I have the time.

Bob

Not sure what the best site is. There are some short guides/tutorials, some of which are aimed at people who already know VBA, but I don't know which are the good ones.

Once you get going you can usually find what you want via Google (like to find out which objects and methods are available; that's easy to find good resources for), but that's the easy part. What you need more is something that explains the little syntax differences between the two languages (like how the For-Next loops just say "Next" in one language and "Next i" in the other).

They're very, very similar though, so you should find it pretty easy.