Liberty BASIC Community Forum
« Search Results »

Welcome Guest. Please Login or Register.
Jan 24th, 2017, 09:09am


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

--Liberty BASIC Resources--
Liberty BASIC Community WikiSpace
Frequently Asked Questions
Bay Six Software Forum
Liberty BASIC Home Page
Carl Gundel's Blog
Official Liberty BASIC Support
Liberty BASIC Programmer's Encyclopedia
Liberty BASIC on Rosetta Code

Search Results

Total results: 10


 1   Game and Graphic Programming / Stress-buster or decoration? Conical images  on: Yesterday at 05:47am
Started by tenochtitlanuk | Post by tenochtitlanuk
At a time of stressful changes in our world, I used my previously published code to generate conical images of current political figures- and of attractive but politically-ignorant animals. It implements the idea that an image, usually thought of as a Cartesian set of ( x, y) pixels, is equally representable as a polar ( r, theta) set. Just re-plot with same ( or different, scaled) radius, but with the 360 degree angle reduced a bit. Leave a glueing-tab when cutting out. They view un-distorted from directly in front, and weirdly viewed from sides. Print on larger paper to make a mask. They also work well as a 3D mobile if two are stuck back-to-back.
User Image
User Image
You can decorate a room with the product, or slap/punch it flat in a moment of catharsis. It's a distraction, anyway!

See Diga me! for more, including code and zip file of images etc.

 
  Reply Quote Notify of replies

 2   Novice / Re: To know subfolders' names of a main folder  on: Yesterday at 04:18am
Started by fox | Post by fox
Thanks a lot to cundo and robmcal.
You solved my problem.
My program, at first installation, has to verify if some subfolders (of which it needs to run) are yet existing or not.
If not, it has to create them.
This should be useful also in the case of files or subfolders corrupted.
Thans a lot again and bye
fox
 
  Reply Quote Notify of replies

 3   Liberty BASIC Code / Re: what does it mean  on: Yesterday at 04:13am
Started by CrazyLarry | Post by kevin
I fined in every loop whether, While wend, For next etc.
You should always include a "scan" command to prevent the computer from freezing and don't forget the sleep DLL

SCAN

causes the computer to check for computer inputs in every loop

SLEEP DLL tells the computer to rest for the given amount of milliseconds.

nomainwin
open "Minimun cpu uasage" for window as #1
#1 "trapclose [quit]"

[loop]
scan
'sleep for 50 milliseconds
calldll #kernel32,"Sleep",50 as ulong,r as void
goto [loop]

[quit]
close #1: end
 
  Reply Quote Notify of replies

 4   Novice / Re: To know subfolders' names of a main folder  on: Jan 22nd, 2017, 8:01pm
Started by fox | Post by robmcal
on Jan 22nd, 2017, 12:39pm, fox wrote:
Hi all.
I would like to know if there is a way to know subfolders' names of a main folder.
So my program could create the subfolders I want if they don't exist.
Thanks a lot for any helps and bye.
fox

Depending on your specific needs you may not need to check if the folder already exists. The "mkdir()" command will create a folder if it doesn't exist and do nothing if it does exist.
 
  Reply Quote Notify of replies

 5   Novice / Re: To know subfolders' names of a main folder  on: Jan 22nd, 2017, 5:25pm
Started by fox | Post by cundo
See if this helps:
Code:
  print "DefaultDir$ is "; DefaultDir$
  dim info$(10, 10)
  files DefaultDir$, info$() ' you may need to change this to a different path.
  nOfFolders =  val(info$(0, 1)) ' n of subdirectories found
  nOfFiles = val(info$(0, 0)) ' n of files found, needed for later use

print "There are ";nOfFolders; " subdirectories available."
print "There are ";nOfFiles; " files in this directory."
print
print "Listing directories:"
print

    ' the information of folders come after the files.
    ' In this example: i+nOfFiles

for i = 1 to nOfFolders
      print info$(i+nOfFiles, 1)

next i


end
 

Take a look at the help file, under Keywords in Alphabetical Order > FILES

 
  Reply Quote Notify of replies

 6   Novice / To know subfolders' names of a main folder  on: Jan 22nd, 2017, 12:39pm
Started by fox | Post by fox
Hi all.
I would like to know if there is a way to know subfolders' names of a main folder.
So my program could create the subfolders I want if they don't exist.
Thanks a lot for any helps and bye.
fox

 
  Reply Quote Notify of replies

 7   Liberty BASIC 5 / Re: LB5 for Linux?  on: Jan 21st, 2017, 12:12pm
Started by steve99 | Post by tenochtitlanuk
A 'native Linux version' would be nice.

BUT
I do all my LB programming under Wine on Linux. ( 'Li-Li Land'??) It is the easiest way for me to program applications with a GUI interface. Only encounter MS when sorting friends' machines with Windows of various versions....

What are the inconveniences/quirks that you find with LB under Wine? Apart from pathname and fontname differences I've met very few problems. But then I don't distribute the compiled exe versions to others, although they work fine on my machine.

(My experience over decades is that MOST programming tasks can be achieved with MOST programming languages on MOST hardware. Although not always by me!)
 
  Reply Quote Notify of replies

 8   Liberty BASIC Code / Re: Run, but wait  on: Jan 21st, 2017, 11:02am
Started by alincon2001 | Post by MKnarr
Code:
call RunWait filename$,"", DefaultDir$

sub RunWait File$, a$, dir$ 
    SEE.MASK.NOCLOSEPROCESS = hexdec("40")
    SEE.MASK.FLAG.DDEWAIT = hexdec("100")
    struct ExecInfo, _
        Size as long, _
        fMask as long, _
        hwnd as long, _
        Verb$ as ptr, _
        File$ as ptr, _
        Parameters$ as ptr, _
        Directory$ as ptr, _
        Show as long, _
        InstApp as long, _
        IDList as long, _
        Class$ as ptr, _
        keyClass as long, _
        HotKey as long, _
        Icon as long, _
        Process as long
    ExecInfo.fMask.struct = SEE.MASK.NOCLOSEPROCESS or SEE.MASK.FLAG.DDEWAIT
    ExecInfo.File$.struct = File$ + chr$(0)
    ExecInfo.Parameters$.struct = a$ + chr$(0)
    ExecInfo.Directory$.struct = dir$ + chr$(0)
    ExecInfo.Show.struct = _SW_SHOWNORMAL
    ExecInfo.Size.struct = len(ExecInfo.struct)
    calldll #shell32, "ShellExecuteExA", _
        ExecInfo as struct, _
        result as long
    if result <> 0 then
        Handle = ExecInfo.Process.struct
        Milliseconds = _INFINITE
        calldll #kernel32, "WaitForSingleObject", _
        Handle as long, _
        Milliseconds as long, _
        result as long
    end if
end sub
 

 
  Reply Quote Notify of replies

 9   Liberty BASIC Code / Run, but wait  on: Jan 21st, 2017, 10:46am
Started by alincon2001 | Post by alincon2001
Say you're 'RUN' ing an external program from LB.
What are some good ways to pause the LB program until the external program finishes?

r.m.
 
  Reply Quote Notify of replies

 10   Liberty BASIC 5 / Re: LB5 for Linux?  on: Jan 21st, 2017, 02:30am
Started by steve99 | Post by donnybowers
I have LB 4.04 Pro. But, I no longer use Windows. I've been waiting for the LINUX version for a long time. I use LINUX Mint or Ubuntu most of the time. As soon as you come up with a working version for LINUX I would like to know about it. Eventually I want to be cross platform so I can share programs with people who use Windows. I currently use Wine to run LB, but it has a few quirks. I will probably never have a MAC computer, but it would be nice if I could still compile MAC versions of my programs for MAC users. That might be asking too much.

The only suggestion I have is a built in option for word wrap in text editor objects. I hate playing with API's. Other than this option, LB 4.04 has pretty much everything I want in a BASIC language except a native LINUX version. I can live without the word wrap option as long as it has the ability to do it through API or something similar in LINUX.

I believe a LINUX version of LB would be the best thing that ever happened to LINUX. People would be able to easily create powerful applications and I'm sure many would find their way into some of the repositories.

I'm ready to purchase a LINUX version any time.
 
  Reply Quote Notify of replies


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