How to get the CPU-usage of an specific process
How to get the CPU-usage of an specific process
- Subject: How to get the CPU-usage of an specific process
- From: Michael Slomski <email@hidden>
- Date: Tue, 08 Mar 2005 21:52:59 +0100
Title: How to get the CPU-usage of an specific process
Hello together,
Does anyone has an idea how to halt an applescript until the CPU-Usage of an specific process is ‘comming down’?
Background:
I’m trying to script Freehand 10. I have to copy large amount of data between to files.After the Copy command it could be, that FH will have to work 15 or mor minutes until I can switch to the next document and then do the paste.
This is the current script which is working for ‘small data’ But if I’m copying more date (so that FH will need more time), it seemd, that that the commands for switching documents and pasting are lost.
tell application "System Events"
tell process "FreeHand 10"
tell menu bar 1
click menu item "Kopieren" of menu "Bearbeiten"
-- here the script should wait until Freehand has processed the copy
click menu item myMenuChoice of menu "Fenster"-- myMenuChoice contains the name of the destination document
click menu item "Einsetzen" of menu "Bearbeiten"
end tell
end tell
end tell
I have the idea of an loop, that will check, how much CPU-usage FH takes and if it becomes less than 20% I can go on with my script.
Best regards
Michael Slomski
_______________________________________________
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