Liberty BASIC Community Forum
« Access to command line functions? »

Welcome Guest. Please Login or Register.
Dec 12th, 2017, 08:04am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Access to command line functions?  (Read 268 times)
AllenM
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 5
xx Access to command line functions?
« Thread started on: Feb 18th, 2017, 08:37am »

Hello -

I'm a new user of Liberty BASIC. I would like to know if it possible to execute Windows command line functions from within a BASIC application, and if so, how to do this.

Thanks for any help you can provide.

Allen Minton
User IP Logged

MKnarr
Senior Member
ImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 431
xx Re: Access to command line functions?
« Reply #1 on: Feb 18th, 2017, 11:38am »

Look up CommandLine$ in the help file. It's easy to use.
User IP Logged

tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1708
xx Re: Access to command line functions?
« Reply #2 on: Feb 18th, 2017, 3:00pm »

Quote:
if it possible to execute Windows command line functions from within a BASIC application,

Run, like Code:
run "calc.exe" 

User IP Logged

damned Dog in the Manger
tenochtitlanuk
Board Moderator

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 1170
xx Re: Access to command line functions?
« Reply #3 on: Feb 18th, 2017, 3:51pm »

It happens that I just wrote a 'bomb' program this way while trying to achieve something else.
A one-liner in LB calls and runs another copy of itself until it runs out of resources! ( It was supposed to halt LB after each iteration, but actually left them all running. Beware!
Pseudo code...
Code:
run "path to /liberty.exe -r -a" + "path to itself.bas"
 
User IP Logged

cundo
Guru
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 628
xx Re: Access to command line functions?
« Reply #4 on: Feb 18th, 2017, 4:27pm »

On the same: Running Control Panel Applets
User IP Logged

cundo
AllenM
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 5
xx Re: Access to command line functions?
« Reply #5 on: Feb 18th, 2017, 5:01pm »

Thanks to all for the help. Problem solved!

Allen
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls