Search found 23 matches

by Rjevsky
Sun Sep 10, 2023 6:15 pm
Forum: Coding Questions
Topic: Extract
Replies: 2
Views: 404

Extract

How extract this json to structure and read params "text" and "callback_data"?
{
"chat_id": "123456",
"text": "Hi",
"reply_markup": {
"inline_keyboard": [[
{
"text": "A",
"callback_data": "A1"
},
{
"text": "B",
"callback_data": "C1"
}]
]
}
}


Structure inline_keyboard ...
by Rjevsky
Mon Mar 29, 2021 1:47 pm
Forum: Coding Questions
Topic: Change Header in WebGadget
Replies: 6
Views: 1286

Re: Change Header in WebGadget

fluent wrote:OK, Headers is a Variant parameter.
Thanks! Its work!
by Rjevsky
Mon Mar 29, 2021 12:10 pm
Forum: Coding Questions
Topic: Change Header in WebGadget
Replies: 6
Views: 1286

Re: Change Header in WebGadget


If I remember there is JAVA script to do the job too
which you can run it directly from PB WebGadget
I was unable to find solutions in javascript. But I saw what miracles you demonstrated using winapi.

This is my code opening page from ip adress but not change host in heder. Maby you help me ...
by Rjevsky
Mon Mar 29, 2021 7:38 am
Forum: Coding Questions
Topic: Change Header in WebGadget
Replies: 6
Views: 1286

Re: Change Header in WebGadget

fluent wrote:Do you need to open one page, or several pages on your site?
If it is for just one page I believe I have a solution.
yes, only one page
by Rjevsky
Thu Mar 25, 2021 8:56 am
Forum: Coding Questions
Topic: Change Header in WebGadget
Replies: 6
Views: 1286

Change Header in WebGadget

Hello friends!
I need to use an ip address to open the page, but the web server requires entering the site name. If you change the ip in the header to a name, the page will open successfully.
Is it possible to change the Host value in the header in webgadget?
I need a windows only solution.
by Rjevsky
Mon Jun 01, 2020 1:05 pm
Forum: Coding Questions
Topic: Pack 7zip text file over 4Gb
Replies: 2
Views: 1135

Re: Pack 7zip text file over 4Gb

If I use 7zip archiver then my pack is ok
Image

I tried all the methods of packers from purebasic and there was always an unsuccessful result
by Rjevsky
Mon Jun 01, 2020 8:00 am
Forum: Coding Questions
Topic: Pack 7zip text file over 4Gb
Replies: 2
Views: 1135

Pack 7zip text file over 4Gb

UseLZMAPacker()
; Create the packed file
If CreatePack(0, "mycompressedfiles2.7z")
; add your files
AddPackFile(0, "text_over_4_gb_size.txt", "text_over_4_gb_size.txt")
ClosePack(0)
EndIf

text_over_4_gb_size.txt size is 4 405 088 234 bytes
The result is small size archive with a packed ...
by Rjevsky
Mon Feb 10, 2020 9:47 pm
Forum: Coding Questions
Topic: OpenNetworkConnection limit
Replies: 3
Views: 1550

Re: OpenNetworkConnection limit

16300 is the approximate size of a pool of dynamic ports configured in windows.
I changed this: "netsh int ipv4 set dynamicport start= number num= range " and expanded the number of ports and the number of connections managed to greatly increase.

But I don’t understand why the client program ...
by Rjevsky
Mon Feb 10, 2020 12:24 pm
Forum: Coding Questions
Topic: OpenNetworkConnection limit
Replies: 3
Views: 1550

OpenNetworkConnection limit

Hello! I discovered strange behavior

Global count

Procedure Tcpsrv_connect(param)
Print("connection")
Protected ccontrol_port.l=5555
Protected ccontrol_ip.s="192.168.101.252"
Protected ConnectionID
ConnectionID = OpenNetworkConnection(ccontrol_ip, ccontrol_port)
If ConnectionID
SendStr.s ...
by Rjevsky
Sat Jun 22, 2019 8:33 pm
Forum: Coding Questions
Topic: regex and emoji
Replies: 5
Views: 1757

Re: regex and emoji

Little John wrote: What is the purpose of the marked line?
My suggestion: Remove it and see whether the code then works as desired.
Yes, this is an extra line, but it does not solve the problem.
Little John wrote: 404 Not Found.
Fixed.
by Rjevsky
Sat Jun 22, 2019 6:42 pm
Forum: Coding Questions
Topic: regex and emoji
Replies: 5
Views: 1757

regex and emoji

Hello to all! I have a problem with the code.

If CreateRegularExpression(0, "(.+?)\|(.+?)")
If ExamineRegularExpression(0, " :evil: | :twisted: ")
While NextRegularExpressionMatch(0)
RegularExpressionGroup(0, 1)
If OpenFile(0, "test.txt")
FileSeek(0, Lof(0))
WriteStringN(0 ...
by Rjevsky
Wed Dec 20, 2017 9:45 am
Forum: Tricks 'n' Tips
Topic: PB5.2: ListIcon Group,Order,HeaderIcon,SortArrow,FillColumn
Replies: 5
Views: 3350

Re: PB5.2: ListIcon Group,Order,HeaderIcon,SortArrow,FillCol

Hello! The group crash if ListIconGadget with #PB_ListIcon_GridLines
by Rjevsky
Thu Dec 14, 2017 2:40 pm
Forum: Coding Questions
Topic: Create Resizible Form with SplitterGadget
Replies: 1
Views: 957

Re: Create Resizible Form with SplitterGadget

it seems it's a victory!

Enumeration FormGadget
#Panel_0
#ListIcon_0
#ListIcon_1
#ListIcon_2
#Splitter_0
EndEnumeration


Procedure WinCallback(hWnd, uMsg, WParam, LParam)
Select uMsg
Case #WM_SIZE
width = WindowWidth(0)
height=WindowHeight(0)
; GadgetHeight
Select WParam
Case #SIZE ...
by Rjevsky
Wed Dec 13, 2017 3:38 pm
Forum: Coding Questions
Topic: Create Resizible Form with SplitterGadget
Replies: 1
Views: 957

Create Resizible Form with SplitterGadget

How to make a form with a panel, like in FormDesigner from my code?


Enumeration FormGadget
#Panel_0
#ListIcon_0
#ListIcon_1
#ListIcon_2
#Splitter_0
EndEnumeration


Procedure WinCallback(hWnd, uMsg, WParam, LParam)
Select uMsg
Case #WM_SIZE
width = WindowWidth(0)
height=WindowHeight(0 ...
by Rjevsky
Tue Dec 05, 2017 8:09 am
Forum: Coding Questions
Topic: ffmpeg and stdout
Replies: 8
Views: 4635

Re: ffmpeg and stdout

Im windows user and i make stdread program on AutoIt for ffmpeg. Autoit work great and I did not have any problems!