-
Hi everyone, I'm trying to create a context menu item that, when clicked, opens an input field. The user should be able to type a search term or URL, and then that input should be used to trigger a web search (e.g., open it in Chrome).
I'm not sure how to properly handle the input and use it to open a browser with the entered search or URL. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
you can use this as a basis: item(title='Browse' tip='Seaarch in Google with your default browser'
cmd=if(input('Web Search', 'Enter a search term:') and input.result().len()>0, 'https://www.google.com/search?q=' + input.result, msg('No search term!', 'Web Search', msg.warning)) )
item(title='Browse' tip='Open a URL with your default browser'
cmd=if(input('Open Web', 'Enter a URL:'), if(str.contains(input.result, 'www'), input.result, msg('Invalid URL!', 'Open Web', msg.warning)), msg('No URL!', 'Open Web', msg.warning)) ) I have no idea
|
Beta Was this translation helpful? Give feedback.
-
Alternatively, you might consider integrating Fluent Search. It allows users to perform simultaneous searches across both their local PC and the internet, which could enhance overall efficiency. Just a suggestion :) |
Beta Was this translation helpful? Give feedback.
you can use this as a basis:
I have no idea
t…