Why does this work? Comments inline
If OpenWindow(0,200,200,300,200,#PB_Window_SystemMenu,"test")
CreateGadgetList(WindowID())
t$="This text goes inside a multiline StringGadget."+Chr(13)+Chr(10)
;a string variable was created -- t$ is equal to the text plus some control characters
;t$ is ...
Search found 21 matches
- Wed Oct 29, 2003 9:55 pm
- Forum: Coding Questions
- Topic: "Word wrap" in multi-line StringGadgets?
- Replies: 5
- Views: 7570
- Wed Oct 29, 2003 9:42 pm
- Forum: Coding Questions
- Topic: "Word wrap" in multi-line StringGadgets?
- Replies: 5
- Views: 7570
Re: "Word wrap" in multi-line StringGadgets?
#ES_AUTOVSCROLL #WS_VSCROLL #WS_HSCROLL #ESB_DISABLE_LEFT #ESB_DISABLE_RIGHT Where do these come from? I tried searching in the help menu for them, but haven't been able to find them yet. Where can I find more information on them?
It seems that autovscroll sets it to automatically scroll ...
It seems that autovscroll sets it to automatically scroll ...
- Wed Oct 29, 2003 12:07 am
- Forum: Coding Questions
- Topic: Program runs subfunction instead of terminating
- Replies: 1
- Views: 1847
Program runs subfunction instead of terminating
Enumeration
#codeco_window
#code_button
#decode_button
#text_close_box
#text_entry_box
#wavelength_box
#wavelength_title
#text_entry_title
#text_display_title
EndEnumeration
Dim code_array.b(95)
Dim alphabet.b(95)
For K = 0 To 94
alphabet(K) = K + 32
Next K
If WindowID = OpenWindow(#codeco ...
#codeco_window
#code_button
#decode_button
#text_close_box
#text_entry_box
#wavelength_box
#wavelength_title
#text_entry_title
#text_display_title
EndEnumeration
Dim code_array.b(95)
Dim alphabet.b(95)
For K = 0 To 94
alphabet(K) = K + 32
Next K
If WindowID = OpenWindow(#codeco ...
- Tue Oct 28, 2003 4:02 am
- Forum: Tricks 'n' Tips
- Topic: Replacement for GOTO command
- Replies: 10
- Views: 5468
Thanks.
I downloaded and installed 3.8, so that I could remove that subfunction and use the Break command instead, but I'm faced with a new problem now. My code no longer works now that I've installed 3.8. You can read my post on it over on the Bug forum. 


- Mon Oct 27, 2003 10:03 pm
- Forum: Tricks 'n' Tips
- Topic: Replacement for GOTO command
- Replies: 10
- Views: 5468
- Mon Oct 27, 2003 9:56 pm
- Forum: Coding Questions
- Topic: help with If . . . command
- Replies: 8
- Views: 2501
- Mon Oct 27, 2003 8:24 am
- Forum: Coding Questions
- Topic: help with If . . . command
- Replies: 8
- Views: 2501
- Mon Oct 27, 2003 6:57 am
- Forum: Coding Questions
- Topic: help with If . . . command
- Replies: 8
- Views: 2501
- Mon Oct 27, 2003 6:01 am
- Forum: Coding Questions
- Topic: PC sounds
- Replies: 5
- Views: 2128
- Mon Oct 27, 2003 5:57 am
- Forum: Coding Questions
- Topic: help with If . . . command
- Replies: 8
- Views: 2501
help with If . . . command
I see a lot of programs written in PureBasic that have If statements that aren't evaluating anything -- mostly those non-evaluating If statements are related to windows and gadgets. If WindowOpen( . . .)
If CreateGadgetList( . . .)
. . .
EndIf
EndIf
I don't understand this syntax. If nothing is ...
If CreateGadgetList( . . .)
. . .
EndIf
EndIf
I don't understand this syntax. If nothing is ...
- Mon Oct 27, 2003 1:59 am
- Forum: Coding Questions
- Topic: input number
- Replies: 1
- Views: 1194
input number
How do I get a number inputted?
I'd like to generate a random number from a number inputted by a user from the console.
user_seed=Input()
RandomSeed(user_seed)
first_random_number=Random(K)
But I receive an error when doing this, as Input() is assumed to be a string. What command should I use ...
I'd like to generate a random number from a number inputted by a user from the console.
user_seed=Input()
RandomSeed(user_seed)
first_random_number=Random(K)
But I receive an error when doing this, as Input() is assumed to be a string. What command should I use ...
- Mon Oct 27, 2003 1:16 am
- Forum: Coding Questions
- Topic: Trouble with arrays
- Replies: 2
- Views: 1993
How to order a singly incremented set of numbers randomly
Thanks! I made some changes (such as fixing the never-ending loop I created), and am posting the corrected version (including my insight into return statements nestled in If/Then loops as replacing GOTO statements) into the Tip's and Trick's forum as Replacement for GOTO command
- Mon Oct 27, 2003 1:14 am
- Forum: Tricks 'n' Tips
- Topic: Replacement for GOTO command
- Replies: 10
- Views: 5468
Replacement for GOTO command
Code updated For 5.20+
This is continued from my previous topic in the Beginner's forum. I'm sure that you people here know this already, but it sure seemed like a great trick to me.
Thanks! :D I made that change and then noticed that I'd created a never-ending loop, as I never again declared do ...
This is continued from my previous topic in the Beginner's forum. I'm sure that you people here know this already, but it sure seemed like a great trick to me.
Thanks! :D I made that change and then noticed that I'd created a never-ending loop, as I never again declared do ...
- Sun Oct 26, 2003 11:41 pm
- Forum: Coding Questions
- Topic: PC sounds
- Replies: 5
- Views: 2128
PC sounds
Anyone have any idea on how to create actual computer sound? Not sound from a sound card, but the beeps of your actual computer box itself. You know, just like those old games that we all used to play a decade ago.
IBM PCs
5 PLAY "o2colb."
TI-99/4A
5 SOUND (500,131,10,123,10)
Radio Shack
5 SOUND ...
IBM PCs
5 PLAY "o2colb."
TI-99/4A
5 SOUND (500,131,10,123,10)
Radio Shack
5 SOUND ...
- Sun Oct 26, 2003 10:41 pm
- Forum: Coding Questions
- Topic: Trouble with arrays
- Replies: 2
- Views: 1993
Trouble with arrays
I'm having a bit of trouble with arrays.
Dim long_array.b(94)
Repeat
do_over=0
For J = 0 To 93
random_number=Random(93) + 1
For K=0 To J
If random_number = long_array(K)
do_over=1
EndIf
Next K
If do_over = 0
random_number = long_array(J)
EndIf
Next J
Until do_over=0
OpenConsole ...
Dim long_array.b(94)
Repeat
do_over=0
For J = 0 To 93
random_number=Random(93) + 1
For K=0 To J
If random_number = long_array(K)
do_over=1
EndIf
Next K
If do_over = 0
random_number = long_array(J)
EndIf
Next J
Until do_over=0
OpenConsole ...