Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > MacOS 9 AppleScript BUG?

MacOS 9 AppleScript BUG?
Thread Tools
wlonh
Professional Poster
Join Date: Mar 1999
Status: Offline
Reply With Quote
Nov 15, 1999, 02:39 AM
 
from [email protected]

"I have an applescript that runs at startup. It sets the position of all my HD icons to line up across the top in stead of along the side."

"It worked fine until I installed MacOS 9, and now I get this error: 'Finder got an error: This window is the wrong kind (e.g. pop-up vs. normal) to use this command' It's easy to reproduce. This simple script, recorded in the Script Editor, triggers the error."

tell application "Finder"
activate
select startup disk
set position of selection to {853, 82}
end tell

Any ideas readers?
mailto:[email protected]
     
Paul Crawford
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Nov 15, 1999, 11:11 AM
 
Jeremy, I just tried saving your example script as a 'classic applet' via Script Editor 1.4.1. The applet ran fine under Mac OS 9 on a beige Power Mac G3/266/128MB.

Does your stand-alone applet work when it's run normally (i.e., not as a Startup Item)? If so, there might be some kind of strange timing issue for Startup Items, where the Finder is concerned.

Otherwise, double-check that your desktop isn't somehow being accidentally set to one of the "Keep arranged by" View Options; they would also cause that (misleading) "wrong window kind" error message.

Good luck.


[This message has been edited by Paul Crawford (edited 11-15-1999).]
     
wlonh  (op)
Professional Poster
Join Date: Mar 1999
Status: Offline
Reply With Quote
Nov 15, 1999, 11:16 AM
 
though I did not make it as clear as glass, I posted the AppleScript problem on behalf of Jeremy and included his email so that after you respond in the forum here, you can email him your remarks... if you would be so kind.

thanks!
     
kwiersma
Fresh-Faced Recruit
Join Date: Jan 1999
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Nov 15, 1999, 12:16 PM
 
I am having the same problem with my script as well and mine is not run from the startup items folder. No matter how I save the script (complided, run-only, ect.) I seem to get the same error message.

My script run with no problems under OS 8.6. I do have windows that are tabs at the bottom of the screen but removing those still didn't help.

Anyone have any ideas?

--KW
     
Herman
Guest
Status:
Reply With Quote
Nov 15, 1999, 04:31 PM
 
Sure, I had the same problem when I started learning AppleScript recently. I figured out that this bug has to do with the "View Options" of the Finder. Take off the "Always snap to grid" option and - presto! - it works (for me at least.

Hope that helps, Herman
     
RGS
Guest
Status:
Reply With Quote
Nov 25, 1999, 01:50 PM
 
Try the following script with OS9:

tell application "Finder"
activate
set savedArragement to spatial view arrangement of desktop
set spatial view arrangement of desktop to not arranged
select startup disk
set position of selection to {853, 82}
set spatial view arrangement of desktop to savedArragement
end tell
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:13 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,