• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: retrieving process name from a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retrieving process name from a record


  • Subject: Re: retrieving process name from a record
  • From: John Delacour <email@hidden>
  • Date: Sun, 11 May 2003 13:40:03 +0100
  • Mac-eudora-version: 6.0b18

At 11:47 am +0200 11/5/03, peter wrote:

I'm trying to extract the name of a process from a record using System
Events and then activating that process
the record structure looks like this:
set this_record to ,
{process:theProcess, bounds:window_bounds ,
, position:window_position} as record
set the end of the the application_records to this_record

This is meaningless. It's all back to front. Your key must come before the colon and the value after.

tell application "System Events"
set reco to {_name:"", _creator:""}
set _sampleprocess to last item of (processes whose visible is true)
tell _sampleprocess
set _name of reco to its name
set _creator of reco to its creator type
end tell
end tell
reco


As to 'bounds', 'position' etc, these are not properties of a process, nor yet of an application, so you can't get whatever you intend here through System Events.

properties of _sampleprocess will give you a list of what _is_ available.

my first time working with records
any suggestions much appreciated

What exactly are you trying to do?

JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >retrieving process name from a record (From: peter <email@hidden>)

  • Prev by Date: Re: A simple deletion script
  • Next by Date: Re: list of installed fonts on OS X?
  • Previous by thread: Re: retrieving process name from a record
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread