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 46213 - 46242 of 46478   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Messages: Show Message Summaries Sort by Date ^  
#46213 From: "andre.peggion" <andre.peggion@...>
Date: Sun Mar 10, 2013 11:30 am
Subject: Re: [Bulk] PDF file
andre.peggion
Send Email Send Email
 
Thanks for your answer, Stefan.
I read this night at Alyce Watson book "APIs for Liberty BASIC" page 46 a
reference to Liberty Basic's RUN command.
This command made it very simple:

nomainwin
run "c:\Notepad\Notepad++Portable.exe c:\lb\register.txt"
wait
end

or
run "c:\FoxitReaderPortable\FoxitReaderPortable.exe c:\lb\130222_CLS.pdf"

Andre


See http://basic.wikispaces.com/atl for an example of displaying various file
types including PDF in a separate control using the ATL control.
Stefan Pendl


I need to show some PDFs files, calling it from a LB program.
My idea is to save the file location in a random or sequential file,
c:\PDF\file_001.pdf or something like this,  and call it from a LB code.
Some ideas?
thanks
Andre

#46214 From: "RipSaw" <rij4360@...>
Date: Tue Mar 12, 2013 10:56 pm
Subject: Multi Dim Arrays - tutorial
rij4360
Send Email Send Email
 
I am looking for Multi Dim Arrays - tutorial, so once again, I can try
to teach myself

A$(3,3)

A$(3,10)

Arrays.   Where do I begin to look on LB web page?

Kurt

#46215 From: Gary Passmore <garpmore@...>
Date: Wed Mar 13, 2013 1:17 am
Subject: Re: Multi Dim Arrays - tutorial
garpmore
Send Email Send Email
 
Arrays, Variables and DATA
	 * Variables
	 * Arrays
	 * Sorting Arrays
	 * Arrays with More than Two
Dimensions
	 * READ and DATA ...from the world according to GaRPMorE
 

________________________________
  From: RipSaw <rij4360@...>
To: libertybasic@yahoogroups.com
Sent: Tuesday, March 12, 2013 6:56 PM
Subject: [libertybasic] Multi Dim Arrays - tutorial


 

I am looking for Multi Dim Arrays - tutorial, so once again, I can try
to teach myself

A$(3,3)

A$(3,10)

Arrays.   Where do I begin to look on LB web page?

Kurt




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

#46216 From: "gnw1933" <gnw1933@...>
Date: Wed Mar 13, 2013 2:29 pm
Subject: LB 4.04 setup preference
gnw1933
Send Email Send Email
 
start LB editor full screen no problem with a bas file, will-not
open full screen with a tkn file. can someone shed some light ????
GW

#46217 From: "Rod" <rodbird@...>
Date: Wed Mar 13, 2013 3:29 pm
Subject: Re: LB 4.04 setup preference
rod_bird001
Send Email Send Email
 
.tkn files are not designed to be edited, they are tokenised fast starting
files. If you want to edit the application edit the .bas and create a new .tkn.

--- In libertybasic@yahoogroups.com, "gnw1933" <gnw1933@...> wrote:
>
> start LB editor full screen no problem with a bas file, will-not
> open full screen with a tkn file. can someone shed some light ????
> GW
>

#46218 From: Stefan Pendl <pendl2megabit@...>
Date: Wed Mar 13, 2013 6:52 pm
Subject: Re: Multi Dim Arrays - tutorial
pendl2megabit
Send Email Send Email
 
Am 12.03.2013 23:56, schrieb RipSaw:
> I am looking for Multi Dim Arrays - tutorial, so once again, I can try
> to teach myself
>
> A$(3,3)
>
> A$(3,10)
>
> Arrays.   Where do I begin to look on LB web page?
>

The LB help file is your best friend when it comes to LB commands and
syntax.


--
Stefan Pendl
http://stefanpendl.runbasichosting.com/

LB 4.04 Pro ... http://www.libertybasic.com/assist.html
LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

LB Community Wiki .............. http://basic.wikispaces.com/
LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

Books at http://www.lulu.com/ and http://www.amazon.com/
Alyce Watson ... APIs for Liberty BASIC
Carl Gundel .... Beginning Programming with Liberty BASIC

Windows 7 Home Premium 64-bit SP1
AMD Turion X2 RM-70 2GHz, 4GB RAM

#46219 From: Stefan Pendl <pendl2megabit@...>
Date: Wed Mar 13, 2013 6:53 pm
Subject: Re: [Bulk] Re: Multi Dim Arrays - tutorial
pendl2megabit
Send Email Send Email
 
Am 13.03.2013 02:17, schrieb Gary Passmore:
> Arrays, Variables and DATA
>  * Variables
>  * Arrays
>  * Sorting Arrays
>  * Arrays with More than Two
> Dimensions
>  * READ and DATA ...from the world according to GaRPMorE
>

Just to make sure, this is the path to the section in the help file
shipping with LB.


--
Stefan Pendl
http://stefanpendl.runbasichosting.com/

LB 4.04 Pro ... http://www.libertybasic.com/assist.html
LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

LB Community Wiki .............. http://basic.wikispaces.com/
LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

Books at http://www.lulu.com/ and http://www.amazon.com/
Alyce Watson ... APIs for Liberty BASIC
Carl Gundel .... Beginning Programming with Liberty BASIC

Windows 7 Home Premium 64-bit SP1
AMD Turion X2 RM-70 2GHz, 4GB RAM

#46220 From: "Harry" <harrybee99@...>
Date: Wed Mar 13, 2013 10:34 pm
Subject: Closing windows while looping
harrybee99
Send Email Send Email
 
Okay.  I give up.

Apparently clicking the X button (or pressing Alt-F4) while in a loop will not
exit a program until the loop finishes.  I've tried it with every kind of loop I
could thing of.  (See code below.)

Directing - or in the project I'm working on, redirecting - trapclose to
someplace else, whether to a labeled branch, subroutine, or gosub, doesn't do
anything, except in some cases causing a major error on exit, locking up Win7,
and shuttinng off all the power in the city.  (Okay, maybe not the shutting
power thing.)

I've also tried creating my own stop the loop button to - what else? - stop the
loop and exit, to no avail.

Any wisdom would be appreciated.

Harry

CODE ---------------------------------------------------
UpperLeftX = 1
UpperLeftY = 1
open "test" for window as #t
     i = 0
'    for i = 1 to 1000
'        print i
'    next i
'    while i < 1000
'        i = i + 1
'        print i
'    wend
'[loop]
'    i = i + 1
'    print i
'    if i < 1000 then [loop]
'close #t
do
     i = i + 1
     print i
loop while i < 1000
close #t
END
-----------------------------------------------------------------

#46221 From: "Lorne Russell" <lorneokb@...>
Date: Wed Mar 13, 2013 10:43 pm
Subject: Re: Closing windows while looping
lorneokb
Send Email Send Email
 
Put a scan command in the loop

Lorne Russell


From: Harry
Sent: Wednesday, March 13, 2013 3:34 PM
To: libertybasic@yahoogroups.com
Subject: [libertybasic] Closing windows while looping


Okay. I give up.

Apparently clicking the X button (or pressing Alt-F4) while in a loop will not
exit a program until the loop finishes. I've tried it with every kind of loop I
could thing of. (See code below.)

Directing - or in the project I'm working on, redirecting - trapclose to
someplace else, whether to a labeled branch, subroutine, or gosub, doesn't do
anything, except in some cases causing a major error on exit, locking up Win7,
and shuttinng off all the power in the city. (Okay, maybe not the shutting power
thing.)

I've also tried creating my own stop the loop button to - what else? - stop the
loop and exit, to no avail.

Any wisdom would be appreciated.

Harry

CODE ---------------------------------------------------
UpperLeftX = 1
UpperLeftY = 1
open "test" for window as #t
i = 0
' for i = 1 to 1000
' print i
' next i
' while i < 1000
' i = i + 1
' print i
' wend
'[loop]
' i = i + 1
' print i
' if i < 1000 then [loop]
'close #t
do
i = i + 1
print i
loop while i < 1000
close #t
END
----------------------------------------------------------





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

#46222 From: "Jim Hiley" <jim@...>
Date: Wed Mar 13, 2013 11:03 pm
Subject: RE: Closing windows while looping
ccomtas
Send Email Send Email
 
Try adding a SCAN function in the loop.
Without 'scan' the program will not test for other activity.


Jim

-----Original Message-----
From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On
Behalf Of Harry
Sent: Thursday, 14 March 2013 09:34
To: libertybasic@yahoogroups.com
Subject: [libertybasic] Closing windows while looping

Okay.  I give up.

Apparently clicking the X button (or pressing Alt-F4) while in a loop will
not exit a program until the loop finishes.  I've tried it with every kind
of loop I could thing of.  (See code below.)

Directing - or in the project I'm working on, redirecting - trapclose to
someplace else, whether to a labeled branch, subroutine, or gosub, doesn't
do anything, except in some cases causing a major error on exit, locking up
Win7, and shuttinng off all the power in the city.  (Okay, maybe not the
shutting power thing.)

I've also tried creating my own stop the loop button to - what else? - stop
the loop and exit, to no avail.

Any wisdom would be appreciated.

Harry

CODE ---------------------------------------------------
UpperLeftX = 1
UpperLeftY = 1
open "test" for window as #t
     i = 0
'    for i = 1 to 1000
'        print i
'    next i
'    while i < 1000
'        i = i + 1
'        print i
'    wend
'[loop]
'    i = i + 1
'    print i
'    if i < 1000 then [loop]
'close #t
do
     i = i + 1
     print i
loop while i < 1000
close #t
END
-----------------------------------------------------------------



------------------------------------

Yahoo! Groups Links

#46223 From: "Harry" <harrybee99@...>
Date: Thu Mar 14, 2013 2:31 am
Subject: Re: Closing windows while looping
harrybee99
Send Email Send Email
 
Thanks, Jim and Lorne.  Perfect.

--- In libertybasic@yahoogroups.com, "Jim Hiley" <jim@...> wrote:
>
> Try adding a SCAN function in the loop.
> Without 'scan' the program will not test for other activity.
>
>
> Jim
>
> -----Original Message-----
> From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On
> Behalf Of Harry
> Sent: Thursday, 14 March 2013 09:34
> To: libertybasic@yahoogroups.com
> Subject: [libertybasic] Closing windows while looping
>
> Okay.  I give up.
>
> Apparently clicking the X button (or pressing Alt-F4) while in a loop will
> not exit a program until the loop finishes.  I've tried it with every kind
> of loop I could thing of.  (See code below.)
>
> Directing - or in the project I'm working on, redirecting - trapclose to
> someplace else, whether to a labeled branch, subroutine, or gosub, doesn't
> do anything, except in some cases causing a major error on exit, locking up
> Win7, and shuttinng off all the power in the city.  (Okay, maybe not the
> shutting power thing.)
>
> I've also tried creating my own stop the loop button to - what else? - stop
> the loop and exit, to no avail.
>
> Any wisdom would be appreciated.
>
> Harry
>
> CODE ---------------------------------------------------
> UpperLeftX = 1
> UpperLeftY = 1
> open "test" for window as #t
>     i = 0
> '    for i = 1 to 1000
> '        print i
> '    next i
> '    while i < 1000
> '        i = i + 1
> '        print i
> '    wend
> '[loop]
> '    i = i + 1
> '    print i
> '    if i < 1000 then [loop]
> 'close #t
> do
>     i = i + 1
>     print i
> loop while i < 1000
> close #t
> END
> -----------------------------------------------------------------
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

#46224 From: "Harry" <harrybee99@...>
Date: Thu Mar 14, 2013 3:00 pm
Subject: Re: Closing windows while looping
harrybee99
Send Email Send Email
 
And not only was that a perfect solution for closing a loop, but solving that
allowed me to isolate and cure the source of the ugly crash and burn the
application was experiencing.  Thanks again!

--- In libertybasic@yahoogroups.com, "Lorne Russell" <lorneokb@...> wrote:
>
> Put a scan command in the loop
>
> Lorne Russell
>
>
> From: Harry
> Sent: Wednesday, March 13, 2013 3:34 PM
> To: libertybasic@yahoogroups.com
> Subject: [libertybasic] Closing windows while looping
>
>
> Okay. I give up.
>
> Apparently clicking the X button (or pressing Alt-F4) while in a loop will not
exit a program until the loop finishes. I've tried it with every kind of loop I
could thing of. (See code below.)
>
> Directing - or in the project I'm working on, redirecting - trapclose to
someplace else, whether to a labeled branch, subroutine, or gosub, doesn't do
anything, except in some cases causing a major error on exit, locking up Win7,
and shuttinng off all the power in the city. (Okay, maybe not the shutting power
thing.)
>
> I've also tried creating my own stop the loop button to - what else? - stop
the loop and exit, to no avail.
>
> Any wisdom would be appreciated.
>
> Harry
>
> CODE ---------------------------------------------------
> UpperLeftX = 1
> UpperLeftY = 1
> open "test" for window as #t
> i = 0
> ' for i = 1 to 1000
> ' print i
> ' next i
> ' while i < 1000
> ' i = i + 1
> ' print i
> ' wend
> '[loop]
> ' i = i + 1
> ' print i
> ' if i < 1000 then [loop]
> 'close #t
> do
> i = i + 1
> print i
> loop while i < 1000
> close #t
> END
> ----------------------------------------------------------
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

#46225 From: Gary Passmore <garpmore@...>
Date: Sun Mar 17, 2013 4:03 am
Subject: Housekeeping
garpmore
Send Email Send Email
 
Just a thought that occurred to me while doing some memory clearing today.
Possibly this has not occurred to everyone, so I'll pass it on.
 
If you are the kind of careless typist I am, your LB Error.log can grow pretty
large. Every few days I bring it up with Notepad (it is Pinned to my Taskbar
List), set the cursor to the left of the date (in a line I added which says
"Error.log cleared: 'DATE'), press CTRL+SHIFT+END, then F5, then CTRL+S, and
ALT+F4. The log is cleared, and date recorded, the file saved and closed.
 
Similarly, if your LB programs are automatically backed up on RUN, your 'bak'
folder will eventually fill with hundreds of now useless and forgettable files.
I usually keep only the last couple of months' worth or so.
 
Gary
...from the world according to GaRPMorE   

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

#46226 From: Mike Green <mike4612@...>
Date: Mon Mar 18, 2013 4:26 pm
Subject: RE: Housekeeping
green8819
Send Email Send Email
 
Good tip.

I can check the size of of my error.log file thus:
(assuming XXX is the username that I use for my computer).

open "C:\Users\XXX\AppData\Roaming\"+_
"Liberty BASIC v4.04\error.log" for input as #1
lenFile=lof(#1) :lenFile=int(lenFile/1000)
close #1
print lenFile;" KB"
END




To: libertybasic@yahoogroups.com
From: garpmore@...
Date: Sat, 16 Mar 2013 21:03:58 -0700
Subject: [libertybasic] Housekeeping


























       Just a thought that occurred to me while doing some memory clearing today.
Possibly this has not occurred to everyone, so I'll pass it on.



If you are the kind of careless typist I am, your LB Error.log can grow pretty
large. Every few days I bring it up with Notepad (it is Pinned to my Taskbar
List), set the cursor to the left of the date (in a line I added which says
"Error.log cleared: 'DATE'), press CTRL+SHIFT+END, then F5, then CTRL+S, and
ALT+F4. The log is cleared, and date recorded, the file saved and closed.



Similarly, if your LB programs are automatically backed up on RUN, your 'bak'
folder will eventually fill with hundreds of now useless and forgettable files.
I usually keep only the last couple of months' worth or so.



Gary

...from the world according to GaRPMorE



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


















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

#46227 From: "rich_k47" <rkellerk7@...>
Date: Mon Mar 18, 2013 7:45 pm
Subject: Textbox colors, other than default
rich_k47
Send Email Send Email
 
How do you create the color orange to fill a text box

#46228 From: "Jim Hiley" <jim@...>
Date: Mon Mar 18, 2013 9:56 pm
Subject: RE: Textbox colors, other than default
ccomtas
Send Email Send Email
 
From the Help file:

print #handle, "color red(0-255) green(0-255) blue(0-255)"
The second form of color specifies a pure RGB color. This only works with
display modes
greater than 256 colors. To create a violet color for example, mix red and
blue:
print #handle, "color 127 0 127"

Jim


-----Original Message-----
From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On
Behalf Of rich_k47
Sent: Tuesday, 19 March 2013 06:45
To: libertybasic@yahoogroups.com
Subject: [libertybasic] Textbox colors, other than default

How do you create the color orange to fill a text box



------------------------------------

#46229 From: Stefan Pendl <pendl2megabit@...>
Date: Mon Mar 18, 2013 10:22 pm
Subject: Re: Textbox colors, other than default
pendl2megabit
Send Email Send Email
 
Am 18.03.2013 22:56, schrieb Jim Hiley:
>>From the Help file:
>
> print #handle, "color red(0-255) green(0-255) blue(0-255)"
> The second form of color specifies a pure RGB color. This only works with
> display modes
> greater than 256 colors. To create a violet color for example, mix red and
> blue:
> print #handle, "color 127 0 127"
>

Sorry, this is only valid for graphic boxes.

Text boxes offer the ability to change the background color using the
TextboxColor$ variable, which only supports the 16 named colors.

Read more in the help file under "Colors and the GUI" or similar.


--
Stefan Pendl
http://stefanpendl.runbasichosting.com/

LB 4.04 Pro ... http://www.libertybasic.com/assist.html
LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

LB Community Wiki .............. http://basic.wikispaces.com/
LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

Books at http://www.lulu.com/ and http://www.amazon.com/
Alyce Watson ... APIs for Liberty BASIC
Carl Gundel .... Beginning Programming with Liberty BASIC

Windows 7 Home Premium 64-bit SP1
AMD Turion X2 RM-70 2GHz, 4GB RAM

#46230 From: KELLER RICHARD <rkellerk7@...>
Date: Mon Mar 18, 2013 10:29 pm
Subject: RE: Textbox colors, other than default
rich_k47
Send Email Send Email
 
When I try the COLOREXP.bas that came with the product, I get beautiful orange.
But when I try the print #handle you list below, I get No color at all. Lets say
I know it will work, but cant understand why it doesn't.

--- On Mon, 3/18/13, Jim Hiley <jim@...> wrote:

From: Jim Hiley <jim@...>
Subject: RE: [libertybasic] Textbox colors, other than default
To: libertybasic@yahoogroups.com
Date: Monday, March 18, 2013, 5:56 PM
















 









       From the Help file:



print #handle, "color red(0-255) green(0-255) blue(0-255)"

The second form of color specifies a pure RGB color. This only works with

display modes

greater than 256 colors. To create a violet color for example, mix red and

blue:

print #handle, "color 127 0 127"



Jim





-----Original Message-----

From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On

Behalf Of rich_k47

Sent: Tuesday, 19 March 2013 06:45

To: libertybasic@yahoogroups.com

Subject: [libertybasic] Textbox colors, other than default



How do you create the color orange to fill a text box



------------------------------------



























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

#46231 From: "Jim Hiley" <jim@...>
Date: Tue Mar 19, 2013 3:16 am
Subject: RE: Textbox colors, other than default
ccomtas
Send Email Send Email
 
As Stefan pointed out, my answer is not correct for textboxes, only graphic
boxes.

To understand how COLOREXP.BAS works, try this modification.
Each line is drawn with a different color:


     graphicbox #1.graphics, 10, 10, 250, 240
     open "graphics" for window as #1
     print #1.graphics, "size 2 ; down ; fill black"
     for x = 10 to 250 step 2
         mycolor$="255 ";x;" 0 "
         print "mycolor$ = ";mycolor$
         print #1.graphics, "color "; mycolor$
         print #1.graphics, "place 0 "; (x-10); " ; goto 250 "; (x-10)
     next x
     print #1.graphics, "flush"

     wait


Jim


-----Original Message-----
From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com] On
Behalf Of KELLER RICHARD
Sent: Tuesday, 19 March 2013 09:30
To: libertybasic@yahoogroups.com
Subject: RE: [libertybasic] Textbox colors, other than default

When I try the COLOREXP.bas that came with the product, I get beautiful
orange. But when I try the print #handle you list below, I get No color at
all. Lets say I know it will work, but cant understand why it doesn't.

--- On Mon, 3/18/13, Jim Hiley <jim@...> wrote:

From: Jim Hiley <jim@...>
Subject: RE: [libertybasic] Textbox colors, other than default
To: libertybasic@yahoogroups.com
Date: Monday, March 18, 2013, 5:56 PM

       From the Help file:
print #handle, "color red(0-255) green(0-255) blue(0-255)"
The second form of color specifies a pure RGB color. This only works with
display modes
greater than 256 colors. To create a violet color for example, mix red and
blue:
print #handle, "color 127 0 127"

Jim

#46232 From: "David" <ageed18@...>
Date: Wed Mar 20, 2013 2:39 am
Subject: filedialog question?
ageed18
Send Email Send Email
 
With the Code below in the filedialog only a limit listing of names of file can
be list. I would like to have this list not be limited.



  [Main]
    button#149,"LOOK at FILE",[File],UL,10,25
    button#149,"MAKE FILE",[Kmdir],UL,10,75
    button#149,"READ FILE",[Read],UL,10,175
    button#149,"EXIT",[quit],UL,10,700
    open"Set Up"for dialog_fs as #149
    flag149=1
    wait
'---------------------------------------------------------------------
  [File]
   filedialog"Open Code File", "*.bas;.bak",FileName$
'-------------------------------------------------------------------------------\
-------------
  [Kmdir]
   gosub[closeB]
    prompt"What is the Hull ID Number of this Ship   ";HullID$
    if HullID$="" then[NeedID]
    result=mkdir(HullID$)
    goto[Custom]

    [NeedID]
    button#84,"Need Hull ID to Go On",[Kmdir],UL,20,200
    open"Need Hull"for dialog_fs as #84
    flag84=1
    wait

'-------------------------------------------------------------------------------\
--------------

#46233 From: "Sarmed N." <sarmednafi@...>
Date: Wed Mar 20, 2013 3:30 am
Subject: Re: filedialog question?
sarmednafi
Send Email Send Email
 
Use this instead of yours
'----------------------------------------------------------
[File]
filedialog"Open Code File", "*.*",FileName$
'----------------------------------------------------------
 


________________________________
  From: David <ageed18@...>
To: libertybasic@yahoogroups.com
Sent: Wednesday, March 20, 2013 5:39 AM
Subject: [libertybasic] filedialog question?


 
With the Code below in the filedialog only a limit listing of names of file can
be list. I would like to have this list not be limited.

[Main]
button#149,"LOOK at FILE",[File],UL,10,25
button#149,"MAKE FILE",[Kmdir],UL,10,75
button#149,"READ FILE",[Read],UL,10,175
button#149,"EXIT",[quit],UL,10,700
open"Set Up"for dialog_fs as #149
flag149=1
wait
'----------------------------------------------------------
[File]
filedialog"Open Code File", "*.bas;.bak",FileName$
'----------------------------------------------------------
[Kmdir]
gosub[closeB]
prompt"What is the Hull ID Number of this Ship   ";HullID$
if HullID$="" then[NeedID]
result=mkdir(HullID$)
goto[Custom]

[NeedID]
button#84,"Need Hull ID to Go On",[Kmdir],UL,20,200
open"Need Hull"for dialog_fs as #84
flag84=1
wait

'----------------------------------------------------------




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

#46234 From: "Sarmed N." <sarmednafi@...>
Date: Wed Mar 20, 2013 6:09 am
Subject: Re: filedialog question?
sarmednafi
Send Email Send Email
 
The meaning of using asterisk "*" is what ever, or anything could be place
instead asterisk. I learned that easily from C64 user manual.
The question is can we know this easily from MSDN or windows help, without
buying a heavy book, or asking experts like Stefan or Richard!


________________________________
  From: Sarmed N. <sarmednafi@...>
To: "libertybasic@yahoogroups.com" <libertybasic@yahoogroups.com>
Sent: Wednesday, March 20, 2013 6:30 AM
Subject: Re: [libertybasic] filedialog question?


 
Use this instead of yours
'----------------------------------------------------------
[File]
filedialog"Open Code File", "*.*",FileName$
'----------------------------------------------------------
 

________________________________
From: David <ageed18@...>
To: libertybasic@yahoogroups.com
Sent: Wednesday, March 20, 2013 5:39 AM
Subject: [libertybasic] filedialog question?


 
With the Code below in the filedialog only a limit listing of names of file can
be list. I would like to have this list not be limited.

[Main]
button#149,"LOOK at FILE",[File],UL,10,25
button#149,"MAKE FILE",[Kmdir],UL,10,75
button#149,"READ FILE",[Read],UL,10,175
button#149,"EXIT",[quit],UL,10,700
open"Set Up"for dialog_fs as #149
flag149=1
wait
'----------------------------------------------------------
[File]
filedialog"Open Code File", "*.bas;.bak",FileName$
'----------------------------------------------------------
[Kmdir]
gosub[closeB]
prompt"What is the Hull ID Number of this Ship   ";HullID$
if HullID$="" then[NeedID]
result=mkdir(HullID$)
goto[Custom]

[NeedID]
button#84,"Need Hull ID to Go On",[Kmdir],UL,20,200
open"Need Hull"for dialog_fs as #84
flag84=1
wait

'----------------------------------------------------------

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




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

#46235 From: "green8819" <mike4612@...>
Date: Wed Mar 20, 2013 10:28 am
Subject: Re: Textbox Colors, other than default
green8819
Send Email Send Email
 
Not being able to use non-standard colors for Textboxes is one of the
limitations of LB.
However, I can still have nice color combinations by using the 16 standard
colors for TextboxColor$ and ForegroundColor$ (and also BackgroundColor$).
To get maximum contrast, I leave BackgroundColor$ as buttonface, use dark colors
for ForegroundColor$, and light colors for TextboxColor$.
Note that ForegroundColor$ is also the default color for the window. So a
Statictext will use whatever color was used for ForegroundColor$.

'----start code
nomainwin
colour$="black blue brown buttonface cyan darkblue "+_
"darkcyan darkgray darkgreen darkpink darkred green "+_
"lightgray palegray pink red white yellow"
dim clr$(16),oldnr(16)
for x=1 to 16 :clr$(x)=word$(colour$,x) :next

[start]
'get 4 non-repeat random colors for Testbox
for z=1 to 4
[r1]
in$=""
rdm=1+int(rnd(1)*16)
     for y=1 to 16
     if oldnr(y)=rdm then in$="in"
     next
     if in$="in" then [r1]
oldnr(z)=rdm
'print oldnr(z)
Tclr$(z)=clr$(rdm) 'TextboxColor

'get 1 random color for ForegroundColor
rdm=1+int(rnd(1)*16)
Fclr$=clr$(rdm) 'ForegroundColor
next

WindowWidth = 250 :WindowHeight = 280
UpperLeftX=10'int((DisplayWidth-WindowWidth)/2)
UpperLeftY=10'int((DisplayHeight-WindowHeight)/2)

ForegroundColor$= Fclr$
TextboxColor$= Tclr$(1)
textbox #w.tbx1,  10,  10, 220,  40
TextboxColor$= Tclr$(2)
textbox #w.tbx2, 10,  60, 220,  40
TextboxColor$= Tclr$(3)
textbox #w.tbx3, 10, 110, 220,  40
TextboxColor$= Tclr$(4)
textbox #w.tbx4, 10, 160, 220,  40
button #w.chng,"Change",[Change], UL, 90, 210
a$="ForegroundColor$ = "+Fclr$+_
chr$(13)+chr$(10)+"TextboxColor$ = "

open "Textbox Colors" for dialog_nf as #w
#w, "font arial 10 bold" :#w, "trapclose [quit]"
#w.tbx1, a$;Tclr$(1)
#w.tbx2, a$;Tclr$(2)
#w.tbx3, a$;Tclr$(3)
#w.tbx4, a$;Tclr$(4)
#w.chng, "!setfocus"
wait

[Change]
close #w
goto [start]

[quit]
close #w
END

'----end code

#46236 From: Stefan Pendl <pendl2megabit@...>
Date: Wed Mar 20, 2013 9:32 pm
Subject: Re: filedialog question?
pendl2megabit
Send Email Send Email
 
Am 20.03.2013 07:09, schrieb Sarmed N.:
> The meaning of using asterisk "*" is what ever, or anything could be place
instead asterisk. I learned that easily from C64 user manual.
> The question is can we know this easily from MSDN or windows help, without
buying a heavy book, or asking experts like Stefan or Richard!
>

  From the LB help file section of the FILEDIALOG command:

  >>
templateString

This parameter is used as a filter so that only files matching a
wildcard are listed. To view all file types, the templateString is " *.*
" To access multiple extensions in a filedialog, separate the desired
extensions with a semicolon character, like this example, which displays
files with extensions of both BAS and BAK files in the dialog.

    filedialog "Open code file", "*.bas;*.bak", fileName$

Drive and folder information can be included in the template string to
force the filedialog to open in a designated location.

filedialog "Open", "c:\*.txt", fileName$
<<

So I would suggest to read the help file more often and experiment by
changing what is provided.


--
Stefan Pendl
http://stefanpendl.runbasichosting.com/

LB 4.04 Pro ... http://www.libertybasic.com/assist.html
LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

LB Community Wiki .............. http://basic.wikispaces.com/
LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

Books at http://www.lulu.com/ and http://www.amazon.com/
Alyce Watson ... APIs for Liberty BASIC
Carl Gundel .... Beginning Programming with Liberty BASIC

Windows 7 Home Premium 64-bit SP1
AMD Turion X2 RM-70 2GHz, 4GB RAM

#46237 From: "gnw1933" <gnw1933@...>
Date: Thu Mar 21, 2013 8:07 pm
Subject: help with some basice code
gnw1933
Send Email Send Email
 
' Would apreciate help with code

LISTBOX #windowhandle.box, array$(), [action],xpos, ypos, width, height
WindowWidth = 300
WindowHeight =250
BackgroundColor$ = "lightgray"
array$(0) = "2 X 4 X 8 "
array$(1) = "2 X 4 X 10 "
array$(2) = "2 X 4 X 12 "
array$(3) = "0-0-0"
LISTBOX#1.list1, array$(), [Action3], 60, 100, 236, 80
OPEN "SELECT SIZE OF BOX OR 0-0-0" FOR Window AS #1
print #1.list1, "singleclickselect"
print #1,"trapclose [quit]"
WAIT
[Action3]
print #1.list1, "selection?"
input #1.list1, selected3$
CLOSE #1
print "Length 2X4 selected              ";selected3$
end

  'I would like to take selected3$ * by any given number

#46238 From: "Lorne Russell" <lorneokb@...>
Date: Thu Mar 21, 2013 10:04 pm
Subject: Re: help with some basice code
lorneokb
Send Email Send Email
 
'The first line in your code below does nothing as you do not open #windowhandle
- remove it
LISTBOX #windowhandle.box, array$(), [action],xpos, ypos, width, height

WindowWidth = 300
WindowHeight =250
'this will center the window in your display
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)

BackgroundColor$ = "lightgray"
array$(0) = "2 X 4 X 8 "
array$(1) = "2 X 4 X 10 "
array$(2) = "2 X 4 X 12 "
array$(3) = "0-0-0"
LISTBOX#1.list1, array$(), [Action3], 60, 100, 236, 80
OPEN "SELECT SIZE OF BOX OR 0-0-0" FOR Window AS #1
print #1.list1, "singleclickselect"
print #1,"trapclose [quit]"  'you need to add [quit] for this to work - see
below
WAIT

[Action3]
' you can do the input in one line like this
print #1.list1, "selection? selected3$"
'you don't need the input line below
'input #1.list1, selected3$

print "Length 2X4 selected ";selected3$

'if I knew what you wanted to do with the string selected3$ I could put it below
here

wait

[quit]
close #1
end


Lorne Russell


From: gnw1933
Sent: Thursday, March 21, 2013 1:07 PM
To: libertybasic@yahoogroups.com
Subject: [libertybasic] help with some basice code


' Would apreciate help with code

LISTBOX #windowhandle.box, array$(), [action],xpos, ypos, width, height
WindowWidth = 300
WindowHeight =250
BackgroundColor$ = "lightgray"
array$(0) = "2 X 4 X 8 "
array$(1) = "2 X 4 X 10 "
array$(2) = "2 X 4 X 12 "
array$(3) = "0-0-0"
LISTBOX#1.list1, array$(), [Action3], 60, 100, 236, 80
OPEN "SELECT SIZE OF BOX OR 0-0-0" FOR Window AS #1
print #1.list1, "singleclickselect"
print #1,"trapclose [quit]"
WAIT
[Action3]
print #1.list1, "selection?"
input #1.list1, selected3$
CLOSE #1
print "Length 2X4 selected ";selected3$
end

'I would like to take selected3$ * by any given number





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

#46239 From: "Rod" <rodbird@...>
Date: Fri Mar 22, 2013 12:45 pm
Subject: Re: help with some basice code
rod_bird001
Send Email Send Email
 
not sure I understand the question "'I would like to take selected3$ * by any
given number" ?

--- In libertybasic@yahoogroups.com, "gnw1933" <gnw1933@...> wrote:
>
> ' Would apreciate help with code
>
> LISTBOX #windowhandle.box, array$(), [action],xpos, ypos, width, height
> WindowWidth = 300
> WindowHeight =250
> BackgroundColor$ = "lightgray"
> array$(0) = "2 X 4 X 8 "
> array$(1) = "2 X 4 X 10 "
> array$(2) = "2 X 4 X 12 "
> array$(3) = "0-0-0"
> LISTBOX#1.list1, array$(), [Action3], 60, 100, 236, 80
> OPEN "SELECT SIZE OF BOX OR 0-0-0" FOR Window AS #1
> print #1.list1, "singleclickselect"
> print #1,"trapclose [quit]"
> WAIT
> [Action3]
> print #1.list1, "selection?"
> input #1.list1, selected3$
> CLOSE #1
> print "Length 2X4 selected              ";selected3$
> end
>
>  'I would like to take selected3$ * by any given number
>

#46240 From: "Marc Sabau" <marcsabau@...>
Date: Fri Mar 22, 2013 1:06 pm
Subject: Re: help with some basice code
marcsabau...
Send Email Send Email
 
I think that he means selected3$ *(multiplied) by any given number ! =>
val(selected3$)*number.

Cordially,

Marc.




--- In libertybasic@yahoogroups.com, "Rod" <rodbird@...> wrote:
>
> not sure I understand the question "'I would like to take selected3$ * by any
given number" ?
>
> --- In libertybasic@yahoogroups.com, "gnw1933" <gnw1933@> wrote:
> >
> > ' Would apreciate help with code
> >
> > LISTBOX #windowhandle.box, array$(), [action],xpos, ypos, width, height
> > WindowWidth = 300
> > WindowHeight =250
> > BackgroundColor$ = "lightgray"
> > array$(0) = "2 X 4 X 8 "
> > array$(1) = "2 X 4 X 10 "
> > array$(2) = "2 X 4 X 12 "
> > array$(3) = "0-0-0"
> > LISTBOX#1.list1, array$(), [Action3], 60, 100, 236, 80
> > OPEN "SELECT SIZE OF BOX OR 0-0-0" FOR Window AS #1
> > print #1.list1, "singleclickselect"
> > print #1,"trapclose [quit]"
> > WAIT
> > [Action3]
> > print #1.list1, "selection?"
> > input #1.list1, selected3$
> > CLOSE #1
> > print "Length 2X4 selected              ";selected3$
> > end
> >
> >  'I would like to take selected3$ * by any given number
> >
>

#46241 From: "edcxport" <edcxport@...>
Date: Fri Mar 22, 2013 5:50 pm
Subject: loop untill 3 numbers are the same
edcxport
Send Email Send Email
 
Hi,

I am looking for help comparing 3 numbers in a loop. Only if they are equal do I
exit the loop.
Here is what I have so far.

Do Until CSng(CurTemp) = CSng(Temp1MinOld) And CSng(Temp2MinOld)

       DoEvents            ' Yield to other processes.
       Call DelayFor(60)   ' delay for 1 min
       Call readtemp       ' get new current temp
       Call UpdateListBox  ' add the 3 temp readings to screen
    Loop

As part of the read sub number 2 is renamed to number 3, number 1 is renamed to
number 2 and the new reading is number 1.

This loops works only for the 1st 2 numbers, ignores the 3rd value.

Thanks for the help

#46242 From: epankoke@...
Date: Fri Mar 22, 2013 6:58 pm
Subject: Re: loop untill 3 numbers are the same
styskul
Send Email Send Email
 
I'm by no means an LB expert, but something doesn't seem right about your
criteria. If I'm not mistaken, don't you have to do it like this:

Do Until (CSng(CurTemp) = CSng(Temp1MinOld)) And (CSng(CurTemp) =
CSng(Temp2MinOld))




----- Original Message -----
From: "edcxport" <edcxport@...>
To: libertybasic@yahoogroups.com
Sent: Friday, March 22, 2013 1:50:45 PM
Subject: [libertybasic] loop untill 3 numbers are the same






Hi,

I am looking for help comparing 3 numbers in a loop. Only if they are equal do I
exit the loop.
Here is what I have so far.

Do Until CSng(CurTemp) = CSng(Temp1MinOld) And CSng(Temp2MinOld)

DoEvents ' Yield to other processes.
Call DelayFor(60) ' delay for 1 min
Call readtemp ' get new current temp
Call UpdateListBox ' add the 3 temp readings to screen
Loop

As part of the read sub number 2 is renamed to number 3, number 1 is renamed to
number 2 and the new reading is number 1.

This loops works only for the 1st 2 numbers, ignores the 3rd value.

Thanks for the help




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

Messages 46213 - 46242 of 46478   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