Re: Trying to move away from Finder...
Re: Trying to move away from Finder...
- Subject: Re: Trying to move away from Finder...
- From: Jean-Christophe Helary <email@hidden>
- Date: Wed, 1 Nov 2017 21:30:12 +0900
What I mean to say, is that once I have the "target of the front window" in a
form or another (either through Finder or not), I theoretically can work the
rest with other "tools" (which may or may not be elegant or "applescripty"),
since I'm mostly working with folders and files and those don't need Finder to
be manipulated (although I'm not yet quite sure how to practically do that).
That's this aspect of manipulating files and folders without Finder that I'm
interested in.
Jean-Christophe
> On Nov 1, 2017, at 21:11, Jean-Christophe Helary
> <email@hidden> wrote:
>
> Apologies for the lack of clarity.
>
>> On Nov 1, 2017, at 20:56, Shane Stanley <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>>> I'm slowly trying to move away from Finder but I have problems finding
>>> equivalents for trivial things that I'm doing, like:
>>>
>>> tell application "Finder" to set default_location to (target of front
>>> window) as alias
>>
>> If you're scripting something that's the Finder's — and in this case really
>> only the Finder's — business (that is, the Finder's front window), then
>> there's no alternative.
>
> I found a "window 1" in System Events for process "Finder", but could not
> find any way to link that to a path or anything that could "locate" the
> window.
>
>> That's the stuff that makes sense to do via Finder scripting, because
>> nothing else has such access to the Finder's state.
>
> I see.
>
>>> or
>>>
>>> tell application "Finder" to set originals_folder to (folder "originaux" of
>>> project_folder)
>>
>> Without knowing what project_folder is and what you intend to do with
>> originals_folder, that's a bit hard to answer.
>
> project_folder is a folder that has been set earlier (including with the
> above code). And I'm specifying a folder "originaux" from which I'll later
> copy files (that I'm selecting in a different step).
>
> The general flow is:
>
> I have a Finder window opened on a "job" in which there is a folder
> (originaux) that contains files.
> I'm creating a folder hierarchy inside that "job" and I want to copy files
> that are in "originaux" to one of its folders.
>
> I was doing that with a huge Finder block until the earlier discussion about
> dialogs and I saw that only a few things actually required Finder (basically
> the places in my code where I handle "folders") so I feel like I'm just one
> step away from removing all the unnecessary calls to Finder and replace them
> by stuff that are more, what, unixy (sorry for the lack of word)?
>
> I am already using one of your handlers there (makeFolderAt) but I'd rather
> not abuse stuff that I don't fully understand (*if* I can pretend I fully
> understand what I'm typing in Applescript, that is...)
>
>
>
> Jean-Christophe Helary
> -----------------------------------------------
> @brandelune http://mac4translators.blogspot.com
> <http://mac4translators.blogspot.com/>
>
>
Jean-Christophe Helary
-----------------------------------------------
@brandelune http://mac4translators.blogspot.com
_______________________________________________
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