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: user/password in the script (Jan-Bultereys)
2. Re: user/password in the script (Christopher Nebel)
3. Reading a file through it's alias (Ferenc Farkas M?TY?S)
4. Missing dot in the close button (Ferenc Farkas M?TY?S)
5. Re: Reading a file through it's alias (kai)
6. Re: Missing dot in the close button (kai)
7. Re: Reading Middle Eastern Characters (Ferenc Farkas M?TY?S)
8. Re: Reading Middle Eastern Characters (Christopher Nebel)
9. RE: Style spec creation/modification in Xpress (Kumar Shailove)
10. iTunes: changing song name (Bob Stern)
11. Re: iTunes: changing song name (Matthew Smith)
12. Re: Reading Middle Eastern Characters (Elliotte Harold)
13. Re: iTunes: changing song name (Bob Stern)
14. How to kill a process using AS (Kumar Shailove)
15. RE: How to kill a process using AS (Jan-Bultereys)
16. Smile and FruitMenu (Robert Poland)
17. [OT] Re: Smile and FruitMenu (Andrew Oliver)
18. Re: [OT] Re: Smile and FruitMenu (John C. Welch)
19. Re: Reading Middle Eastern Characters (Christopher Nebel)
----------------------------------------------------------------------
Message: 1
Date: Mon, 6 Dec 2004 21:42:20 +0100
From: "Jan-Bultereys" <email@hidden>
Subject: RE: user/password in the script
To: "Jeff Powell" <email@hidden>
Cc: email@hidden
Message-ID:
<email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
yes it does, jeff .... thanks I was sleeping I guess :)
The reason why I thought this didn't work was....when I
compiled the script it was asking to add user and password.... but
when I ran the script....it ran without asking for user and
password....
anyway thanks very much for your input,
best regards,jan
----------
From: Jeff Powell
Sent: Monday, December 6, 2004 20:47 PM
To: Jan-Bultereys
Subject: Re: user/password in the script
Jan,
Yes - I understood that. I lifted the sample code right out of my
own working examples but the premise should work for your needs with
eppc as well.
See this: http://bbs.applescript.net/viewtopic.php?t=8633
Tell application "Finder" of machine
"eppc://user:email@hidden"
.....
The syntax of <connection type>://<user name>:<password>@<address>
seems to work regardless of what the transport protocol is, AFP, SMB,
EPPC, etc.
Let me know if it works for you.
Good luck
Jeff
On Dec 6, 2004, at 12:39 PM, Jan-Bultereys wrote:
thanks jeff,
I am using this syntax for mounting an SMB connection as well,
but this is not my question...
what I need to know is the syntax for an eppc connection with user
and password....
anyway thanks for your comments,
best regards,jan
----------
From: Jeff Powell
Sent: Monday, December 6, 2004 18:53 PM
To: Jan-Bultereys
Subject: Re: user/password in the script
Jan,
I do something similar in a script that I used every day -- your
syntax might be different but hopefully this will help. I use it to
mount a remote share on a windows server.
-- mount HOMEDIR
if not (exists "HOMEDIR") then
mount volume
"smb://userNameHere:email@hiddenrName(or ip
address).com/sharename"
end if
You can also use variables to hold the username & password info so
it can be a more portable script.
Good luck!
Jeff
On Dec 6, 2004, at 9:38 AM, Jan-Bultereys wrote:
Does anyone know how to launch an applescript on a remote machine
where user/password
is in the script....
tell application "Finder" of machine "eppc://mac.local" to open
":path_of_remote_machine:test"
meaning can I add username and password somewhere in this line?
thanks for any input.
jan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
__ __ __ ___ _ _
\ \ ___ / _|/ _| / _ \_____ _____| | |
\ \/ _ \ |_| |_ / /_)/ _ \ \ /\ / / _ \ | |
/\_/ / __/ _| _| / ___/ (_) \ V V / __/ | |
\___/ \___|_| |_| \/ \___/ \_/\_/ \___|_|_|
------------------------------
Message: 2
Date: Mon, 6 Dec 2004 13:15:55 -0800
From: Christopher Nebel <email@hidden>
Subject: Re: user/password in the script
To: Jan-Bultereys <email@hidden>, AppleScript Users
<email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Same syntax -- it's part of the URL specification, and should work for
any type of authenticated URL.
--Chris Nebel
AppleScript Engineering
On Dec 6, 2004, at 11:39 AM, Jan-Bultereys wrote:
thanks jeff,
I am using this syntax for mounting an SMB connection as well,
but this is not my question...
what I need to know is the syntax for an eppc connection with user and
password....
anyway thanks for your comments,
best regards,jan
----------
From: Jeff Powell
Sent: Monday, December 6, 2004 18:53 PM
To: Jan-Bultereys
Subject: Re: user/password in the script
Jan,
I do something similar in a script that I used every day -- your
syntax might be different but hopefully this will help. I use it to
mount a remote share on a windows server.
-- mount HOMEDIR
if not (exists "HOMEDIR") then
mount volume "smb://userNameHere:email@hiddenrName(or
ip address).com/sharename"
end if
You can also use variables to hold the username & password info so it
can be a more portable script.
Good luck!
Jeff
On Dec 6, 2004, at 9:38 AM, Jan-Bultereys wrote:
Does anyone know how to launch an applescript on a remote machine
where user/password
is in the script....
tell application "Finder" of machine "eppc://mac.local" to open
":path_of_remote_machine:test"
meaning can I add username and password somewhere in this line?
thanks for any input.
jan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
40jlpowell.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
------------------------------
Message: 3
Date: Tue, 7 Dec 2004 04:26:20 +0100
From: Ferenc Farkas M?TY?S <email@hidden>
Subject: Reading a file through it's alias
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi List,
Has anyone good experiences regarding reading files through a command+L
alias reference? The cat does not work well, only if I read the
original file, not the alias.
open for access file "System:Users:ffmatyas:projects:server tech:server
tech log.txt" with write permission
--> 183
get eof 183
--> 25.0
read 183 from 1 to 25.0 as «class utf8»
--> "
2004/12/06 15:24:48 log
"
close access 183
The file spec is ok, although the eof is bad, and so is the readed
data. The script finished the open for access close access sentences,
but TextEdit still complains that it can not open the alias file in the
Finder with double-click. And the issue is he same, when an alias is a
directory. I use the latest 10.3.6.
Thanks in advance!
--
Regards,
Ferenc Farkas MÁTYÁS
------------------------------
Message: 4
Date: Tue, 7 Dec 2004 04:54:53 +0100
From: Ferenc Farkas M?TY?S <email@hidden>
Subject: Missing dot in the close button
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi List,
Is it a bug or a feature, if I ran this:
tell application "TextEdit"
set mydoc to make new document at front
tell mydoc to set text 1 to text 1 & "important data"
activate
end tell
There isn't a modified doc dot in the close button, so when I tap
command+w the window disappears with my important data.
--
Regards,
Ferenc Farkas MÁTYÁS
------------------------------
Message: 5
Date: Tue, 7 Dec 2004 05:22:46 +0000
From: kai <email@hidden>
Subject: Re: Reading a file through it's alias
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On Tue, 7 Dec 2004 04:26:20 +0100, Ferenc Farkas MÁTYÁS wrote:
Has anyone good experiences regarding reading files through a
command+L alias reference? The cat does not work well, only if I read
the original file, not the alias.
open for access file "System:Users:ffmatyas:projects:server
tech:server tech log.txt" with write permission
--> 183
get eof 183
--> 25.0
read 183 from 1 to 25.0 as «class utf8»
--> "
2004/12/06 15:24:48 log
"
close access 183
If a path points to an alias file, then could get its original item
something like this:
----------------------
set f to "Macintosh HD:path:to:some:alias file"
tell application "Finder" to set f to file f's original item as alias
set o to open for access f with write permission
set t to read o as «class utf8»
close access o
----------------------
The file spec is ok, although the eof is bad, and so is the readed
data. The script finished the open for access close access sentences,
but TextEdit still complains that it can not open the alias file in
the Finder with double-click. And the issue is he same, when an alias
is a directory. I use the latest 10.3.6.
The eof for an alias file is 0.0, which is why pointing to the original
item is necessary. Once that's done (as shown above), you should also
be able to say:
----------------------
tell application "TextEdit" to open f
----------------------
---
kai
------------------------------
Message: 6
Date: Tue, 7 Dec 2004 05:22:57 +0000
From: kai <email@hidden>
Subject: Re: Missing dot in the close button
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On Tue, 7 Dec 2004 04:54:53 +0100, Ferenc Farkas MÁTYÁS wrote:
Is it a bug or a feature, if I ran this:
tell application "TextEdit"
set mydoc to make new document at front
tell mydoc to set text 1 to text 1 & "important data"
activate
end tell
There isn't a modified doc dot in the close button, so when I tap
command+w the window disappears with my important data.
Try something like:
---------------------------
tell application "TextEdit"
set mydoc to make new document at end with properties {text:"important
data"}
set mydoc's modified to true
activate
end tell
---------------------------
While this may still not produce a modified dot in the document's close
button, it should prevent the window from being closed without first
prompting a save.
---
kai
------------------------------
Message: 7
Date: Tue, 7 Dec 2004 07:30:15 +0100
From: Ferenc Farkas M?TY?S <email@hidden>
Subject: Re: Reading Middle Eastern Characters
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
and European users), not UTF-8. If you say "read ... as <<class
utf8>>", you'll get the right result, but see the next bit. (The <<
and >> are chevrons, which won't go through the mailing list
correctly. Ritual cursing of the list here.)
How can one determine if the text is in utf or macroman or in another
encoding? The reason I am asking this is if the text is utf8, it reads
it well, but if it's not, I get en empty output from read. I can test
it, if it's empty or not, but it's an ugly workaround I think.
--
Regards,
Ferenc Farkas MÁTYÁS
------------------------------
Message: 8
Date: Mon, 6 Dec 2004 23:11:29 -0800
From: Christopher Nebel <email@hidden>
Subject: Re: Reading Middle Eastern Characters
To: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On Dec 6, 2004, at 10:30 PM, Ferenc Farkas MÁTYÁS wrote:
and European users), not UTF-8. If you say "read ... as <<class
utf8>>", you'll get the right result, but see the next bit. (The <<
and >> are chevrons, which won't go through the mailing list
correctly. Ritual cursing of the list here.)
How can one determine if the text is in utf or macroman or in another
encoding? The reason I am asking this is if the text is utf8, it reads
it well, but if it's not, I get en empty output from read. I can test
it, if it's empty or not, but it's an ugly workaround I think.
Believe it or not, that's about the best you can do, and is actually
what's recommended in many cases. Because of how UTF-8 is structured,
it's unlikely you'll have data that looks like UTF-8 but isn't, so the
usual technique is to try to interpret the data as UTF-8 first; if that
fails, then fall back to some other encoding, usually the
system-primary one. Doing this by reading the file twice isn't
particularly efficient, but given AppleScript's facilities for this
sort of thing, you're a bit stuck for it.
Correctly determining which of the dozens of conceivable text encodings
a given hunk of data uses is essentially an AI-complete problem -- that
is, you need human-level intelligence, and even most humans would have
a hard time with some of the fringe cases.
If you're in a position to dictate the encodings you'll handle, then by
all means do so. Many folks will automatically handle UTF-16, since a
UTF-16 data file will always start with 0xfeff (or 0xfffe for
byte-swapped UTF-16), and punt on everything else.
--Chris Nebel
AppleScript Engineering
------------------------------
Message: 9
Date: Tue, 7 Dec 2004 13:19:03 +0530
From: Kumar Shailove <email@hidden>
Subject: RE: Style spec creation/modification in Xpress
To: nino <email@hidden>, email@hidden
Message-ID:
<email@hidden>
Content-Type: text/plain
It works fine at my end.
Please be sure that before running this script u have a style spec "A"
existing in document 1.
-----Original Message-----
From: applescript-users-bounces+kshailove=email@hidden
[mailto:applescript-users-
bounces+kshailove=email@hidden] On
Behalf Of nino
Sent: Friday, December 03, 2004 10:10 PM
To: email@hidden
Subject: Style spec creation/modification in Xpress
Hi,
I need to duplicate a chain of style specs in Quark assigning new
names e
changing a few properties of the initial style.
make new style spec at end with properties {name:"A1", base
style:style spec
"A"}
creates the new style but A1 inherits properties from "Normal" style
instead
of style A.
make new style spec at end with properties {name:"A1"}
set base style of stile spec "A1" to style spec "A"
doesn't help heater.
There is any other possibility then copying each property from style A
to
the new style A1 considering precedence between properties i.e.
paragraph
left indent should be set before setting rules left indent?
nino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
kshailove@quark.c
o.in
This email sent to email@hidden
------------------------------
Message: 10
Date: Tue, 7 Dec 2004 01:15:23 -0800
From: Bob Stern <email@hidden>
Subject: iTunes: changing song name
To: email@hidden
Message-ID: <p06200713bddb21e3236a@[192.168.0.3]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
I cannot figure out how to change the name, artist, etc of a track
(song) in iTunes that is selected (highlighted) but is not currently
playing. Consequently, I've resorted to the following script that
briefly plays each selected track to make it the current track before
changing its name. Is there a way to change the track name without
playing the track? Thanks!
tell application "iTunes"
set myList to selection of window 1
repeat with myTrack in myList
play myTrack
stop
set name of current track to "foo"
end repeat
end tell
--
Bob Stern
------------------------------
Message: 11
Date: Tue, 07 Dec 2004 20:38:02 +1100
From: Matthew Smith <email@hidden>
Subject: Re: iTunes: changing song name
To: AppleScript Users <email@hidden>
Message-ID: <BDDBC52A.8FFF%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
on 07/12/2004 20:15, Bob Stern at email@hidden wrote:
I cannot figure out how to change the name, artist, etc of a track
(song) in iTunes that is selected (highlighted) but is not currently
playing. Consequently, I've resorted to the following script that
briefly plays each selected track to make it the current track before
changing its name. Is there a way to change the track name without
playing the track? Thanks!
tell application "iTunes"
set myList to selection of window 1
repeat with myTrack in myList
play myTrack
stop
set name of current track to "foo"
end repeat
end tell
What's wrong with:
tell application "iTunes"
set myList to selection of window 1
repeat with myTrack in myList
set name of myTrack to "foo"
end repeat
end tell
You already had the track in myTrack.
--
Matthew Smith
------------------------------
Message: 12
Date: Tue, 07 Dec 2004 04:46:55 -0500
From: Elliotte Harold <email@hidden>
Subject: Re: Reading Middle Eastern Characters
To: Christopher Nebel <email@hidden>
Cc: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii; format=flowed
Christopher Nebel wrote:
Correctly determining which of the dozens of conceivable text
encodings
a given hunk of data uses is essentially an AI-complete problem --
that
is, you need human-level intelligence, and even most humans would
have a
hard time with some of the fringe cases.
Oh, I don't think it's nearly that hard. Simply spell check the source
text against a variety of dictionaries in a variety of encodings and
languages until you find one that matches. Cryptographers have been
doing this for decades without solving the AI problem. They have all
sorts of algorithms for determining whether a brute force description
of
a message with a particular key actually represents the clear text or
random gibberish.
--
Elliotte Rusty Harold email@hidden
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
------------------------------
Message: 13
Date: Tue, 7 Dec 2004 01:59:58 -0800
From: Bob Stern <email@hidden>
Subject: Re: iTunes: changing song name
To: email@hidden
Message-ID: <p06200714bddb2ed52c0c@[192.168.0.3]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Matthew Smith wrote:
What's wrong with: set name of myTrack to "foo"
Thanks -- that works! I thought I had tried that before, but I must
have done something wrong. Sorry for the dumb question!
--
Bob Stern
------------------------------
Message: 14
Date: Tue, 7 Dec 2004 19:08:15 +0530
From: Kumar Shailove <email@hidden>
Subject: How to kill a process using AS
To: email@hidden
Message-ID:
<email@hidden>
Content-Type: text/plain
Hi list,
How to kill a process using AppleScript.
What I know is the name of the process.
Thanks in advance.
------------------------------
Message: 15
Date: Tue, 7 Dec 2004 15:01:42 +0100
From: "Jan-Bultereys" <email@hidden>
Subject: RE: How to kill a process using AS
To: <email@hidden>, "Kumar Shailove"
<email@hidden>
Message-ID:
<email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
hi kumar,
example to kill Terminal
do shell script "killall Terminal"
enjoy killing... :)
best regards,jan
----------
From:
applescript-users-
bounces+jan.bultereys=email@hidden on behalf of
Kumar Shailove
Sent: Tuesday, December 7, 2004 14:38 PM
To: email@hidden
Subject: How to kill a process using AS
Hi list,
How to kill a process using AppleScript.
What I know is the name of the process.
Thanks in advance.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
------------------------------
Message: 16
Date: Tue, 7 Dec 2004 10:28:06 -0700
From: Robert Poland <email@hidden>
Subject: Smile and FruitMenu
To: AppleScript <email@hidden>
Cc: email@hidden
Message-ID: <a06200700bddb970dd770@[192.168.0.3]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
OS 10.3.6
Since Smile and FruitMenu don't work together how do others navigate?
I have used FruitMenu since it came out and find it difficult to get
around without it.
Not sure which I should drop FruitMenu or Smile.
Tia,
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
------------------------------
Message: 17
Date: Tue, 07 Dec 2004 09:36:15 -0800
From: Andrew Oliver <email@hidden>
Subject: [OT] Re: Smile and FruitMenu
To: Robert Poland <email@hidden>, AppleScript
<email@hidden>
Cc: email@hidden
Message-ID: <BDDB2A0F.2E71A%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
On 12/7/04 9:28 AM, "Robert Poland" <email@hidden> wrote:
OS 10.3.6
Since Smile and FruitMenu don't work together how do others navigate?
...
Not sure which I should drop FruitMenu or Smile.
Oooh, the challenge!
I can feel Emmanuel's blood pressure rising from here! :)
Anyone want to place bets on how long it'll take him to fix that one?
:)
Andrew
:)
------------------------------
Message: 18
Date: Tue, 07 Dec 2004 11:55:04 -0600
From: "John C. Welch" <email@hidden>
Subject: Re: [OT] Re: Smile and FruitMenu
To: "AppleScript User's List" <email@hidden>
Message-ID: <BDDB4A98.18CD3FF%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
On 12/07/2004 11:36, "Andrew Oliver" <email@hidden> wrote:
OS 10.3.6
Since Smile and FruitMenu don't work together how do others navigate?
...
Not sure which I should drop FruitMenu or Smile.
Oooh, the challenge!
I can feel Emmanuel's blood pressure rising from here! :)
Anyone want to place bets on how long it'll take him to fix that one?
:)
Fruitmenu, not Smile is the OS hack, so Unsanity needs to fix their
hack to
work with Emmanuel's app, not the other way around
--
Know and use all the capabilities in your airplane. If you don't,
sooner or
later, some guy who does use them all will kick your ass.
-- Dave 'Preacher' Pace
------------------------------
Message: 19
Date: Tue, 7 Dec 2004 10:50:01 -0800
From: Christopher Nebel <email@hidden>
Subject: Re: Reading Middle Eastern Characters
To: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Dec 7, 2004, at 1:46 AM, Elliotte Harold wrote:
Christopher Nebel wrote:
Correctly determining which of the dozens of conceivable text
encodings a given hunk of data uses is essentially an AI-complete
problem -- that is, you need human-level intelligence, and even most
humans would have a hard time with some of the fringe cases.
Oh, I don't think it's nearly that hard. Simply spell check the source
text against a variety of dictionaries in a variety of encodings and
languages until you find one that matches. Cryptographers have been
doing this for decades without solving the AI problem. They have all
sorts of algorithms for determining whether a brute force description
of a message with a particular key actually represents the clear text
or random gibberish.
True, I overstated the problem -- the practical point is that for most
projects, it's more trouble than it's worth. However, I'd point out
that (as any good cryptanalyst can tell you) getting decent results
presumes having a sufficiently large sample of ciphertext to chew on.
Very small samples, such as filenames or volume names, can be
problematic.
--Chris Nebel
AppleScript Engineering
------------------------------
_______________________________________________
Applescript-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users
End of Applescript-users Digest, Vol 1, Issue 239
*************************************************