Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

libertybasic · The Official Liberty BASIC Support Group

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 5577
  • Founded: Jan 12, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 15618 - 15647 of 46469   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Messages: Show Message Summaries Sort by Date ^  
#15618 From: "one_eag1e" <hawkeyel@...>
Date: Sun Jun 1, 2003 7:12 am
Subject: (No subject)
one_eag1e
Send Email Send Email
 
Hi,

I posted this previously, but no one responded. I am hoping it was
simply lost in the rush of the LB v3.03 release. :)



I was wondering, is there a way from within LB to attach a file to
and E-Mail when an E-Mail client is started up?

I am running the e-mail client via this command:

Call RunThis "mailto:username@w...?Subject=Data
Attachment" ,h

Is there anything I can add to that line command to auto attach a
file from a directory specified from with in my program?

Reason for this is periodically, I want to receive certain files
from users of the program. To make the process essentially
effortless, I would like to automatically have those files attach to
the e-mail link I provide in the program when they run the command
to submit files.

Ideally, I am using constant filenames and program defualt
filepaths, so that will not be an issue... I know where to pull them
from, I just need to know 'how' to attach this known variable to the
e-mail when the client is opened via the call.

Many Thanks In advance!

- Lee

#15619 From: "one_eag1e" <hawkeyel@...>
Date: Sun Jun 1, 2003 7:17 am
Subject: Running Email Attaching Files From Within LB?
one_eag1e
Send Email Send Email
 
Hi,

I posted this previously, but no one responded. I am hoping it was
simply lost in the rush of the LB v3.03 release. :)



I was wondering, is there a way from within LB to attach a file to
and E-Mail when an E-Mail client is started up?

I am running the e-mail client via this command:

Call RunThis "mailto:username@w...?Subject=Data
Attachment" ,h

Is there anything I can add to that line command to auto attach a
file from a directory specified from with in my program?

Reason for this is periodically, I want to receive certain files
from users of the program. To make the process essentially
effortless, I would like to automatically have those files attach to
the e-mail link I provide in the program when they run the command
to submit files.

Ideally, I am using constant filenames and program defualt
filepaths, so that will not be an issue... I know where to pull them
from, I just need to know 'how' to attach this known variable to the
e-mail when the client is opened via the call.

Many Thanks In advance!

- Lee

PS - Sorry,  I know this is a dupe, but the board does not offer an
EDIT POST function, and I posted it without a subject line. :(

#15620 From: "xtlegend2002" <xtlegend2002@...>
Date: Sun Jun 1, 2003 9:44 am
Subject: Labjack
xtlegend2002
Send Email Send Email
 
Hi - just joined.

I'm interestes in used the 'labjack' USB interface with liberty
basic. Anyone done this?

Thanks.

#15621 From: Alyce Watson <alycewatson@...>
Date: Sun Jun 1, 2003 12:22 pm
Subject: Re: Re: Moving FILEDIALOG window
alyce_dubya
Send Email Send Email
 
At 04:52 AM 6/1/2003 +0000, you wrote:

>I've been using an outdated reference. It seems MS added three new
>elements to the OPENFILENAME struct while I wasn't looking! Of
>course, this means that to take advantage of these, your code will
>have to check the version of Windows and set the lStructSize element
>to the appropriate size. I'm still using Windows 98, so I cannot test
>this out myself. Here is the code updated to work with the 2000/XP
>additions.


Brent,
On XP, it crashes in both LB3.03 and alpha LB4. In LB4 the error is
something about end of call chain command and in LB3 it is stack overflow
when it gets to the hook process function.

-Alyce

#15622 From: Doyle Whisenant <mechanic@...>
Date: Sun Jun 1, 2003 1:15 pm
Subject: Re: Re: Moving FILEDIALOG window
mechanicjenn
Send Email Send Email
 
Alyce Watson wrote:

>At 04:52 AM 6/1/2003 +0000, you wrote:
>
>
>
>>I've been using an outdated reference. It seems MS added three new
>>elements to the OPENFILENAME struct while I wasn't looking! Of
>>course, this means that to take advantage of these, your code will
>>have to check the version of Windows and set the lStructSize element
>>to the appropriate size. I'm still using Windows 98, so I cannot test
>>this out myself. Here is the code updated to work with the 2000/XP
>>additions.
>>
>>
>
>
>Brent,
>On XP, it crashes in both LB3.03 and alpha LB4. In LB4 the error is
>something about end of call chain command and in LB3 it is stack overflow
>when it gets to the hook process function.
>

Both examples crash here, LB3.03, Win98

--
Doyle Whisenant
"mechanic" at "sonet" dot "net"

#15623 From: Brendan H Scherer <goldenstar4@...>
Date: Sun Jun 1, 2003 1:53 pm
Subject: Getting the current path of the file being run
ta_stealth
Send Email Send Email
 
Is there any way I can get  the current path of my program that is being
run?
Thnx,
-- Brendan

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#15624 From: Doyle Whisenant <mechanic@...>
Date: Sun Jun 1, 2003 2:15 pm
Subject: Re: Getting the current path of the file being run
mechanicjenn
Send Email Send Email
 
Brendan H Scherer wrote:

>Is there any way I can get  the current path of my program that is being
>run?
>
DefaultDir$ should do it.

--
Doyle Whisenant
"mechanic" at "sonet" dot "net"

#15625 From: Brendan H Scherer <goldenstar4@...>
Date: Sun Jun 1, 2003 2:15 pm
Subject: Re: Getting the current path of the file being run
ta_stealth
Send Email Send Email
 
thnx

On Sun, 01 Jun 2003 09:15:44 -0500 Doyle Whisenant <mechanic@...>
writes:
> Brendan H Scherer wrote:
>
> >Is there any way I can get  the current path of my program that is
> being
> >run?
> >
> DefaultDir$ should do it.
>
> --
> Doyle Whisenant
> "mechanic" at "sonet" dot "net"
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> libertybasic-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#15626 From: Brendan H Scherer <goldenstar4@...>
Date: Sun Jun 1, 2003 2:43 pm
Subject: Re: Getting the current path of the file being run
ta_stealth
Send Email Send Email
 
I tried using it but i had problems i looked in the help file but it only
showed me a way by using more than 1 file at a time
I only want to do one file.
Thnx,
-- Brendan

P.S. Could you send an example?Thnx

On Sun, 01 Jun 2003 09:15:44 -0500 Doyle Whisenant <mechanic@...>
writes:
> Brendan H Scherer wrote:
>
> >Is there any way I can get  the current path of my program that is
> being
> >run?
> >
> DefaultDir$ should do it.
>
> --
> Doyle Whisenant
> "mechanic" at "sonet" dot "net"
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> libertybasic-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#15627 From: "jaffy1229" <seanlock@...>
Date: Sun Jun 1, 2003 3:05 pm
Subject: Changing directories
jaffy1229
Send Email Send Email
 
hi, i'm very new to basic and found this on the web and wanted to try
it to do some simple file renaming tasks in windows.

I have a few question maybe someone can answer.

I first want to allow a user to select a directory and then for basic
to  calculate the directory info using the files command,

eg. files dirselected$, info$()

I then want it to rename files in that directory in a specific
manner, but at  present, the directory is still set to C:\Program
Files\Liberty BASIC v3.03 and the files i'm trying to rename can't be
found.

I've played around with the FILEDIALOG command, but can only get it
to select a file, not select a directory.

Can anyone give me some code to achieve this? any help is appreciated.

Regards,

jaffy

#15628 From: Brian Schmalz <brian.s@...>
Date: Sun Jun 1, 2003 3:16 pm
Subject: RE: Labjack
brian_schmalz
Send Email Send Email
 
Well, from http://www.labjack.com/downloads.html it looks like they have a
DLL that allows you access to all of the Labjack functions. And LibertyBasic
can load and access all DLLs. So I don't think there's anything technically
in your way! Let us know what you come up with - I've always been really
curious about the LabJack. It seems very, very overpriced from a hardware
perspective, but maybe their software just rocks and so it's worth the
price. It sure seems like you could easily make your own with a Cygnal USB
chip and a bunch of PGAs.

*Brian

-----Original Message-----
From: xtlegend2002 [mailto:xtlegend2002@...]
Sent: Sunday, June 01, 2003 4:45 AM
To: libertybasic@yahoogroups.com
Subject: [libertybasic] Labjack


Hi - just joined.

I'm interestes in used the 'labjack' USB interface with liberty
basic. Anyone done this?

Thanks.

#15629 From: "Robert A Heeley" <admin@...>
Date: Sun Jun 1, 2003 3:39 pm
Subject: Re: Labjack
rahsoftwareuk
Send Email Send Email
 
Yeah, please do let us all know how your getting on! It would be great to
see an example of Liberty BASIC controlling USB. Remember if you get stuck
we will try and help;-)

Good Luck commander! (Sorry I have been playing to many war games)

Regards,
Robert A Heeley
admin@...
http://www.rahsoftwareuk.co.uk

----- Original Message -----
From: "Brian Schmalz" <brian.s@...>
To: <libertybasic@yahoogroups.com>
Sent: Sunday, June 01, 2003 4:16 PM
Subject: RE: [libertybasic] Labjack


> Well, from http://www.labjack.com/downloads.html it looks like they have a
> DLL that allows you access to all of the Labjack functions. And
LibertyBasic
> can load and access all DLLs. So I don't think there's anything
technically
> in your way! Let us know what you come up with - I've always been really
> curious about the LabJack. It seems very, very overpriced from a hardware
> perspective, but maybe their software just rocks and so it's worth the
> price. It sure seems like you could easily make your own with a Cygnal USB
> chip and a bunch of PGAs.
>
> *Brian
>
> -----Original Message-----
> From: xtlegend2002 [mailto:xtlegend2002@...]
> Sent: Sunday, June 01, 2003 4:45 AM
> To: libertybasic@yahoogroups.com
> Subject: [libertybasic] Labjack
>
>
> Hi - just joined.
>
> I'm interestes in used the 'labjack' USB interface with liberty
> basic. Anyone done this?
>
> Thanks.
>
>
> To unsubscribe from this group, send an email to:
> libertybasic-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>

#15630 From: Alyce Watson <alycewatson@...>
Date: Sun Jun 1, 2003 4:10 pm
Subject: Re: Changing directories
alyce_dubya
Send Email Send Email
 
At 03:05 PM 6/1/2003 +0000, you wrote:

>I've played around with the FILEDIALOG command, but can only get it
>to select a file, not select a directory.
>
>Can anyone give me some code to achieve this? any help is appreciated.

Watch this spot later today, or at least soon for Tom Nally's announcement
of the June newsletter. I submitted an article on the use of
BrowseForFolder, which does just what you need.

Regards,
Alyce

#15631 From: Alyce Watson <alycewatson@...>
Date: Sun Jun 1, 2003 4:29 pm
Subject: Re: Getting the current path of the file being run
alyce_dubya
Send Email Send Email
 
At 09:43 AM 6/1/2003 -0500, you wrote:

>I tried using it but i had problems i looked in the help file but it only
>showed me a way by using more than 1 file at a time
>I only want to do one file.
>Thnx,
>-- Brendan
>
>P.S. Could you send an example?Thnx


file$=DefaultDir$ + "\readme.txt"

Be sure to include the backslash, since it is not part of the DefaultDir$
variable.

-Alyce

#15632 From: Doyle Whisenant <mechanic@...>
Date: Sun Jun 1, 2003 4:52 pm
Subject: Re: Getting the current path of the file being run
mechanicjenn
Send Email Send Email
 
Alyce Watson wrote:

>At 09:43 AM 6/1/2003 -0500, you wrote:
>
>
>
>>I tried using it but i had problems i looked in the help file but it only
>>showed me a way by using more than 1 file at a time
>>I only want to do one file.
>>
>>
>
>file$=DefaultDir$ + "\readme.txt"
>
>Be sure to include the backslash, since it is not part of the DefaultDir$
>variable.
>
Funny, why doesn't LB3.xx have a chdir$ (change directory) command? (Or
have I missed it?)

--
Doyle Whisenant
"mechanic" at "sonet" dot "net"

#15633 From: "Gordon Rahman" <dutch_gordon@...>
Date: Sun Jun 1, 2003 6:22 pm
Subject: Re: Moving FILEDIALOG window
dutch_gordon
Send Email Send Email
 
Ok Brent,

Are you still here?
I used XP and LB v3.02 and had a marvelous result.
I only changed X = rcDesktop.left.struct + 10 into +250
and Y = etc. into -130 to get the window positioned where I wanted
it to.
I inserted my own title ofn.lpstrTitle.struct and changed C:\ into
DefaultDir$ and the filter for BIN files.

Perfect!

But does the comment from Alyce and Doyle mean BTTDB?
(back to the drawing board?)

Gordon.
P.s. You got a nice homepage.



--- In libertybasic@yahoogroups.com, Doyle Whisenant <mechanic@s...>
wrote:
> Alyce Watson wrote:
>
> >At 04:52 AM 6/1/2003 +0000, you wrote:
> >
> >
> >
> >>I've been using an outdated reference. It seems MS added three
new
> >>elements to the OPENFILENAME struct while I wasn't looking! Of
> >>course, this means that to take advantage of these, your code
will
> >>have to check the version of Windows and set the lStructSize
element
> >>to the appropriate size. I'm still using Windows 98, so I cannot
test
> >>this out myself. Here is the code updated to work with the
2000/XP
> >>additions.
> >>
> >>
> >
> >
> >Brent,
> >On XP, it crashes in both LB3.03 and alpha LB4. In LB4 the error
is
> >something about end of call chain command and in LB3 it is stack
overflow
> >when it gets to the hook process function.
> >
>
> Both examples crash here, LB3.03, Win98
>
> --
> Doyle Whisenant
> "mechanic" at "sonet" dot "net"

#15634 From: "carlgundel" <carlg@...>
Date: Sun Jun 1, 2003 8:34 pm
Subject: Re: Getting the current path of the file being run
carlgundel
Send Email Send Email
 
--- In libertybasic@yahoogroups.com, Doyle Whisenant <mechanic@s...>
wrote:
> >
> Funny, why doesn't LB3.xx have a chdir$ (change directory)
command? (Or
> have I missed it?)

It doesn't have one.  Maybe I'm missing something, but why do you
need it?

-Carl

#15635 From: Brendan H Scherer <goldenstar4@...>
Date: Sun Jun 1, 2003 9:50 pm
Subject: Re: Getting the current path of the file being run
ta_stealth
Send Email Send Email
 
Thanks much again!
-- Brendan
On Sun, 01 Jun 2003 11:29:08 -0500 Alyce Watson <alycewatson@...>
writes:
> At 09:43 AM 6/1/2003 -0500, you wrote:
>
> >I tried using it but i had problems i looked in the help file but
> it only
> >showed me a way by using more than 1 file at a time
> >I only want to do one file.
> >Thnx,
> >-- Brendan
> >
> >P.S. Could you send an example?Thnx
>
>
> file$=DefaultDir$ + "\readme.txt"
>
> Be sure to include the backslash, since it is not part of the
> DefaultDir$
> variable.
>
> -Alyce
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> libertybasic-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#15636 From: Brendan H Scherer <goldenstar4@...>
Date: Sun Jun 1, 2003 10:00 pm
Subject: Programming Ideas for a newbie
ta_stealth
Send Email Send Email
 
I've been playin around with some programs ive made but does anyone have
any ideas that i could make for a program?
Thnx,
Brendan

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#15637 From: "carlgundel" <carlg@...>
Date: Sun Jun 1, 2003 10:18 pm
Subject: Vote for Liberty BASIC in this year's Isidor Award
carlgundel
Send Email Send Email
 
At the risk of being pushy, I'm reposting this message and urging
anyone who hasn't voted for Liberty BASIC in this year's Isidor
Awards to go and vote.  The deadline for voting is tomorrow, but
don't wait... vote now to give Liberty BASIC a chance at being
promoted in major magazines!

   http://www.isidor-awards.com/vote.html?productid=2466

Thanks!

-Carl

-----Previously posted message begins here-----

Hi all!

Last month, I posted the announcement below about this year's Isidor
shareware awards. Thanks so much if you voted for Liberty BASIC
already. If you haven't, then I implore, beg, persuade, and ask
nicely for you to go and vote now! This could be one of those things
that push Liberty BASIC more into the public mind. The winners of
the contest will be featured on the cover disks of several magazines!

The deadline for voting is only a few days away!

Click here to vote:

http://www.isidor-awards.com/vote.html?productid=2466

Thanks!

-Carl

=====================================

Last year, everyone helped Liberty BASIC make the top 10! This was
exciting and it was great to be able to tout it on our website. The
first place winner gets promoted in several prominent magazines, so
this year I'd like to shoot for first place (of course)!

Please vote for Liberty BASIC! To vote all you need to do is follow
this link:
http://www.isidor-awards.com/vote.html?productid=2466

Then just enter your email address and click on Submit!

Thanks for your vote!

-Carl

#15638 From: Alyce Watson <alycewatson@...>
Date: Sun Jun 1, 2003 11:04 pm
Subject: Re: Programming Ideas for a newbie
alyce_dubya
Send Email Send Email
 
At 05:00 PM 6/1/2003 -0500, you wrote:
>I've been playin around with some programs ive made but does anyone have
>any ideas that i could make for a program?
>Thnx,
>Brendan


Some good ideas are listed here:
http://libertybasic.conforums.com/index.cgi?board=contests&action=display&num=10\
53959028

#15639 From: "J. Brossman" <jbross@...>
Date: Mon Jun 2, 2003 12:27 am
Subject: Re: Vote for Liberty BASIC in this year's Isidor Award
jbross38
Send Email Send Email
 
At the risk of being not being too funny, I hope LB doesn't become so
popular that Microsoft will buy Carl out, come out with Visual Basic
Lite for a year and then stop supporting it altogether.  It has happened
with other programs like Generic Cadd and AutoCadd. ;-)

carlgundel wrote:

> At the risk of being pushy, I'm reposting this message and urging
> anyone who hasn't voted for Liberty BASIC in this year's Isidor
> Awards to go and vote.  The deadline for voting is tomorrow, but
> don't wait... vote now to give Liberty BASIC a chance at being
> promoted in major magazines!


--
Jim & Jan Brossman - Sno-Dragon Siberians - Durango, Colorado
Show Secretary Web Site - http://users.sisna.com/jbross/showsec.html
Brossman Family Tree Web Site - http://users.sisna.com/jbross
This e-mail certified virus free by Norton Anti Virus

#15640 From: Doyle Whisenant <mechanic@...>
Date: Mon Jun 2, 2003 12:31 am
Subject: Re: Re: Getting the current path of the file being run
mechanicjenn
Send Email Send Email
 
carlgundel wrote:

>--- In libertybasic@yahoogroups.com, Doyle Whisenant <mechanic@s...>
>wrote:
>
>
>>Funny, why doesn't LB3.xx have a chdir$ (change directory)
>>
>>
>command? (Or
>
>
>>have I missed it?)
>>
>>
>
>It doesn't have one.  Maybe I'm missing something, but why do you
>need it?
>

Ah, I see you no longer need to change to a working dir to run a tkn
file! Sorry, haven't tried this in a while. I know you used to have to
open a file in the "working" directory in order for LB to find the path
of a tkn file in the same directory if the file(s) wasn't in the default
LB directory.

Sorry for the confusion! ;-)



--
Doyle Whisenant
"mechanic" at "sonet" dot "net"

#15641 From: "Dave Thomas" <tknsoft2002@...>
Date: Mon Jun 2, 2003 1:18 am
Subject: Re: changes to prime/factor functions
tknsoft2002
Send Email Send Email
 
> And your factors function doesn't return factors for prime numbers,
> probably because of the same rounding error.

  Actually, I intended not to show the factors of the primes -
always 1 and the number itself you know!

  Dave Thomas

#15642 From: "Tom Nally" <steelweaver52@...>
Date: Mon Jun 2, 2003 1:51 am
Subject: Issue #109, The Liberty BASIC Newsletter!
steelweaver52
Send Email Send Email
 
Ladies and Gents:

Issue #109 of the Liberty BASIC Newsletter has now been posted to
two locations. You may download it or read it at one of the
following locations:

http://babek.info/libertybasicfiles/lbnews/nl109/Home.htm

or

http://groups.yahoo.com/group/lbnews/files

In a short time, the NL109 will also be available at the Liberty
BASIC University site.

Feature articles in this issue:

Blast from the past - Looking Back Three Years: NL74 and NL75
Beginning Game Programming - by Richard Ryles
Differential Equations - by Ingemar Bjerle
Browsing and Exploring a Folder - By Alyce Watson
Flash-O-Rama! - by Tom Nally
Beginning Programming Part IV - by Brad Moore
Four Methods for Drawing Arcs - compiled by Tom Nally

Also, look for "Not In This Issue" and "Deja Vu All Over Again".

Editor's Notes:

Once again, I like to start the feature section of the issue by
firing up the time machine to look back at the Liberty BASIC
Newsletter a few years ago. In Blast from the past, we look at NL74
and NL75, which were published in June of 2000. At that time, only
betas of LB2 had been released. None-the-less, the open source
editor was undergoing revisions in order to identify the new
capabilities of LB2. Read also about the fact that NL75 was the
first issue to discuss the creation of help files for your Liberty
BASIC applications. Oasis SE, a help authoring system discussed by
Alyce in NL75, is still available on the web [here].

Following Blast, Richard Ryles produces a nice game programming
tutorial for beginners. Richard starts the tutorial by creation of a
game outline, and takes the student all the way through sprite
display in this very detailed article. This article is rich in
screen shots and command examples. I'm sure you will agree that
Richard's teaching experience has served him well. Game programmers
out there, it will serve you well, too!

A special article follows Richard's game tutorial. In Differential
Equations, Ingemar Bjerle provides a math lecture on the use of
Liberty BASIC to solve differential equations using the Euler and
the Runge Kutta methods.

I must admit: Ingemar's lecture is a little beyond my understanding
at this point. As I explained to him, however, I thought it was
important that we placed his creative work on the record. The
computing community must know the serious tasks of which Liberty
BASIC is capable. Plus, Ingemar's program just produces fascinating
output, as you can see by the screenshot on the right. Have at it,
math wizzes!

Alyce Watson, the master of the Windows API, follows with an article
on Browsing and Exploring a Folder. Though the API calls are
complicated, Alyce provides clear, step-by-step examples, as well as
an entire sample program. Thanks, Alyce! Your contributions are
consistently useful and well crafted!

Also in this newsletter, you may stumble across Flash-O-Rama!, my
Flash Card program. It's main strength is that creating and browsing
flash cards are done in the same mode. Flash-O-Rama also has its own
compiled html help file, which I created with HelpBlocks, available
at [http://www.helpblocks.com]. The Flash-O-Rama zip archive comes
with two sample flash card stacks: one is a Liberty BASIC quiz, and
the other is a set of trivia questions on the history of computing.

If you read his posts on the bulletin board, you'll agree that Brad
Moore is a valuable asset to all LB programmers. But Brad is
particularly helpful to beginners! In this issue, Brad continues his
beginning programming series with Beginning Programming Part IV.
Needless to say, there are lots of goodies in Brad's four-part
article. If there is an element common to all parts, it might be the
importance of learning the Liberty BASIC string functions: how do
you parse strings; how do you convert from strings to values (and
vice versa). Brad ends his article with a discussion of two-
dimensional arrays, which provides a neat seguey into whatever Brad
discusses next!

Before you run to the refrigerator, take a look at Four Methods for
Drawing Arcs in Liberty BASIC. Watson, Drake, Nally and Amaya all
provided contributions to this article. Friends, isn't that the mark
of a rich development environment that it allows you many different
ways to accomplish a task? I think so.

#15643 From: Chergarj@...
Date: Sun Jun 1, 2003 9:54 pm
Subject: Re: Vote for Liberty BASIC in this year's Isidor Award
gjosefc
Send Email Send Email
 
In a message dated 06/01/2003 5:27:14 PM Pacific Daylight Time,
jbross@... writes:
> At the risk of being not being too funny, I hope LB doesn't become so
> popular that Microsoft will buy Carl out, come out with Visual Basic
> Lite for a year and then stop supporting it altogether.  It has happened
> with other programs like Generic Cadd and AutoCadd. ;-)
>

This is something we should all worry about.  LB has allowed me to do some
things, I wish I could have done both when I was still in school (university)
and when I worked industrially.  We do not want a big company to basically take
it all away from us as a so-called corporate progress.  We do not want Visual
BASIC....We want and like Liberty BASIC because we can do things in a more
straight forward manner, it's smaller, and less expensive than VB.

G   C


[Non-text portions of this message have been removed]

#15644 From: libertybasic@yahoogroups.com
Date: Mon Jun 2, 2003 5:04 am
Subject: New file uploaded to libertybasic
libertybasic@yahoogroups.com
Send Email Send Email
 
Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the libertybasic
group.

   File        : /lbtrytow.zip
   Uploaded by : pbclay <pbclay@...>
   Description : demo tri towers game (very rough draft) but functional

You can access this file at the URL

http://groups.yahoo.com/group/libertybasic/files/lbtrytow.zip

To learn more about file sharing for your group, please visit

http://help.yahoo.com/help/us/groups/files

Regards,

pbclay <pbclay@...>

#15645 From: "midi_boink" <NoteJam@...>
Date: Mon Jun 2, 2003 7:43 am
Subject: Piano4.bas added keyboard layouts.
midi_boink
Send Email Send Email
 
I have added keyboard layouts to Alyce's Piano4.bas program.

This gives you a keyboard starting at the low end with z key,
and then a second keyboard starting with the q key.

You should have the caps lock key off to use this.
Nothing much will play with caps lock on.  Might add functions on
those keys, or maybe will get around to mapping them to the same
keyboards.


This program is an example contributed by Liberty BASIC community
'member Alyce Watson!
'piano4.bas - a cool piano that uses Windows' built-in MIDI
synthesizer
'plays one note at a time on channel 1 (channel 1 = 144)
'allows selection from 128 MIDI voices
'
'run this code from LB folder, piano bmp is in LB bmp folder

NoMainWin

[initVariables]
     note=0                  'will contain value for note
     BLACK=0                 'color value for black keys
     WHITE=hexdec("FFFFFF")  'color value for white keys


     WindowWidth=640:WindowHeight=240
     UpperLeftX=10:UpperLeftY=10

         Dim kt(128) 'lower case key to midi note lookup table

     'lower keyboard

     kt(122)=48 'C
     kt(115)=49 'C#
     kt(120)=50 'D
     kt(100)=51 'D#
     kt(99)=52  'E
     kt(118)=53 'F
     kt(103)=54 'F#
     kt(98)=55  'G
     kt(104)=56 'G#
     kt(110)=57 'A
     kt(106)=58 'A#
     kt(109)=59 'B
     kt(44)=60  'C
     kt(108)=61 'C#
     kt(46)=62  'D
     kt(59)=63  'D#
     kt(47)=64   'E

     'Upper keyboard

     kt(113)=65   'F
     kt(50)=66    'F#
     kt(119)=67   'G
     kt(51)=68   'G#
     kt(101)=69   'A
     kt(52)=70   'A#
     kt(114)=71   'S
     kt(116)=72   'C
     kt(54)=73  'C#
     kt(121)=74   'D
     kt(55)=75   'D#
     kt(117)=76   'E
     kt(105)=77   'F
     kt(57)=78   'F#
     kt(111)=79   'G
     kt(48)=80   'G#
     kt(112)=81   'A
     kt(45)=82  'A#
     kt(91)=83   'B
     kt(93)=84   'C
     Dim ins$(128)   'names of instruments

     'read instrument name data into array for combobox
     For vc = 0 to 127
         Read data$
         ins$(vc)=data$
     Next vc

     'combobox index is 1-based, instrument voices are 0-based
     instrum=1 'select first instrument voice
     voice=0   'voice 0 = instrum 1

     msg$="To play the piano, click the keys with your mouse " _
     +"or type on keyboard. Select a voice from the combobox."


[windowSetup]
     Button #p.default, "Close",[quit],UL,520,15,96,30
     Statictext #p, "Select Instrument",15,5,200,20
     Combobox #p.ins, ins$(,[instrument],15, 25, 220,400
     Graphicbox #p.g, 15, 70,600,100
     Statictext #p.vol, msg$,15,180,550,40

Open "Electronic Piano" For Window_nf As #p

     LoadBmp "piano","bmp\piano.bmp"

     #p.g   "down;drawbmp piano 0 0;flush"
     #p.g   "setfocus; when leftButtonDown [newNote]"
     #p.g   "when leftButtonUp [endNote]"
     #p.g   "when leftButtonMove [moveNote]"
     #p.g   "when characterInput [keyNote]"
     #p.ins "select Grand Piano"
     #p     "trapclose [quit]"

     Wnd=hWnd(#p.g)  'handle of graphicbox
     'get device context for graphicbox
     CallDLL #user32, "GetDC",_
         Wnd As long,  hDC As long

     'open midi device and obtain handle
     'midi functions return 0 if successful
     struct m, a$ As ptr
     CallDLL #winmm, "midiOutOpen",_
         m As struct,-1 As long,0 As long,_
         0 As long,0 As long,ret As long

     hMidiOut=m.a$.struct    'handle to midi device
     Wait

[quit]'stop note, close midi device, DLLs, window
     timer 0
     UnloadBmp "piano"
     gosub [stopPlay]   'stop all output
     CallDLL #winmm, "midiOutClose", hMidiOut As ulong,_
         ret As ulong

     CallDLL#user32,"ReleaseDC",_
         Wnd As long,hDC As long,result As long
     Close #p
     End


[instrument]'user selected an instrument voice
     #p.ins "selectionindex? instrum"
     #p.g   "setfocus"
     gosub [doChange]   'change voice
     Wait


[newNote] 'mouse clicked to start new note
     gosub [stopNote]   'stop previous note
     gosub [findNote]   'set new note value
     note=mnote         'set note to match piano key clicked by mouse
     gosub [playNewNote]'play new note
     Wait


[moveNote]'mouse moved while button was down
           'determine if it has moved to new note
           'and if it has, stop old note and sound new note
     gosub [findNote]         'set note value
     if mnote=note then wait  'mouse is on same key, do nothing
     gosub [stopNote]         'stop previous note
     note=mnote               'set note to match piano key clicked by
mouse
     gosub [playNewNote]      'play new note
     Wait


[keyNote]   'a keyboard key was pressed
     gosub [stopNote]      'stop previous note
     gosub [findKeyNote]   'set new note value
     gosub [playNewNote]   'play new note
     timer 1000, [cutOff]  'to stop notes played by typing on keyboard
     wait


[cutOff]'stop note played by typing on keyboard
     gosub [stopNote]
     wait


[endNote]'stop note when mouse button is released
     gosub [stopNote]
     Wait


'GOSUBS:
[findKeyNote]'determine a note based on keyboard key pressed
     k = asc(Inkey$)
     note=kt(k)

     'select case
    ' case  (k>96) and (k<123)
     '    note=k-50   'lowercase letters
     'case (k>64) and (k<91)
     '    note=k-18   'uppercase letters
     'case else
     '    note=48     'non-alpha key
     'end select
     RETURN


[playNewNote]'play new note:
     gosub [stopNote]
     event=144   'event 144 = play on channel 1
     low=(note*256)+event
     velocity=127
     hi=velocity*256*256
     dwMsg=low+hi
     CallDLL #winmm, "midiOutShortMsg",hMidiOut As ulong,_
         dwMsg As ulong, ret As ulong
     RETURN


[stopNote]'stop note from playing
     timer 0
     event=144    'event 144 = play on channel 1
     low=(note*256)+event
     hiZero=0     'stop note from sounding by setting velocity to 0
     dwMsg=low+hiZero
     CallDLL #winmm, "midiOutShortMsg",hMidiOut As ulong,_
         dwMsg As ulong, ret As ulong
     #p.g "setfocus; when characterInput [keyNote]"
     RETURN


[stopPlay]'stop all notes from playing
     event=128    'event 128 = stop play
     low=(note*256)+event
     dwMsg=low+hi
     CallDLL #winmm, "midiOutShortMsg",hMidiOut As ulong,_
         dwMsg As ulong, ret As ulong
     timer 0
     RETURN


[doChange]'signal a voice change:
     event=192  'event 192 = change
     voice=instrum-1
     velocity=255
     low=(voice*256)+event
     hi=velocity*256*256
     dwMsg=low+hi
     CallDLL #winmm, "midiOutShortMsg",hMidiOut As ulong,_
         dwMsg As ulong, ret As ulong
     RETURN


[findNote]'determine piano key pressed by mouse to set note
           'note value will be in mnote
     MX=MouseX:MY=MouseY

     CallDLL #gdi32, "GetPixel",hDC As long,_
         MX As long,MY As long,keyColor As long

     If keyColor=BLACK Then  'black keys
         If MX<=54  Then mnote = 49 : RETURN  'c#
         If MX<=97  Then mnote = 51 : RETURN  'd#
         If MX<=183 Then mnote = 54 : RETURN  'f#
         If MX<=226 Then mnote = 56 : RETURN  'g#
         If MX<=266 Then mnote = 58 : RETURN  'a#
         If MX<=354 Then mnote = 61 : RETURN  'c#
         If MX<=397 Then mnote = 63 : RETURN  'd#
         If MX<=483 Then mnote = 66 : RETURN  'f#
         If MX<=527 Then mnote = 68 : RETURN  'g#
         If MX<=566 Then mnote = 70 : RETURN  'a#
         return
     end if
     if keyColor=WHITE then  'white keys
         If MX<=43  Then mnote = 48 : RETURN  'c
         If MX<=86  Then mnote = 50 : RETURN  'd
         If MX<=129 Then mnote = 52 : RETURN  'e
         If MX<=172 Then mnote = 53 : RETURN  'f
         If MX<=215 Then mnote = 55 : RETURN  'g
         If MX<=258 Then mnote = 57 : RETURN  'a
         If MX<=300 Then mnote = 59 : RETURN  'b
         If MX<=343 Then mnote = 60 : RETURN  'c
         If MX<=386 Then mnote = 62 : RETURN  'd
         If MX<=429 Then mnote = 64 : RETURN  'e
         If MX<=472 Then mnote = 65 : RETURN  'f
         If MX<=515 Then mnote = 67 : RETURN  'g
         If MX<=558 Then mnote = 69 : RETURN  'a
         If MX<=600 Then mnote = 71 : RETURN  'b
         return
    End If
    RETURN


'list of 128 voices, in order of their MIDI indexes
Data "Grand Piano","Bright Grand","Electric Grand","Honky Tonk"
Data "Rhodes","Chorus Piano","Harpsichord","Clavinet"
Data "Celesta","Glockenspiel","Music Box","Vibraphone"
Data "Marimba","Xylophone","Tubular Bells","Dulcimer"
Data "Hammond Organ","Percussion Organ","Rock Organ"
Data "Church Organ","Reed Organ","Accordian","Harmonica"
Data "Tango Accordian","Accoustic Nylon Guitar"
Data "Accoustic Steel Guitar","Electric Jazz Guitar"
Data "Electric Clean Guitar","Electric Mute Guitar"
Data "Overdrive Guitar","Distorted Guitar","Guitar Harmonic"
Data "Accoustic Bass","Electric Bass Finger","Electric Bass Pick"
Data "Fretless Bass","Slap Bass One","Slap Bass Two"
Data "Synth Bass One","Synth Bass Two","Violin","Viola","Cello"
Data "Contrabass","Tremolo Strings","Pizzicato Strings"
Data "Orchestra Harp","Timpani","String Ensemble One"
Data "String Ensemble Two","Synth Strings One","Synth Strings Two"
Data "Choir Ahhs","Voice Oohs","Synth Voice","Orchestra Hit"
Data "Trumpet","Trombone","Tuba","Mute Trumpet","French Horn"
Data "Brass Section","Synth Brass One","Synth Brass Two"
Data "Soprano Sax","Alto Sax","Tenor Sax","Bari Sax","Oboe"
Data "English Horn","Bassoon","Clarinet","Piccolo","Flute"
Data "Recorder","Pan Flute","Bottle Blow","Shakuhachi","Whistle"
Data "Ocarina","Square Wave","Sawtooth","Caliope","Chiff Lead"
Data "Charang","Solo Synth VX","Brite Saw","Brass and Lead"
Data "Fantasia Pad","Warm Pad","Poly Synth Pad","Space Vox Pad"
Data "Bowd Glas Pad","Metal Pad","Halo Pad","Sweep Pad"
Data "Ice Rain","Sound Track","Crystal","Atmosphere","Brightness"
Data "Goblin","Echo Drops","Star Theme","Sitar","Banjo","Shamisen"
Data "Koto","Kalimba","Bagpipe","Fiddle","Shanai"
Data "Tinkle Bell","Agogo","Steel Drums","Wood Block","Taiko Drum"
Data "Melodic Tom","Synth Drum","Rev Cymbal"
Data "Guitar Fret Noise","Breath Noise","Sea Shore","Bird Tweet"
Data "Phone Ring","Helicopter","Applause","Gunshot"

#15646 From: "William Roggow" <roggowb@...>
Date: Mon Jun 2, 2003 10:04 am
Subject: Re: Piano.bas added one note
roggowb
Send Email Send Email
 
To all

I simply adore Alyce's piano.bas program.  Not only has it caused me to get
into programming again, but it has taught me some (should I say a little)
about MIDI and sound cards.

One of the VERY!!! few things I did not like about the program was that
there was one key missing to finish out the octave.  So I added one.  It is
a simple addition to the program and an alteration to the bitmap.

If anyone is interested, I would be happy to send the bitmap and the changes
or if someone can show me how to do it, I would upload them to a file area
so that all may have access.

e-mail me: roggowb@...  if you are interested.

Bill R.

#15647 From: Alyce Watson <alycewatson@...>
Date: Mon Jun 2, 2003 11:34 am
Subject: Re: Piano.bas added one note
alyce_dubya
Send Email Send Email
 
At 06:04 AM 6/2/2003 -0400, you wrote:
>One of the VERY!!! few things I did not like about the program was that
>there was one key missing to finish out the octave.  So I added one.  It is
>a simple addition to the program and an alteration to the bitmap.

Bill Roggow added a key, midiboink changed the notes associated with
keyboard input... now there ya' go! Demos are put out there for folks to
play with and improve, and it is so nice to see people using this stuff!

-Alyce

Messages 15618 - 15647 of 46469   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help