Author Topic: Macro code  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Macro code
« 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.
« Last Edit: June 27, 2009, 02:29:36 pm by Eeems »
/e

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Macro code
« Reply #1 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...
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Macro code
« Reply #2 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?

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Macro code
« Reply #3 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?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Macro code
« Reply #4 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...
/e