Search found 57 matches

by cbrooks
Tue Aug 07, 2012 12:28 am
Forum: Coding Questions
Topic: TCP/IP Help needed
Replies: 8
Views: 2378

Re: TCP/IP Help needed

I figured it out - at least a work around, in case anyone else is looking

by sending the original msg back, it contains the
ReceiveNetworkData(ClientID, *Buffer, 1000)
msg$= (PeekS(*buffer))

.
.
.
.


SendNetworkString(ClientID, msg$)

[/code]
by cbrooks
Mon Aug 06, 2012 11:10 pm
Forum: Coding Questions
Topic: TCP/IP Help needed
Replies: 8
Views: 2378

Re: TCP/IP Help needed

if this helps, I tried this and it works 50% of the time - but of course I need 100%.

the msg was then received by the client. For some reason, it works half the time. the received character by the client is random.

Code: Select all


For t=0 To 255
SendNetworkString(ClientID, Chr(t))
Next t

by cbrooks
Mon Aug 06, 2012 10:41 pm
Forum: Coding Questions
Topic: TCP/IP Help needed
Replies: 8
Views: 2378

Re: TCP/IP Help needed

I'm using QB64 as the client and PB as the server

The 2 connect np - the client sends msgs to the server np - but the return msg does not appear

When I read the details on SendNetworkString(), I'm thinking I need a null-character to get qb64 to accept it???

What is the null-character? Any other ...
by cbrooks
Mon Aug 06, 2012 10:12 pm
Forum: Coding Questions
Topic: TCP/IP Help needed
Replies: 8
Views: 2378

Re: TCP/IP Help needed

yeah I tried exactly that

SendNetworkString(ClientID, "Got Message")

but the msg never arrives.

any thoughts?
by cbrooks
Mon Aug 06, 2012 9:02 pm
Forum: Coding Questions
Topic: TCP/IP Help needed
Replies: 8
Views: 2378

TCP/IP Help needed

Can anyone help me alter this code so that after a message is received, it sends back a message "Got Message"

thx



If InitNetwork() = 0
MessageRequester("Error", "Can't initialize the network !", 0)
End
EndIf
OpenConsole()
Port = 6800
*Buffer = AllocateMemory(1000)

If CreateNetworkServer(0 ...
by cbrooks
Mon Aug 06, 2012 4:20 pm
Forum: Coding Questions
Topic: Help please - how to create a dll
Replies: 3
Views: 1033

Re: Help please - how to create a dll

thanks. it refers to sqlite - is that the same as mysql? which is what i am using.
by cbrooks
Mon Aug 06, 2012 3:31 pm
Forum: Coding Questions
Topic: Help please - how to create a dll
Replies: 3
Views: 1033

Help please - how to create a dll

Hi all;

This may be a little bit tricky or perhaps easier than I expect.

I have a lot of code written in QB64 that will take me too long to re-write in PB. However, I am making the transition over to PB as I see a lot of advantages for new programs.

Still, I don't want to re-write old code.

So ...
by cbrooks
Sun Aug 05, 2012 11:52 pm
Forum: Coding Questions
Topic: rookie - need file access help
Replies: 12
Views: 1775

Re: rookie - need file access help

thanks - very helpful.
by cbrooks
Sun Aug 05, 2012 11:37 pm
Forum: Coding Questions
Topic: rookie - need file access help
Replies: 12
Views: 1775

Re: rookie - need file access help

since I have 31 variables, this is how i did it:

a$=""
For t=1 To 31
If t=1
a$=d$(t)
EndIf
If t>1
a$=a$+d$(t)
EndIf
If t<30
a$=a$+","
EndIf
Next t
WriteStringN(2,a$)
by cbrooks
Sun Aug 05, 2012 11:31 pm
Forum: Coding Questions
Topic: rookie - need file access help
Replies: 12
Views: 1775

Re: rookie - need file access help

lol... If you have time, seeing how you would write it may help me learn pb a little.

Many thanks
by cbrooks
Sun Aug 05, 2012 11:04 pm
Forum: Off Topic
Topic: heh heh silly me
Replies: 9
Views: 1174

Re: heh heh silly me

will do - thx. This site is very helpful and responsive. thank you!
by cbrooks
Sun Aug 05, 2012 10:54 pm
Forum: Coding Questions
Topic: rookie - need file access help
Replies: 12
Views: 1775

Re: rookie - need file access help

thanks. Now, can you help me write a .csv file in the same format?

in qb64, to WRITE a sequential file with 3 ROWS and 6 COLUMNS of data, I would use:

i.e.
Row1: a, b, c, d, e, f
Row2: a, b, c, d, e, f
Row3: a, b, c, d, e, f


dim d$(6)
open "c:\dir\file.csv" for output as 1
for t=1 to 3
Write #1 ...
by cbrooks
Sun Aug 05, 2012 10:44 pm
Forum: Off Topic
Topic: heh heh silly me
Replies: 9
Views: 1174

Re: heh heh silly me

i found the editor, but not "indentation"
by cbrooks
Sun Aug 05, 2012 10:27 pm
Forum: Off Topic
Topic: heh heh silly me
Replies: 9
Views: 1174

Re: heh heh silly me

thx again - working well so far

quick question - is there a way to get PB to auto-indent for items such as If, For, While etc - for easy viewing?
by cbrooks
Sun Aug 05, 2012 7:14 pm
Forum: Coding Questions
Topic: rookie - need file access help
Replies: 12
Views: 1775

Re: rookie - need file access help

thanks! That worked.

To get rid of the quotes, (in PB the csv is read with quotes around the data)

I tried
Trim (d$(t),Chr(34))

but still I get:

"data"

instead of

data