[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: UltraMacros Loop Limitation
Hi Beverly,
It's nice to see a name from the days when the Apple II ruled and mice
were in the attic.
Thanks for the info on avoiding reading the screen. One problem I was
having was that the macro is working in a big spreadsheet, 5000 rows,
so as the digits in the last line on the screen switched from say 100s
to 1000s my 18,22,5 needed to be changed to 19,22,5. If bit 7 of peek
$8290 is set, how would I state that in the macro? What would it be
equal to?
Yes, I would like to know how to make the macro sense that it is done.
I've been resorting to things such as going to the last cell and
putting in a string of ZZZZZZZ or some other character that wouldn't be
likely to appear in the data.
Thanks for your help Beverly. It's nice to see you're still in the
Apple II scene.
Mike
appleworks51@yahoo.com wrote:
> msean wrote:
> > Hi, I have some UltraMacro routines that call themselves such as:
> >
> > A:<all : $0 = screen 18,22,5 : if $0 = "Value" then $1 = $0 down sa-B
> > else up sa-A>!
>
> To make the macro repeat indefinitely, don't have the macro call
> itself. Simply say <rpt> (repeat). <goto> will go to the next macro
> without any danger of looping back at some point. Unless you really
> want to come back from SA-B, use <goto>.
>
> A:<all : $1 = screen 18,22,5 : if $1 = "Value" down goto sa-B
> else up rpt>!
>
> To stop the macro, press the Escape key, or ask me how to make the
> macro sense that it is done.
>
> And now, to tell you more than you ever wanted to know about macros:
>
> To make it really fancy:
>
> Your macro's screen reading depends on the column width for your
> specific specific spreadsheet. If the column width happens to be
> narrower, i.e, less than 10, it will not give you the result you want.
> To make it more generic, don't use <screen> to read the screen. Use
> another way to read the cell contents type.
>
> {Of course, you don't need to do this if your column width doesn't
> change. I just like to dig deeper, if at all possible.}
>
> With the cursor on each cell, peek bit 7 of memory location $8290. If
> bit 7 of peek $8290 is set, the contents of the cell is a value or a
> formula. If not, it is a label. (You can also differentiate further
> between a value and a formula, if needed.)
>
> This bit has a label, peek #worktype; so you don't need to remember the
> peek or understand about bits.
>
> A:<asp: x=peek #worktype: if x>128 down goto sa-B: else up rpt>!
>
> This is sort of off the top of my head, so anyone feel free to correct
> me.
>
> Beverly Cadieux
> TEXAS II an International newsletter for users of AppleWorks® 5.1