Re: Not enough Memory errors
Re: Not enough Memory errors
- Subject: Re: Not enough Memory errors
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 07 Aug 2002 22:52:53 -0400
- Organization: [very little]
>
Date: Thu, 8 Aug 2002 10:25:18 +1000
>
To: email@hidden
>
From: Malcolm Fitzgerald <email@hidden>
>
Subject: Not enough Memory errors
>
>
I don't often save scripts as applications, now I have. It's a small
>
finder script that hides all processes.
>
>
It runs perfectly until the end when the app quits and throws an
>
error -108 saying "Could not save changes to "Hide All Apps" because
>
there is not enough memory". There aren't any explicit changes to
>
save (the script appears below), what is it trying to do at the point
>
that the error is thrown up?
>
>
------
>
tell application "Finder"
>
set _apps to every process
>
repeat with i in _apps
>
try -- because a few things, like control strip won't obey
>
set visible of i to false
>
end try
>
end repeat
>
end tell
I find that this works:
tell application "Finder" to set the visible of (every process whose
visible it true) to false
As for your out of memory error, try putting your code into a handler
and calling it from a one-line run handler. All variables used in a
main-line routine (a run handler) get saved in the script. I think the
script has to duplicate them somewhere in memory to do that and can run
out of memory when it tries.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[8/7/02 10:52:33 PM]
_______________________________________________
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.