Shari, You're right... you can't get the script of a stack or even check the custom properties of a closed stack without opening it. Best approach is to lock messages, open the stack invisibly, get the script, close it (making sure its destroystack and destroywindow are true), and then run the rest of your script.
Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ----- Original Message ----- From: "Shari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 12, 2002 9:03 AM Subject: Re: Save stack as... > >What happens if you: > > set the destroyStack of stack origStack to true > > close stack origStack > > wait for messages -- to assure that the mem-resident copy was destroyed > > delete file origStack > > save stack newerStack as origStack > > delete file newerStack > > > >?? > > > >Phil > > I think I found the difficulty, or at least part of it. The full > objective is to replace older versions of a stack, with newer > versions. I put version numbers on the scripts. > > # see which stack is newer version, replace if necessary, delete oldest version > > exit to top # testing where the error occurs > > put word 3 of line 1 of the script of stack streetStack into > origStack # version number > put word 3 of line 1 of the script of stack newGold into > installStack # version number > > THE ERROR INITIALLY OCCURS HERE > I get a purge memory, and it opens the stacks. Apparently it cannot > retrieve the script of a stack, without opening the stack? > > exit to top # testing where the error occurs > > if installStack > origStack then > # replace file goldstreet > > delete file streetStack > save stack newGold as streetStack > delete file newGold > > # set the destroyStack of stack streetStack to true > # close stack streetStack > # wait for messages # to assure that the mem-resident copy was destroyed > # delete file streetStack > # save stack newGold as streetStack > # delete file newGold > > else > # delete new goldstreet > delete file newGold > end if > -- > --Shareware Games for the Mac-- > http://www.gypsyware.com > _______________________________________________ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard > _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
