RE: Applescript-users Digest, Vol 2, Issue 40
RE: Applescript-users Digest, Vol 2, Issue 40
- Subject: RE: Applescript-users Digest, Vol 2, Issue 40
- From: "Jim Murphy" <email@hidden>
- Date: Thu, 20 Jan 2005 13:16:18 -0800
Worksheet are inside of a workbook so to make a worksheet you would do the
following
tell application "Microsoft Excel"
activate
set new_WB to make new workbook
tell new_WB
make new worksheet at beginning
end tell
end tell
Enjoy!
Murf
-----Original Message-----
From: applescript-users-bounces+jimmur=email@hidden
[mailto:applescript-users-bounces+jimmur=email@hidden] On Behalf
Of email@hidden
Sent: Thursday, January 20, 2005 12:01 PM
To: email@hidden
Subject: Applescript-users Digest, Vol 2, Issue 40
Send Applescript-users mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://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: Text, Unicode Text, and String coercion ... (Brian Johnson)
2. Re: Internet Connect Script (Gnarlodious)
3. Re: Internet Connect Script (Andrew Oliver)
4. Re: weird path to me error (daniel)
5. Javascript for Acrobat 6 (Dustin Bell)
6. [ANN] Jan. Boston AppleScript Users Group Meeting
(Duane L. Mitchell)
7. make a new worksheet in Excel 2004 (Adam K. Wuellner)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Jan 2005 16:19:25 -0800 (PST)
From: Brian Johnson <email@hidden>
Subject: Re: Text, Unicode Text, and String coercion ...
To: Applescript Users List <email@hidden>
Message-ID:
<email@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Wed, 19 Jan 2005, Brian Johnson wrote:
> I'm confused, bewildered and befuddled by the behavior of one of my
scripts.
> It was born under OS-9 and used an FMPro database to store info. It
extracts
<snip>
I knew this had been hashed over a few times in the last couple of years,
explained by Chris Nebel, etc., but it took me a while to find it...
FWIW, Unicode converts to styled text under the "string" coercion, and
styled text sometimes doesn't work (as in this case).
However, Paul Skinner posted the following back in Dec 2002, and it works
just dandy in this case.
> set someText to "abc" as Unicode text-->unicode text string
>
> set {text:someText} to (text of someText) as text-->styled text string[*]
>
> someText-->plain text string
>
> [*]Note: Due to the unusual list assignment method; this line returns a
> syled text string. The value of plainText is plain text despite this
> result. If you had wanted styled text from unicode you could set
> plainText to the result.
- brian johnson
------------------------------
Message: 2
Date: Wed, 19 Jan 2005 19:14:40 -0700
From: Gnarlodious <email@hidden>
Subject: Re: Internet Connect Script
To: Applescript <email@hidden>
Message-ID: <BE146220.657E3%email@hidden>
Content-Type: text/plain; charset="us-ascii"
Entity Amir Bozorgzadeh spoke thus:
>
> connect using a configurationa lready set up in the machine.
>
>
>
> tell application "Finder"
> activate
> tell application "System Events"
> tell process "Finder"
> tell menu bar 1
> tell menu bar item "Apple"
> tell menu "Apple"
> tell menu item "Location"
> tell menu "Location"
> click menu item "Automatic" --location
name
> end tell
> end tell
> end tell
> end tell
> end tell
> end tell
> end tell
> end tell
>
>
> -- Gnarlie
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/2005011
9/b16aa5ae/attachment.html
------------------------------
Message: 3
Date: Wed, 19 Jan 2005 18:33:50 -0800
From: Andrew Oliver <email@hidden>
Subject: Re: Internet Connect Script
To: Gnarlodious <email@hidden>, Applescript
<email@hidden>, Amir Bozorgzadeh
<email@hidden>
Message-ID: <BE14588E.31855%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
On 1/19/05 6:14 PM, "Gnarlodious" <email@hidden> wrote:
> Entity Amir Bozorgzadeh spoke thus:
>>
>> connect using a configurationa lready set up in the machine.
>>
>>
>>
>> tell application "Finder"
>> activate
>> tell application "System Events"
>> tell process "Finder"
>> tell menu bar 1
>> tell menu bar item "Apple"
>> tell menu "Apple"
>> tell menu item "Location"
>> tell menu "Location"
click menu item "Automatic" --location name
...
<urgh><cough><cough><spluttler><spew>
Why not just:
tell application "Internet Connect"
connect PPP configuration "blah"
end tell
Or connect AirPort configuration "blah", or whatever kind of connection
you're trying to use.
Andrew
:)
------------------------------
Message: 4
Date: Wed, 19 Jan 2005 20:16:03 -0800
From: daniel <email@hidden>
Subject: Re: weird path to me error
To: Robert Poland <email@hidden>
Cc: AppleScript <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Robert - was your older script perhaps saved as a script bundle? In
that case I think your code as listed below *would* succeed, though it
would put the prefs file inside the script bundle's directly. Since
there's a colon at the end, appending a filename specifies a legal path
(though an odd choice of location).
Save a script as a bundle and notice that the "path to me" result
refers to the root-folder of the bundle. If the script is saved as a
non-bundled script, it will refer to just the file itself (no colon at
the end).
Daniel
On Jan 19, 2005, at 2:18 PM, Robert Poland wrote:
> When I run this snippet as part of an old script it works fine.
> But when run as a new script (saved in the correct folder) I get the
> indicated error.
>
> I find it odd that the file name and the script name are run together.
> Is that a clue? I have tried adding in a colon but that didn't help.
>
> The old script was created in January of 2004. Has something changed?
>
> set myPath to path to me
> set myPrefs to "AwakeTimes"
> read file ((myPath as string) & myPrefs)
> set myData to result
> myData
> --> "File iMac HD:Library:Scripts:Universal
> Scripts:TimeTestAwakeTimes wasn't found."
>
> Tia,
> --
> Bob Poland - Fort Collins, CO
> http://www.ibrb.org/
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> sweater.com
>
> This email sent to email@hidden
------------------------------
Message: 5
Date: Thu, 20 Jan 2005 03:17:46 -0700
From: "Dustin Bell" <email@hidden>
Subject: Javascript for Acrobat 6
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; format=flowed
Can any one here help me make a Javascript. I would like Acrobat 6 to open a
pdf and copy the text that's on the pdf. I am still learning Applescript so
I know squat on Javascript. Any help would be appreciated.
Thanks
-Dustin
------------------------------
Message: 6
Date: Thu, 20 Jan 2005 13:16:21 -0500
From: "Duane L. Mitchell" <email@hidden>
Subject: [ANN] Jan. Boston AppleScript Users Group Meeting
To: AppleScript Users <email@hidden>
Message-ID: <BE155FA5.5E55D%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
BOSTON APPLESCRIPT USER GROUP "BAUG" MEETING
The Boston AppleScript User Group will be meeting on Tuesday,
January 25 at MIT Building E51, Room 372 located at the corner of
Wadsworth and Amherst Streets one block off Memorial Drive.
Our meeting next Tuesday will feature two great tools for graphics files
and image processing- GraphicConverter and Adobe Photoshop. GraphicConverter
is a great image processing utility that supports AppleScript. It also
supports more file types than most any other application, except maybe
DeBabelizer, and is a great tool for processing your digital camera images.
It's AppleScript dictionary is somewhat different than most
applications and involves just a little bit of learning to "get it". We
will be demonstrating script GraphicConverter.
The second portion of our meeting will be devoted to a demonstration of
AppleScripting Adobe Photoshop.
Beginners are encouraged to attend this meeting and bring your questions.
Agenda
--------
6:00pm- Q&A/Open topic discussion
6:30pm- Introductions and member discussion
- GraphicConverter
- Adobe Photoshop 8.0 (CS)
8:30pm- Meeting concludes promptly
Who Should Attend
-----------------
- Graphic arts industry professionals
- Macintosh users
- System and network administrators
- Web developers and internet solutions providers
Date and Location*
-------------------
Tuesday, January 25 at 6:00pm
MIT
Building E51, Room 372
http://whereis.mit.edu/map-jpg?selection=E51&Buildings=go
Enter building at the corner of Wadsworth and Amherst Streets. Go directly
to the elevators behind the stair case in front of you. Do not go up the
stairs. Take the elevator to the 3rd Floor. Take right out of the elevator,
go past the classrooms on your left, go past stairs on right, and take the
first right corridor. Room 372 will be on your right. See parking suggestion
below.
Public Transportation and Parking
-----------------------
MBTA:
Red Line to Kendall Square Station
Parking-MIT parking lots nearby. There is a convenient parking lot one
block away on Hayward Street. See link to map above.
If you have any additional comments or questions, please
contact Duane Mitchell at <email@hidden>.
Please let us know if you require any special
accommodations in order to attend.
*Dates, times, locations, speakers, and content may
change without notice.
Apple, the Apple Logo, AppleScript, and Macintosh are trademarks
of Apple Computer, Inc., registered in the U.S. and other countries.
Power Mac is a trademark of Apple Computer, Inc.
Other product and company names mentioned herein may be
trademarks of their respective companies. Any
understandings, agreements, or warranties take place
directly between the applicable vendor and the user.
------------------------------
Message: 7
Date: Thu, 20 Jan 2005 12:41:38 -0600
From: "Adam K. Wuellner" <email@hidden>
Subject: make a new worksheet in Excel 2004
To: Users AppleScript <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
The code below gives me "Microsoft Excel got an error: Can't make a
worksheet."
tell application "Microsoft Excel"
activate
set new_ws to make new worksheet
activate new_ws
end tell
How do I make a worksheet in Excel 2004?
The error code is -2710, omitted from this reference:
<http://developer.apple.com/documentation/AppleScript/Conceptual/
AppleScriptLangGuide/AppleScript.10d.html>
Thanks,
Adam
------------------------------
_______________________________________________
Applescript-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users
End of Applescript-users Digest, Vol 2, Issue 40
************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden