Re: I'm lost (as usual)
Re: I'm lost (as usual)
- Subject: Re: I'm lost (as usual)
- From: Robert Poland <email@hidden>
- Date: Fri, 11 Nov 2016 18:03:47 -0700
- Z-usanet-msgid: XID824ukLBDx5680X31
That works. Don't understand why the variable doesn't work for close window.
"local Domain" is sort of confusing. But I don't know what else too call it. I'll take a trip to Google when I get time.
> On Nov 11, 2016, at 5:14:PM, Stockly, Ed <email@hidden> wrote:
>
> You can specify which domain for the path to command.
>
> set UniversalScriptsFldr to (((path to library folder from system domain
> as alias) as text) & "Scripts:") as alias
>
> --Classic domain
> --local domain
> --network domain
> --system domain
> --user domain
>
>
> How about something like this:
>
> set UniversalScriptsFldr to ((path to library folder as text from user
> domain) & "Scripts:Universal Scripts:") as alias
>
>
> tell application "Finder"
> activate
> set windowList to name of every window
> delay # one second
> choose from list windowList
> if windowList contains "Universal Scripts:" then
> tell application "Finder" to close window "Universal Scripts:"
> else
> open (folder UniversalScriptsFldr)
> end if
> end tell
>
> On 11/11/16, 3:50 PM, "Robert Poland" <email@hidden> wrote:
>
>> I thought that would get the wrong Library.
>>
>> The script below will open the folder, but not close it??? errors. "can't
>> get window" ?
>>
>> set UniversalScriptsFldr to (path to library folder as text) &
>> "Scripts:Universal Scripts" as alias
>>
>> tell application "Finder"
>> activate
>> set windowList to name of Finder windows as text
>> delay # one second
>> display dialog windowList & return & UniversalScriptsFldr
>> if windowList contains "Universal" then
>> tell application "Finder" to close window "UniversalScriptsFldr"
>> else
>> open (folder UniversalScriptsFldr)
>> end if
>> end tell
>>
>>
>>> On Nov 11, 2016, at 4:37:PM, Stockly, Ed <email@hidden> wrote:
>>>
>>> This is how I'd do it:
>>>
>>> set UniversalScriptsFldr to ((path to library folder as text) &
>>> "Scripts:Universal Scripts") as alias
>>>
>>> On 11/11/16, 3:27 PM,
>>> "applescript-users-bounces+ed.stockly=email@hidden on
>>> behalf of Robert Poland"
>>> <applescript-users-bounces+ed.stockly=email@hidden on
>>> behalf of email@hidden> wrote:
>>>
>>>> Hi,
>>>>
>>>> How do I script the following;
>>>>
>>>> set UniversalScriptsFldr to ((path to) folder "/Library" as text) &
>>>> "Scripts:Universal Scripts" as alias
>>>>
>>>> TIA,
>>>>
>>>> Robert Poland
>>>> Fort Collins, CO
>>
>> Robert Poland
>> Fort Collins, CO
>>
>
Robert Poland
Fort Collins, CO
_______________________________________________
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