Re: Keeping a text-entry in the background, or a work-around
Re: Keeping a text-entry in the background, or a work-around
- Subject: Re: Keeping a text-entry in the background, or a work-around
- From: Clint Hoxie <email@hidden>
- Date: Fri, 30 Nov 2007 06:24:17 -0700
See my immediate follow-up post. The error was in my 1st URL in my own
list, not in the code. I neglected to place the "http://" in front of
the 1st URL (just because making stupid omissions always makes
debugging more fun), which resulted in a blank tab.
Clint
On Nov 30, 2007, at 3:03 AM, J. Stewart wrote:
On 11/29/07 at 6:33 PM, Clint Hoxie <email@hidden> spake thusly:
This works...almost. What happens is I get a window that opens with
a blank tab (my home page is blank) and then fills all the
following tabs with items 2 through x on my list.
Any idea why the first URL is not populating the address bar?
No idea, the script should ignore any previously opened windows.
Clint
PS - I changed the start marker in the in the repeat line from "2
to count uList" to "1 to count uList", with no change, except an
extra empty tab.
I wrote it using Safari 3.04 in Mac OS X 10.5.1, it works fine here.
Is your setup different?
set win to (make new document at beginning)
set URL of win to contents of item 1 of uList
This part of the script should open a new window even if there are
already open windows. The first url of the list is used to address
the newly opened page. Note that there are no existing tabs at this
point. If the first url doesn't address this new page then this is
where it's going wrong.
tell window 1
repeat with x from 2 to count uList
set curTab to (make new tab at end)
set URL of curTab to contents of item x of uList
end repeat
end tell
This part makes the tabs. Keep in mind that the first iteration
assumes there are no existing tabs and actually generates 2 of them.
The first tab contains the original page (item 1 of the list) and
the second one being item 2 of the list. Subsequent iterations
create one tab for each list item. This is why the loop starts with 2.
If you made changes to the script code you may have changed the flow
in ways I didn't anticipate. It's a good idea to post the changed
script in your replies so I/we can see what's going on.
JBS
--
Never try to outstubborn a cat. -Lazarus Long (Robert Heinlein)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden