CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 124 users online: 7 members, 92 guests and 25 bots.
Members: flyingfisch, gbl08ma, LuxenD, Pizzaboy, ti83head, tiseac.
Bots: VoilaBot (1), Magpie Crawler (3), VoilaBot (3), Googlebot (18).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 07:41:11 am    Post subject: Grab a list of programs

So, I'm making a little OS (well, not really) thingy just for fun.

Is there any way with Hybrid TI-Basic to grab a list of programs, put it in a menu, and when the program is clicked, to execute it, and then return to the OS thingy when the program is finished?
Back to top
souvik1997


Guru-in-Training


Joined: 19 Apr 2010
Posts: 2870

Posted: 08 Dec 2011 09:10:24 am    Post subject:

You could use det(9 or det(32 to get the list of programs, then you could use a custom menu or the DCSB GUImenu to let the user choose a program. To execute the program, use the ExecArcPrgm function from xLib or use self-modifying code. Also, you're making a shell, not an OS. Wink
_________________
CALCnet Tournament-38%


deviantArt
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55742
Location: Earth, Sol, Milky Way

Posted: 08 Dec 2011 10:05:41 am    Post subject:

souvik1997 wrote:
You could use det(9 or det(32 to get the list of programs, then you could use a custom menu or the DCSB GUImenu to let the user choose a program. To execute the program, use the ExecArcPrgm function from xLib or use self-modifying code. Also, you're making a shell, not an OS. Wink
Hmm, I'm not sure why I didn't expose the new RunProg stack to BASIC programs via the DCSB Libs, but I'm sure that I must have had a good reason for it. Anyway, I agree with everything Souvik said there, including pointing out that shell != OS.
_________________


Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 05:10:12 pm    Post subject:

What all do I need to put on my calculator in order to get det( and ExecArcPrgm?
Like, what file do I need to send to the calc?

Edit: Nevermind.
"In this Category are all the Basic lib commands that come with DCS."
So I guess I'd just type in the commands manually?
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2957

Posted: 08 Dec 2011 05:17:43 pm    Post subject:

I'm going to assume that you already know the double posting rule and I won't have to explain it this time. I'll go ahead and edit your two posts together.

To answer your question, yes, you just use the tokens that make up the function. So, for det(9, you type the token "det(" and "9".
_________________
http://tanner.myserverathome.com
Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 05:26:16 pm    Post subject:

Okay! Now, what about compatibility? Will the program work on calculators without DoorsCS?
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2957

Posted: 08 Dec 2011 05:27:25 pm    Post subject:

Yes, any calculator with DoorsCS and/or Celtic 3 (If you have DCS, you don't need C3).
_________________
http://tanner.myserverathome.com
Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 05:49:02 pm    Post subject:

So, the program won't work without Celtic and/or DoorsCS?

Oh well. That stinks.
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2957

Posted: 08 Dec 2011 05:52:48 pm    Post subject:

Not really. Lots of people use Celtic and Doors, and making them get it is not really an issue since they should already have the latter Wink In all seriousness, it's not like many people are going to be using your shell. Usually, it's a "Hmm, that looks interesting. *sends to calc* Huh, well, that was cool" and then they don't look at it again. So, you shouldn't be stressing over something as trivial as getting them to install one or the other Smile
_________________
http://tanner.myserverathome.com
Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 06:01:13 pm    Post subject:

Okay, another question. (oh noez)

I was looking here and I just tried a random command, CheckRAM.

I make a program, and I type in CheckRAM.

I run the program and I am thrown a syntax error.

I try typing in real(14), and I get the same thing.

Am I doing something wrong?
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2957

Posted: 08 Dec 2011 06:03:32 pm    Post subject:

Yes, go into DCS, "start menu", Options, xLib/Celtic 3 Compatibility (Or something like that) and make sure that box is checked. Then try running your program again.
_________________
http://tanner.myserverathome.com
Back to top
Ashbad


... I think redheaded girls are kind of cool


Joined: 01 Dec 2010
Posts: 2417
Location: Stomp Stomp Stomp, The Idiot Convention

Posted: 08 Dec 2011 06:03:55 pm    Post subject:

Perhaps showing us the source will help us pinpoint the syntax error? Also, typing in "CheckRAM" as you did the first time would always fail, since it's just a string of character tokens, not the actual real(14) command.
_________________
-Ashbad
Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 08 Dec 2011 06:07:33 pm    Post subject:

The box is checked. As for the source, it's just one line.

real(14)
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55742
Location: Earth, Sol, Milky Way

Posted: 08 Dec 2011 06:49:28 pm    Post subject:

Giggybyte wrote:
The box is checked. As for the source, it's just one line.

real(14)
Are you running this inside a program, or at the homescreen by itself? It has to be in a program. If you're running that program from the homescreen, HomeRun must be on.
_________________


Back to top
souvik1997


Guru-in-Training


Joined: 19 Apr 2010
Posts: 2870

Posted: 08 Dec 2011 07:26:15 pm    Post subject:

Quoting from the DCS wiki:
Quote:
To detect whether or not the DCSB Libs are available inside a basic program, use the sequence det([[42.
* If it returns 42, no libraries are available.
* If it returns 0, only Celtic III/Xlib/PicArc/Omnicalc is available.
* If it returns 1337, all libraries are available, including the DCSB Libs.

You can change which libraries are available in the DCS settings.

Edit: Also, make sure you are using the token real(, not typing [r][e][a][l][(]. You can find real( in [MATH]-[->]-[2], if I recall correctly.
_________________
CALCnet Tournament-38%


deviantArt
Back to top
Giggybyte


Newbie


Joined: 02 Sep 2011
Posts: 24

Posted: 09 Dec 2011 07:18:04 am    Post subject:

souvik1997 wrote:
typing [r][e][a][l][(]. You can find real( in [MATH]-[->]-[2], if I recall correctly.

That's what I was doing wrong! Thanks!

Imma put all the commands in a .txt file, convert it, and put in on my calculator.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55742
Location: Earth, Sol, Milky Way

Posted: 09 Dec 2011 10:47:37 am    Post subject:

Assuming you have Document DE, you can use the Document DE converter to turn a text file into a DDE formatted file. In fact, I feel like there must have been someone who already made documentation for the hybrid libs as a DDE7 file.

http://www.cemetech.net/projects/docde6/
_________________


Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 
Jump to:  
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.037313 seconds.