Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, force
- ^+W::
- InputBox, searchTerm, Wiki Query, Please type the name of the wiki page you'd like to visit`n(E.g Dragon Slayer 2)
- if (searchTerm != ""){
- spacedURL = http://osrs.wiki/%searchTerm%
- finalURL := StrReplace(spacedURL, A_Space, "_") ;removes spaces from the user input
- try
- {
- ; first tries to open in chrome
- run, chrome.exe %finalURL%
- }
- catch {
- try
- {
- ; tries firefox if chrome faisl
- run, firefox.exe %finalURL%
- } catch
- {
- ; kills the script if neither are installed
- return
- }
- }
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement