Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Eeems on June 26, 2009, 10:50:52 pm

Title: Macro code
Post by: Eeems on June 26, 2009, 10:50:52 pm
Ok this is the code I made for my macro subroutine that I plan to use for making exact screenshots so I don't have to redo them over and over again due to the fact that wabbit dislikes me....ok Optimizations are welcome :) tell me what you think, us it if you want
atm I only can convert the keycodes to a string, but I will finish the second part soon
Code: [Select]
If Ans:Then
If Ans=1:Then
getkey->K
int(K/10->theta
K->T
For(U,20,100,10)
T-10(K<U and theta>=(U-10)/10->T
End
T+1-5(theta-1)(theta!=0)+(theta>2->T
Str9+sub(" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZthetaeeL1L2L3L4L5L6uvw box small+ point ^2 ^-1 () ^+-*/",T,1->Str9
Else
P+1->P
inString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZthetaeeL1L2L3L4L5L6uvw box small+ point ^2 ^-1 ()i^+-*/",sub(Str9,P,1->T
T->K
If T:Then
K+10+5(K=11->K
For(theta,5,50,5)
K+5(T>theta and T!=11)-(T>11 and theta=5 and T<16->K
End:End:End:End:Else
getkey->K
End
the string it calls from could be any you want, just as long as you take into account that the number is increased by one so no keypress would equal 1, and you also must remember that [on] also takes up a keycode space so you have to put the same symbol in it's spot as well just as a placeholder.
Title: Re: Macro code
Post by: Eeems on June 27, 2009, 02:29:40 pm
ok I added in what I have for changing the string back to the keycodes, but I am having trouble... it only works for a few rows then it is off by one or more...
Title: Re: Macro code
Post by: DJ Omnimaga on July 01, 2009, 06:31:08 pm
so what would it do exactly? It register every keypresses (and time at which it was pressed) then create a "replay" file?
Title: Re: Macro code
Post by: Raylin on July 01, 2009, 06:33:55 pm
I would also like to know this.
From the looks of the code you posted, does the calc write the values of the keypresses to Str9?
Title: Re: Macro code
Post by: Eeems on July 02, 2009, 12:07:27 am
yes in a sense it does make a replay file
basically what this does is it converts a keypress to a token and stores it to a string, I still haven't finished converting it back, but that's pretty much the whole idea...