Hey guys !

I'm back working on AxeDCS, the axiom that allows Axe programmers to use functions from the DCS7 GUI API, and I though that I could also provide the AP (Associated Program) feature. So, now it's done ! Very Happy

It's a bit hard to make work though, so here's a little explanation on how to use it in your program.

So, this solution takes form of a program named prgmDCSAP. You must put it as the first instruction of the program you want to be AP-enabled. Then, put a Lbl APStr at the beginning of your AP code and compile your program for Noshell.

Then, run the resulting program, and go back in your main program's code. Replace the line prgmDCSAP by [2nd] [sto] prgmθθθθθθθθ. You'll see an huge hexadecimal string ; that's your header.

Then you can compile your code in Noshell and run it with DoorsCS7 as an AP-enabled program.

Don't forget that you'll need to re-use prgmDCSAP each time the address of Lbl APSrt change (that means every time you put a code before it) !

Screenie of course Wink :



I'll release the program later, I need to do some stuffs before.
This is really nifty work! Smile I'm sure Axe programmers will appreciate being able to use APs.
In fact, it doesn't work ... There are too many addressing problems, I just asked Runer112 on another feature for Axe 1.2.1 which will allow this to work.

Also I wondered, can I call openFile, saveFile or saveFileAs DCS routines in a AP-disabled program ?
Well, forgot what I said, it works now, thanks to Self Modifying Code ! Very Happy

matrefeytontias wrote:
Also I wondered, can I call openFile, saveFile or saveFileAs DCS routines in a AP-disabled program ?
OpenFile: As per its documentation, the routine's input is:
Quote:
a = zero to only show files of the type(s) defined in this AP's header, or nonzero to show all oncalc files
If the program has no AP header, then the a=0 option will likely crash. I would expect a!=0 would work properly, but I have never tested it.
FileSave and FileSaveAs: Should be ok.
Okay thanks, I'll test it soon.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement