Search found 262 matches

by vuott
Monday 28th November 2022 2:58pm
Forum: General
Topic: [Sloved] Convert image back from base64 encoding
Replies: 10
Views: 1485

Re: Convert image back from base64 encoding

...try this command line: :|
Public Sub Form_Open()

  PictureBox1.Image.FromString(FromBase64("Base64_string"))

End
by vuott
Sunday 13th November 2022 8:25pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

AndyGable wrote: Saturday 12th November 2022 5:51pm ... I get a Error message on Bit saying "Unknown Identifier"
Of course, the Bit () function in Gambas does not exist, nor is it a function or class that you have created.

AndyGable wrote: Saturday 12th November 2022 5:51pm So does anyone now the Gambas option for Bit?
What should Bit () do? :|
by vuott
Friday 11th November 2022 3:31pm
Forum: Beginners
Topic: Getting a list of keywords
Replies: 6
Views: 1987

Re: Getting a list of keywords

I point out below the sites and pages, where you can obtain informations on the use of Gambas language. Official website of Gambas: - http://gambas.sourceforge.net/en/main.html Official Wiki of Gambas: - https://gambaswiki.org/wiki Official Mailing List of Gambas: - https://lists.gambas-basic.org/pi...
by vuott
Friday 11th November 2022 12:49pm
Forum: Beginners
Topic: Getting a list of keywords
Replies: 6
Views: 1987

Re: Getting a list of keywords

Hello,
you can use FOR...EACH...NEXT cycle:
Public Sub Main()

  Dim s As String

  For Each s In System.Keywords
    Print s
  Next

End
by vuott
Thursday 10th November 2022 3:45pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

In general , in Gambas to read the value of 1 Byte data-type from a stream (file), you do what I have already indicated, and which I repeat here as a simple practical example: Dim variable_byte As Byte Read #variable_file, variable_byte ...then you compare the numerical value read with those presen...
by vuott
Thursday 10th November 2022 3:33pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

It would seem that you have to read with the instruction "Read" every single Byte that the printer sends you. Read #printer-file-device, variable_BYTE_data-type Often external devices send String values (ASCII characters), but the documentation shows that your printer sends numeric values ...
by vuott
Thursday 10th November 2022 3:15pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

From the on-line documentation, indicated by you: https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=124 it appears that each status is communicated by the printer through 1 Byte. Infact it says: « Each status is 1 byte . » Well, if we take the "Paper sensor status", f...
by vuott
Thursday 10th November 2022 2:52pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

AndyGable wrote: Thursday 10th November 2022 2:46pm

Code: Select all

Ready....
Watching For incoming data from Printer
10100
0
0
1111
I assume that is the printer saying all is well but it is is not in 8 bits
If you delete the Bin () function:
......
Print variable_Byte
what numeric data do you get?
by vuott
Thursday 10th November 2022 2:15pm
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

how do I show the Bin on screen? In general, to convert a numeric value to a binary representation of type string , you can use the native Bin() function: https://gambaswiki.org/wiki/lang/bin You will take care to preliminarily convert the ASCII character to a numeric value using the Asc () functio...
by vuott
Wednesday 9th November 2022 10:59am
Forum: General
Topic: Getting Data from Serial
Replies: 27
Views: 3005

Re: Getting Data from Serial

AndyGable wrote: Wednesday 9th November 2022 9:18am the program recevied the data like this 00000100
Uhmmm...this could be a string of 8 ASCII numeric characters.
Have you tried to read those data as a string?......
Read #RS232Printer, variable_string, 8
Reads 8 bytes as string data- type.