Set AppleScript's text item delimiters to space Set rawResult to (do shell script "host " & address & "| head -n1") Set newURL to (" & websiteIP & webPath) as string Set webPath to text ((offset of webServer in webURL) + (length of webServer)) thru -1 of webURL Set webServer to text 1 thru ((offset of "/" in webServer) - 1) of webServer If webURL contains "//" then set webServer to text ((offset of "//" in webURL) + 2) thru -1 of webURL If webURL is equal to "" then set webURL to text returned of (display dialog "Website to visit (bypassing DNS)" default answer webURL) Set webURL to text ((offset of """ in failedWin) + 1) thru ((offset of """ in failedWin) - 1) of failedWin If failedWin contains "Safari can't open the page" then ¬ If (name of currentTab is not "Untitled") then Set currentTab to current tab of window 1 You should have received a copy of the GNU General Public License GNU General Public License for more details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of The Free Software Foundation, either version 3 of the License, or It under the terms of the GNU General Public License as published by This program is free software: you can redistribute it and/or modify Gives up very easily when waiting for a DNS lookup, but command This script was written to get around the annoying way that Safari Bypass DNS in current tab © RickoKid 2008
0 Comments
Leave a Reply. |