QuickSearch (Opera style)

Discuss and share scripts and script files...
Post Reply
serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

QuickSearch (Opera style)

Post by serendipity »

Inspired by opera's search i tried to mimic a similar behavior in this script. It has similar searches as SearchTheWeb.xys but with no menu and hence lesser clicks. I made this for my own use, but who knows you might like it too.
How it works:
1) Place Quicksearch.xys in scripts folder and use ::load QuickSearch; from AB or catalog or elsewhere.
2) You will get an input window where you have to enter a search code followed by space and your search term.
For example an input "g xyplorer" (without quotes) will search for xyplorer in google, while "k xyplorer" will search for xyplorer in wikipedia.
Download QuickSearch.xys:
QuickSearch.xys
To see the attached files, you need to log into the forum.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: QuickSearch (Opera style)

Post by serendipity »

@Don,
Is it possible to have more space above the input dialog? For example in the below script I have provided search codes and could manage it somehow. But can we expect more space, like in the batch rename input box?

One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?

admin
Site Admin
Posts: 66254
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: QuickSearch (Opera style)

Post by admin »

serendipity wrote:@Don,
Is it possible to have more space above the input dialog? For example in the below script I have provided search codes and could manage it somehow. But can we expect more space, like in the batch rename input box?

One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?
Yep, I had planned that anyway.

Sections and Keys seem to be appended to the XYS file -- feels a bit funny but since it is protected inside "_recent" it might work. How did you achieve the indent???

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: QuickSearch (Opera style)

Post by jacky »

serendipity wrote:One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?
Keep in mind that there's a huge downside to this : if you ever intend to share this script for instance, it's much better to have the settings stored in a separate file, obviously.

I'd say you should do it only for specific stuff relating to your scripts but not actual (user) options, for instance I use it on my updater script to store its version number and the required XY version number, but all user-settings are stored in a separate INI file.
Proud XYplorer Fanatic

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: QuickSearch (Opera style)

Post by serendipity »

admin wrote:
serendipity wrote:@Don,
Is it possible to have more space above the input dialog? For example in the below script I have provided search codes and could manage it somehow. But can we expect more space, like in the batch rename input box?

One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?
Yep, I had planned that anyway.

Sections and Keys seem to be appended to the XYS file -- feels a bit funny but since it is protected inside "_recent" it might work. How did you achieve the indent???
OK, will wait for the input box.
And the indent, I created it already inside the script and the getkey and setkey did not change the indent. But otherwise i did not find any way to create an indent. So seems like sections and keys should be pre-defined in the script for it to work.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: QuickSearch (Opera style)

Post by serendipity »

jacky wrote:
serendipity wrote:One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?
Keep in mind that there's a huge downside to this : if you ever intend to share this script for instance, it's much better to have the settings stored in a separate file, obviously.

I'd say you should do it only for specific stuff relating to your scripts but not actual (user) options, for instance I use it on my updater script to store its version number and the required XY version number, but all user-settings are stored in a separate INI file.
Yup, thats another downside apart from the fact that its hard to indent the section and keys in a script file. I was just curious to try this and was happy that I dont have to deal with an ini file just for running a script. But seems like its not that ideal after all.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: QuickSearch (Opera style)

Post by serendipity »

admin wrote:
serendipity wrote:@Don,
Is it possible to have more space above the input dialog? For example in the below script I have provided search codes and could manage it somehow. But can we expect more space, like in the batch rename input box?

One more thing, I found that I dont have to create a new ini file to set or get keys. I could do that in the script file itself using some strange tricks. While this does seem to work, would you ever recommend this?
Yep, I had planned that anyway.
Thanks for including in 7.80.0030. :D

Post Reply