Re: saving all open stacks in standalone

2008-04-13 Thread Mark Swindell


On Apr 11, 2008, at 11:38 PM, Jan Schenkel wrote:

--- Mark Swindell <[EMAIL PROTECTED]> wrote:

I want to save all the stacks that are open in a
standalone.  These
are separate stack files, not substacks.  What
syntax needs to be
changed to make the following work?

 if theKey is "Q" then
put the stacks into saveUsAll
repeat with x = 1 to the number of lines of
saveUsAll
save stack (line x of saveUsAll)
end repeat
quit
end if


Thanks,
Mark



Hi Mark,

Assuming that all the stacks you want to save have
some custom property set:

##
put the openStacks into tOpenStacks
repeat for each line tOpenStack in tOpenStacks
 if the uSaveMePlease of stack tOpenStack then
   save stack tOpenStack
 end if
end repeat
##


Thanks Jan,

Question:   Why would it matter if the stacks had custom property sets?

The openStacks was the function I needed... I'd tried to ask for a  
list of  "the open stacks" and had been turned away... I don't know  
why I didn't find it when I looked.  (One reason is that there is no  
reference to the openStacks function when you look at the Dictionary  
results for the Stacks function... see below)


Funny thing, both our scripts seem to work if I make the "Command-Q" a  
"Command-L," for example.I moved the script into a shutDownRequest  
handler and it seems to be working.


Thanks for your help.

Mark


_

Quick Search Results


Results From: Dictionary

stacks function the stacks ...

stackSpace function the stackSpace ...

stacksInUse property get the stacksInUse



For more information try one of the following options

 For a deeper Search try the Revolution Search Engine
 For other information on this topic try the User Guide

stacks

Type: function

Syntax: the stacks stacks()

See Also: defaultStack property, name property, openStacks function,  
reloadStack message, revLoadedStacks function, topStack function,  
visible property


Introduced: 1.0

Changed: 1.0

Platform Support:
Summary:
Returns a list of stack files that contain an open stack.

Examples:
the stacks


Use the stacks function to find out which stack files are open.

Value:
The stacks function returns a list of file paths of open stacks, one  
per line.


Comments:
Since unsaved stacks have no file name, the file names of unsaved  
stacks are not included in the list. Instead, each unsaved stack is  
represented by a blank line in the list.


The file paths of substacks are included, but the stack names  
themselves are not. This means that if more than one stack in a file  
is open, that file's path appears more than once in the list returned  
by the stacks function.


The list includes any open Revolution windows (such as the message box  
and menu bar). It also includes stacks that have been opened during  
the current session and then closed, unless the stack's destroyStack  
property is set to true.






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: saving all open stacks in standalone

2008-04-13 Thread Richard Gaskin

Mark Swindell wrote:
Thanks, I had actually seen, read, and saved Sarah's piece,  but it  
hadn't answered the question of what was wrong with the script I was  
proposing.  I had wrestled with trying to make it work for quite some  
time without luck.


Sorry about that.  My eyes got stuck on the "in standalone" phrase, and 
didn't pick up the "separate stack files" part until after Jan's post.


I suspect Jan's suggested covered what you need, yes?

--
 Richard Gaskin
 Managing Editor, revJournal
 ___
 Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: saving all open stacks in standalone

2008-04-13 Thread Mark Swindell

Richard,

Thanks, I had actually seen, read, and saved Sarah's piece,  but it  
hadn't answered the question of what was wrong with the script I was  
proposing.  I had wrestled with trying to make it work for quite some  
time without luck.



Mark

On Apr 11, 2008, at 11:36 PM, Richard Gaskin wrote:

Mark Swindell wrote:

I want to save all the stacks that are open in a standalone.


Saving data in Revolution standalones
by Sarah Reichelt





___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: saving all open stacks in standalone

2008-04-11 Thread Jan Schenkel
--- Mark Swindell <[EMAIL PROTECTED]> wrote:
> I want to save all the stacks that are open in a
> standalone.  These  
> are separate stack files, not substacks.  What
> syntax needs to be  
> changed to make the following work?
> 
>   if theKey is "Q" then
>  put the stacks into saveUsAll
>  repeat with x = 1 to the number of lines of
> saveUsAll
>  save stack (line x of saveUsAll)
>  end repeat
>  quit
>  end if
> 
> 
> Thanks,
> Mark
> 

Hi Mark,

Assuming that all the stacks you want to save have
some custom property set:
##
put the openStacks into tOpenStacks
repeat for each line tOpenStack in tOpenStacks
  if the uSaveMePlease of stack tOpenStack then
save stack tOpenStack
  end if
end repeat
##

Hope this helped,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution


=
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: saving all open stacks in standalone

2008-04-11 Thread Richard Gaskin

Mark Swindell wrote:

I want to save all the stacks that are open in a standalone.


Saving data in Revolution standalones
by Sarah Reichelt




--
 Richard Gaskin
 Managing Editor, revJournal
 ___
 Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


saving all open stacks in standalone

2008-04-11 Thread Mark Swindell
I want to save all the stacks that are open in a standalone.  These  
are separate stack files, not substacks.  What syntax needs to be  
changed to make the following work?


 if theKey is "Q" then
put the stacks into saveUsAll
repeat with x = 1 to the number of lines of saveUsAll
save stack (line x of saveUsAll)
end repeat
quit
end if


Thanks,
Mark

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution