.
.
.(* ) .
.
The very best responses are voted up and increase to the
leading
.
.
.
.
.
.
Asked
.(* )today
.
Seen
. 6 times
.(* )how can I describe a safari tab utilizing a variable? this code discover the tab I desire throughout all safari windows and
tabs set winmatchlist to {
} set tabmatchlist to {}
set tabnamematchlist to {
} inform application “Safari”
. repeat with w in windows. repeat with t in tabs of w. if( URL of t) consists of” https://www.google.com/demo/” then.
set end of winmatchlist to w.
set end of tabmatchlist to t.
set end of tabnamematchlist to (id of w as string) & & “.” & & 2 &”. “& (name of t as string ). set windowid to( id of w
as string). ## return “& Tab id: “& tabId &” Window id:” & windowId.
end if.
end repeat.
end repeat.
set w to product 1 of winmatchlist.
set t to product 1 of tabmatchlist.
#set existing tab of w to t.
#set index of w to 1.
end inform.
## return tabnamematchlist.
set URLadd to “https://www.google.com”.
inform application “Safari”.
inform window id windowid– the right safari window.
set URL of tab t to URLadd– alter the URL of the 2nd tab.
end inform.
end inform.
this very first line set the right window however
doens’ t work.
inform window id windowid– the right safari window.
set URL of tab t to URLadd– alter the URL of the 2nd tab
. asked 37 minutes back
.
Kevin
Kevin . 2,096
.
Tailor settings
.
.
(
*)
.
.
.
.