Re: Has AppleScript changed?
Re: Has AppleScript changed?
- Subject: Re: Has AppleScript changed?
- From: Yvan KOENIG via AppleScript-Users <email@hidden>
- Date: Sun, 19 Apr 2020 20:57:01 +0200
> Le 19 avr. 2020 à 20:33, Robert Poland via AppleScript-Users
> <email@hidden> a écrit :
>
> I haven’t been using Applescript for a while…
>
> I have this simple script that no longer works.
>
> tell application "System Events"
> set theWindowList to windows of process "Finder"
> display dialog theWindowList
> end tell
>
> Can’t make window "scans" of «class pcap» "Finder" of application "System
> Events" into type Unicode text.
>
> What am I missing?
No change here.
You missed the fact that display dialog is supposed to treat a string, not a
list.
tell application "System Events"
-- build a list of NAMES of windows, con't list the windows themselves
set theWindowList to name of windows of process "Finder"
display dialog my recolle(theWindowList, ", ")
end tell
#=====
on recolle(l, d)
local oTIDs, t
set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text
item delimiters, d}
set t to l as text
set AppleScript's text item delimiters to oTIDs
return t
end recolle
#=====
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche
19 avril 2020 20:55:51
_______________________________________________
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