Search found 56 matches

by KenHorse
May 31, 2023 21:58
Forum: General
Topic: Variables when opening Com port under Windows
Replies: 2
Views: 256

Re: Variables when opening Com port under Windows

Oh right....duh......
(that does work)
by KenHorse
May 31, 2023 18:34
Forum: General
Topic: Variables when opening Com port under Windows
Replies: 2
Views: 256

Variables when opening Com port under Windows

Subject says it all. I've not been able to make it work:

Code: Select all

Dim ComPort As Byte
Dim Baud As Long

ComPort = Command(1)
Baud = Command(2)

Open Com "ComPort:Baud,n,8,1,CS0,DS0" As #1
by KenHorse
Jan 13, 2023 17:27
Forum: Beginners
Topic: Hex constants?
Replies: 17
Views: 2006

Hex constants?

How do I do this?

Code: Select all

Const Test = &H12
Doesn't seem to work
by KenHorse
May 26, 2021 23:56
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

Now all I need to do is figure out how to send a Print statement to /dev/null!
by KenHorse
May 26, 2021 23:33
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

Well...after playing a bit, I found that if I Print Err right after opening the pipe, there is no need for any intervention (no need to press ENTER twice). Go figure.. dim csysname as string dim xfnum as long xfnum = freefile() open pipe "/usr/sbin/asterisk -rx 'rpt showvars 1100'" for inp...
by KenHorse
May 26, 2021 22:54
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

I have no control over the binary I'm calling (/usr/sbin/asterisk).

I can filter the stuff but the question I have is, as it requires hitting "ENTER" to step past the 1st 2 returns "^[[23;1R
^[[23;1R), how do I tell my program to step past those lines?
by KenHorse
May 26, 2021 19:16
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

Still have to step through the first 2 lines (hit ENTER). Looks like some high order ASCII? (I changed the print line to: ? "Data From ASL " ; csysname) ^[[23;1R ^[[23;1R Data From ASL Variable listing for node 1100: Data From ASL RPT_TXKEYED=0 Data From ASL RPT_NUMLINKS=2 Data From ASL RP...
by KenHorse
May 26, 2021 15:52
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

For reference, here's what the called program returns when run by itself: Variable listing for node 1100: RPT_ETXKEYED=0 RPT_RXKEYED=0 RPT_TXKEYED=0 RPT_NUMLINKS=2 RPT_LINKS=2,T1101,T1102 RPT_NUMALINKS=2 RPT_ALINKS=2,1101TU,1102TU RPT_AUTOPATCHUP=0 -- 8 variables When I try the open pipe idea (I had...
by KenHorse
May 26, 2021 14:48
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

Correct. I need to parse several lines of the returned data from the called program.
by KenHorse
May 26, 2021 5:47
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

Linux (Raspian Buster) not Windoze
by KenHorse
May 26, 2021 1:54
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Re: Return information from a Shell

I'd rather not as I'd be writing to an SD card and I need to call this routine pretty frequently (at least several times a minute)
by KenHorse
May 26, 2021 0:21
Forum: Beginners
Topic: Return information from a Shell
Replies: 17
Views: 2111

Return information from a Shell

I need to execute a shell command (from within FreeBASIC of course) that returns multiple lines of data but it seems I can only have an exit code returned?
by KenHorse
Feb 08, 2021 0:47
Forum: General
Topic: Overflow in constant conversion
Replies: 2
Views: 472

Re: Overflow in constant conversion

That appears to be it - I needed to use UByte

(Old habits are hard to break!)

Thanks
by KenHorse
Feb 08, 2021 0:36
Forum: General
Topic: Overflow in constant conversion
Replies: 2
Views: 472

Overflow in constant conversion

I keep receiving this compile error

Code: Select all

Dim ISDType As Byte
Dim ISDSeconds As Byte

If ISDType = 1 Then
	ISDSeconds = 128   <-----error is thrown on this line
Else
	ISDSeconds = 64
End If
Any value above 127 throws the error. Help?
by KenHorse
Jan 31, 2021 22:49
Forum: General
Topic: FB version of VB format?
Replies: 11
Views: 1339

Re: FB version of VB format?

Thank you!

One more question..

Is there a FB version of REPLACE? To replace a character in a string with another?