Re: AppleScript-Users Digest, Vol 9, Issue 161
Re: AppleScript-Users Digest, Vol 9, Issue 161
- Subject: Re: AppleScript-Users Digest, Vol 9, Issue 161
- From: "email@hidden" <email@hidden>
- Date: Mon, 16 Apr 2012 10:21:59 -0400
LinJim
On Apr 15, 2012, at 1:41 PM, email@hidden wrote:
> Send AppleScript-Users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AppleScript-Users digest..."
>
>
> Today's Topics:
>
> 1. Re: Can't find my scripts (SOLVED) (Ray)
> 2. Re: Hard drive sleeping/waking (Jason Odra)
> 3. Re: AppleScript-Users Digest, Vol 9, Issue 154 (Thomas Fischer)
> 4. Re: Can't find my scripts (SOLVED) (Ray)
> 5. Re: Script performance and Safari (Nigel Garvey)
> 6. Re: Bugs (Alex Zavatone)
> 7. Re: Script performance and Safari (Christopher Stone)
> 8. Address book group (R. Nelson Byrne)
> 9. Re: Bugs (Luther Fuller)
> 10. Re: Address book group (Michelle Steiner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 14 Apr 2012 15:14:45 -0400
> From: Ray <email@hidden>
> To: email@hidden
> Subject: Re: Can't find my scripts (SOLVED)
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Apr 14, 2012, at 15:00 , email@hidden wrote:
>
>> On Apr 14, 2012, at 08:37 , Ray wrote:
>>
>>> I recently updated Microsoft Office to version 14.2 and now when I open an Excel document, I cannot find my scripts.
>>>
>>> Where did they go and how do I restore them?
>>>
>>> Thanks,
>>>
>>
>> They need to be placed in ~/Library/Application Support/Office/Excel Script Menu Items
>
>
> I forgot to mention that they used to reside in ~/Documents/Microsoft User Data/Excel Script Menu Items.
>
>
> Ray R
>
> Raymond P Reedy
> email@hidden
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 14 Apr 2012 17:18:02 -0400
> From: Jason Odra <email@hidden>
> To: Douglas R Tallman <email@hidden>
> Cc: email@hidden
> Subject: Re: Hard drive sleeping/waking
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> You can use Finder for sleep:
>
>
> tell application "Finder"
>
>
> sleep
>
>
> end tell
>
>
>
> Sorry, can't help with the wake part.
>
> On Saturday, April 14, 2012 at 10:54 AM, Douglas R Tallman wrote:
>
>> Is it possible to put a hard drive to sleep via Applescript? Is it possible to wake it up again?
>>
>> I'm having issues with Time Machine stuck in preparing a backup, and it appears to be connected to the hard drive being in a deep sleep -- possibly put that way through the Mac's Energy Saver system. I'd like to do some testing to see if this is indeed the problem or possibly something else.
>>
>> doug
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list (email@hidden (mailto:email@hidden))
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden (mailto:email@hidden)
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20120414/2d7c6aa6/attachment.html>
>
> ------------------------------
>
> Message: 3
> Date: Sun, 15 Apr 2012 11:02:33 +0200
> From: Thomas Fischer <email@hidden>
> To: lin Jim <email@hidden>
> Cc: "email@hidden"
> <email@hidden>
> Subject: Re: AppleScript-Users Digest, Vol 9, Issue 154
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
> Hello,
>
> can you please stop resending your AppleScript-Users Digest to the mailing list?
>
> Thomas
>
>
> Am 13.04.2012 um 16:01 schrieb lin Jim:
>
>>
>>
>> LinJim
>>
>> 在 2012年4月13日,8:51,email@hidden 写道:
>>
>>> Send AppleScript-Users mailing list submissions to
>>> …
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sun, 15 Apr 2012 06:31:56 -0400
> From: Ray <email@hidden>
> To: email@hidden
> Subject: Re: Can't find my scripts (SOLVED)
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Apr 14, 2012, at 15:00 , email@hidden wrote:
>
>> On Apr 14, 2012, at 08:37 , Ray wrote:
>>
>>> I recently updated Microsoft Office to version 14.2 and now when I open an Excel document, I cannot find my scripts.
>>>
>>> Where did they go and how do I restore them?
>>>
>>> Thanks,
>>>
>>
>> They need to be placed in ~/Library/Application Support/Office/Excel Script Menu Items
>
>
>> I forgot to mention that they used to reside in ~/Documents/Microsoft User Data/Excel Script Menu Items.
>
> Its not that they MOVED the scripts, but that they changed the folder location that Excel is seeking, and that NEW folder has only Sample Automator workflow scripts.
>
> Ray R
>
> Raymond P Reedy
> email@hidden
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Sun, 15 Apr 2012 11:56:12 +0100
> From: Nigel Garvey <email@hidden>
> To: AppleScript Users <email@hidden>
> Subject: Re: Script performance and Safari
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> Christopher Stone wrote on Sat, 14 Apr 2012 10:10:41 -0500:
>
>> Yes that's better, but let's simplify a trifle more ― and make certain
> the
>> day is single-digit when available.
>>
>> tell (current date) to set dateStr to "" & (its month as number) & "/" &
>> (its day as number) & "/" & (its year) mod (((its year) div 1000) *
> 1000)
>
> Hi, Chris.
>
> Even that contains an unnecessary text concatenation, a redundant
> integer-to-number coercion, an additional year extraction, and two
> superfluous math operations!
>
> tell (current date) to set dateStr to (its month as number as text) & "/" & (its day) & "/" & (its year) mod 100
>
> This will give two-digit years for the rest of most of our lifetimes,
> but more a bit more code is needed to guarantee it with any year. In
> Snow Leopard, AppleScript dates before 15th October 1582 are totally
> screwed and their use is best avoided. (Their text representations are,
> presumably, Julian, whereas their other properties are still proleptic
> Gregorian.)
>
> tell date "Saturday 25 December 1400 00:00:00" to return {its short date string, its year, its month, its day}
> --> {"25/12/1400", 1401, January, 3}
>
> NG
>
>
>
> ------------------------------
>
> Message: 6
> Date: Sun, 15 Apr 2012 10:49:53 -0400
> From: Alex Zavatone <email@hidden>
> To: Michael Crawford <email@hidden>
> Cc: liste AppleScript US <email@hidden>
> Subject: Re: Bugs
> Message-ID: <email@hidden>
> Content-Type: text/plain; CHARSET=US-ASCII
>
>
> On Apr 14, 2012, at 8:29 AM, Michael Crawford wrote:
>
>> I had them fix a bug I submitted about 9 months after the submission date but they never updated the status of the bug. It is still listed as open along with a handful of other bugs I submitted, which are also still open. Makes me wonder if anyone read the report or if it ever got linked to the defective code, internally.
>>
>> I no longer take the time (which is money I don't see a return on) to submit detailed bug reports. Ive also opened a serious issues with DTS, which has not been handled to my satisfaction. It was acknowledged as a bug after I wrote a test app demonstrating the issue. The response I got back was "Submit a bug report" so the developers can track and fix the issue, sometime in the (vague) future.
>
> It's I've*. Ive is the guy who designs the Macs.
>
> But...
>
> Yeah, it's our time and money. I used to handle this on the corporate side in Director and Shockwave and I made damn sure that they were updated. But these were only visible internally and people had to trust that I was going to do it and get back to them. I did, since Macromedia would not allow a public bug database.
>
> I will not report bugs today, since it's a black hole and I have my own responsibilities in the office. Can't spend time on them. With that in mind, it's Sunday and I'm heading in to the office.
>
>> After all of the detail and example code I had submitted up to that point, I was kind of disgusted that it didn't automatically get turned into a bug report or that the person that I dealt with could not make the necessary entry in the defect database.
>>
>> Sorry, I'm digressing. But I do feel a little better now that I've got that off my chest.
>>
>
> But it's true. It's a very valid bitch.
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Sun, 15 Apr 2012 11:03:22 -0500
> From: Christopher Stone <email@hidden>
> To: Applescript Users List <email@hidden>
> Subject: Re: Script performance and Safari
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Thanks Nigel,
>
> I knew you would come up with something more efficient, as I mentioned in my first post. :)
>
> On Apr 15, 2012, at 05:56, Nigel Garvey wrote:
>> Even that contains an unnecessary text concatenation
>
>
> So 'as text' is actually more efficient than the leading coercion. Why specifically is that? Because 'text' is already a property of the value?
>
> It's not substantially faster, but it's measurable.
>
>> In Snow Leopard, AppleScript dates before 15th October 1582 are totally screwed and their use is best avoided. (Their text representations are, presumably, Julian, whereas their other properties are still proleptic Gregorian.)
>>
>> tell date "Saturday 25 December 1400 00:00:00" to return {its short date string, its year, its month, its day}
>>
>> --> {"25/12/1400", 1401, January, 3}
>
> Ouch. This is still true in Lion.
>
> --
> Best Regards,
> Chris
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20120415/1e42b661/attachment.html>
>
> ------------------------------
>
> Message: 8
> Date: Sun, 15 Apr 2012 09:25:32 -0700
> From: "R. Nelson Byrne" <email@hidden>
> To: email@hidden
> Subject: Address book group
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> I want to add all company-type entries whose name contains "Hotel", "Motel", or "Inn" to my existing group "Lodging". So I write:
>
>> "Lodging" returning LodgeGroup
>> tell application id "com.apple.AddressBook"
>> get every person whose company is true returning Companies
>> repeat with co in Companies
>> get name of co returning coname
>> if (coname contains "Hotel") or (coname contains "Hotel") or (coname contains "Inn") then add co to group LodgeGroup
>> end repeat --with co in Companies
>> --See what's there
>> {} returning LodgeList
>> get every person in group LodgeGroup returning Lodging
>> end tell ---application id "com.apple.AddressBook"
>> length of Lodging
>
>
> A graceful feature of Address Book is that trying to add something to the group if it's already there doesn't cause an error. It quietly ignores the request and continues. I don't have to check if the entry already exists.
>
> This script runs just fine. The last bit of the script counts how many there are in the group after the script does its magic. In my case the result is 26.
>
> But when I myself open Address Book and look at the group - - - it's empty!
>
> How come?
>
> Regards,
>
>
> Nelson Byrne
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 495 bytes
> Desc: Message signed with OpenPGP using GPGMail
> URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20120415/24b0a56f/attachment.asc>
>
> ------------------------------
>
> Message: 9
> Date: Sun, 15 Apr 2012 11:46:00 -0500
> From: Luther Fuller <email@hidden>
> To: Applescript Users <email@hidden>
> Subject: Re: Bugs
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> I just took a look at the Finder's dictionary. I noticed this ...
>
> container n [inh. item] : An item that contains other items
> elements
> contains items, containers, folders, files, alias files, application files, document files, internet location files, clippings, packages; contained by application, containers, disks, folders, desktop-objects, trash-objects.
> properties
> entire contents specifier, r/o : the entire contents of the container, including the contents of its children
> expandable boolean, r/o : (NOT AVAILABLE YET) Is the container capable of being expanded as an outline?
> expanded boolean : (NOT AVAILABLE YET) Is the container opened as an outline? (can only be set for containers viewed as lists)
> completely expanded boolean : (NOT AVAILABLE YET) Are the container and all of its children opened as outlines? (can only be set for containers viewed as lists)
> container window specifier, r/o : the container window for this folder
>
> Many years ago, I used completely expanded to set all disclosure triangles in a list view folder to horizontal (false).
> Then, one day, I noticed that this was no longer available, but the phrase "NOT AVAILABLE YET" seems to indicate that Apple will have this working SOON.
>
> I waited and waited with a picture in my mind of Apple's programmers busily restoring this feature.
> Then I realized that years and years had passed and nothing had happened. There can be only two possible conclusions ...
>
> Either Apple's programmers are (1.) incompetent or (2.) they just don't care.
>
> Which is worse? Probably 2.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20120415/6fb5d16b/attachment.html>
>
> ------------------------------
>
> Message: 10
> Date: Sun, 15 Apr 2012 10:41:00 -0700
> From: Michelle Steiner <email@hidden>
> To: Applescript Users <email@hidden>
> Subject: Re: Address book group
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> On Apr 15, 2012, at 9:25 AM, R. Nelson Byrne wrote:
>
>> But when I myself open Address Book and look at the group - - - it's empty!
>
> Make the last line before the end tell:
>
> save address book
>
> That should fix the problem.
>
> -- Michelle
>
> --
> You don't need to be 'straight' to fight for your country. You just need to shoot straight.
> -- Barry Goldwater
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/applescript-users
>
> End of AppleScript-Users Digest, Vol 9, Issue 161
> *************************************************
_______________________________________________
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