|
Re: Trying to move away from Finder...
I find this way slightly easier to remember (and type):
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
set usr to current application's NSUserName() as text
set
I find this way slightly easier to remember (and type):
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
set usr to current application's NSUserName() as text
set
|
By
2551phil
·
#136
·
|
|
Re: Trying to move away from Finder...
Hey Michael,
Eh? Oh, yeah — you're right. The POSIX Path coercion will work on aliases, hfs-paths, FURLs...
But you can't expand a home-based POSIX Path in similar fashion.
The only direct way of
Hey Michael,
Eh? Oh, yeah — you're right. The POSIX Path coercion will work on aliases, hfs-paths, FURLs...
But you can't expand a home-based POSIX Path in similar fashion.
The only direct way of
|
By
Christopher Stone
·
#135
·
|
|
Re: Trying to move away from Finder...
Unless I'm missing the point here — entirely possible! — for whatever it's worth you actually don't need Finder *or* System Events for this particular task. The following does nicely, without any
Unless I'm missing the point here — entirely possible! — for whatever it's worth you actually don't need Finder *or* System Events for this particular task. The following does nicely, without any
|
By
Michael Grant
·
#134
·
|
|
macOS Service and .scptd
Hi everyone!
I want to create a service in Omnifocus to get something done.
I usually create a script (.scpt), copy it and paste into the action "Run AppleScript" of Automator, and its ok.
But now I
Hi everyone!
I want to create a service in Omnifocus to get something done.
I usually create a script (.scpt), copy it and paste into the action "Run AppleScript" of Automator, and its ok.
But now I
|
By
Alberto González
·
#133
·
|
|
Distributing an AppleScript on a disk image
I'm a very occasional user of AppleScript, so I'm not all that up on how to do things. I have failed to find something by search, so here's my question.
My application allows users to create custom
I'm a very occasional user of AppleScript, so I'm not all that up on how to do things. I have failed to find something by search, so here's my question.
My application allows users to create custom
|
By
John Brownie
·
#132
·
|
|
Re: Trying to move away from Finder...
Nice! I’m pretty swamped at the moment, but could likely test this weekend.
<hand raised>
Ray
Nice! I’m pretty swamped at the moment, but could likely test this weekend.
<hand raised>
Ray
|
By
Ray Robertson
·
#131
·
|
|
Re: Trying to move away from Finder...
Yes, within days. I'm looking for volunteers to test the new stuff.
Some clean-up and better trapping of problems. Also handlers for getting the contents of folders, including recursively. Plus a
Yes, within days. I'm looking for volunteers to test the new stuff.
Some clean-up and better trapping of problems. Also handlers for getting the contents of folders, including recursively. Plus a
|
By
Shane Stanley
·
#130
·
|
|
Re: Trying to move away from Finder...
Shane, thanks for mentioning, and thus reminding me of, this great library of yours.
One of the things I really like is that it automatically handles all types of file/folder references.
From the
Shane, thanks for mentioning, and thus reminding me of, this great library of yours.
One of the things I really like is that it automatically handles all types of file/folder references.
From the
|
By
JMichaelTX
·
#129
·
|
|
Re: Trying to move away from Finder...
Pretty much. There are exceptions, but it's mostly useful for file/date/string/image manipulation. File manipulation is a biggie simply because the alternatives aren't so hot.
I should also mention
Pretty much. There are exceptions, but it's mostly useful for file/date/string/image manipulation. File manipulation is a biggie simply because the alternatives aren't so hot.
I should also mention
|
By
Shane Stanley
·
#128
·
|
|
Re: Trying to move away from Finder...
Well, that was definitely time well spent on my side, and thank you *very much* for the thorough reply.
This is going to become a very colorful blog post... :-)
I guess it will take me a bit more time
Well, that was definitely time well spent on my side, and thank you *very much* for the thorough reply.
This is going to become a very colorful blog post... :-)
I guess it will take me a bit more time
|
By
Jean-Christophe Helary <jean.christophe.helary@...>
·
#127
·
|
|
Re: Trying to move away from Finder...
The pipes around NSURL are used because there's a terminology clash with a fairly common scripting addition that unfortunately uses the Cocoa class name. Preceding it by "current application's " is
The pipes around NSURL are used because there's a terminology clash with a fairly common scripting addition that unfortunately uses the Cocoa class name. Preceding it by "current application's " is
|
By
Shane Stanley
·
#126
·
|
|
Re: Trying to move away from Finder...
Thank you Shane.
Trying to understand the code below (while trying to understand the Foundation documentation in Xcode):
It looks like you are calling a handler (fileURLWithPath) that belongs to
Thank you Shane.
Trying to understand the code below (while trying to understand the Foundation documentation in Xcode):
It looks like you are calling a handler (fileURLWithPath) that belongs to
|
By
Jean-Christophe Helary <jean.christophe.helary@...>
·
#125
·
|
|
Re: Trying to move away from Finder...
I was going to write something like that but considering my "level" in AS it would have sounded more like a sad rant than anything else so I gave up.
But, yes, that's my feeling, plus the fact that
I was going to write something like that but considering my "level" in AS it would have sounded more like a sad rant than anything else so I gave up.
But, yes, that's my feeling, plus the fact that
|
By
Jean-Christophe Helary <jean.christophe.helary@...>
·
#124
·
|
|
Re: Trying to move away from Finder...
Defining best can be the issue, though. I suspect what most scripters really want is a single tool that may not be the fastest at everything, but is reliable, straight-forward to use, and fast
Defining best can be the issue, though. I suspect what most scripters really want is a single tool that may not be the fastest at everything, but is reliable, straight-forward to use, and fast
|
By
Shane Stanley
·
#123
·
|
|
Re: Trying to move away from Finder...
Hey Jean-Christophe,
Unequivocally — nyet! (At least much of the time.)
There are times when System Events will do things faster than the
Hey Jean-Christophe,
Unequivocally — nyet! (At least much of the time.)
There are times when System Events will do things faster than the
|
By
Christopher Stone
·
#122
·
|
|
Re: Trying to move away from Finder...
Well you could always use:
tell application "System Events" to set originals_folder to folder "originaux" of project_folder
Or use "item" instead of "folder". However, what it leaves you with is a
Well you could always use:
tell application "System Events" to set originals_folder to folder "originaux" of project_folder
Or use "item" instead of "folder". However, what it leaves you with is a
|
By
Shane Stanley
·
#121
·
|
|
Re: Best way to orderly display dialogs etc.
Hey Jean-Christophe,
Yes, and that's bad manners.
If you want your dialog to be in the Finder then the script should switch there before launching the
Hey Jean-Christophe,
Yes, and that's bad manners.
If you want your dialog to be in the Finder then the script should switch there before launching the
|
By
Christopher Stone
·
#120
·
|
|
Re: Trying to move away from Finder...
There are places where I need Finder scripting because I use Finder (for ex to get its front window), but for the rest: working with paths, folders and files on a programatic level, I'd rather not
There are places where I need Finder scripting because I use Finder (for ex to get its front window), but for the rest: working with paths, folders and files on a programatic level, I'd rather not
|
By
Jean-Christophe Helary <jean.christophe.helary@...>
·
#119
·
|
|
Re: Trying to move away from Finder...
What are you using in place of Finder? It remains one of the most scriptable applications, and I’ve found that I can replicate most of the functions of alternatives like Path Finder (at least the
What are you using in place of Finder? It remains one of the most scriptable applications, and I’ve found that I can replicate most of the functions of alternatives like Path Finder (at least the
|
By
Michael Grant
·
#118
·
|
|
Trying to move away from Finder...
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
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
|
By
Jean-Christophe Helary <jean.christophe.helary@...>
·
#117
·
|