Please excuse my noobness but the only way to do this would be through a call to RunProgram() right?infratec wrote: Sun Aug 21, 2022 10:01 am Simply use libcurl directly and set a timeout of 1 or 2 seconds.![]()
Search found 11 matches
- Mon Aug 22, 2022 3:00 am
- Forum: Coding Questions
- Topic: HTTPRequest Timeout - How to abort the request?
- Replies: 9
- Views: 1121
Re: HTTPRequest Timeout - How to abort the request?
- Mon Aug 22, 2022 2:56 am
- Forum: Coding Questions
- Topic: HTTPRequest Timeout - How to abort the request?
- Replies: 9
- Views: 1121
Re: HTTPRequest Timeout - How to abort the request?
After looking at it I guess the only problem would be if I knew the name of a website but didn't know the name of the homepage and it's extension?
No need to know in advance the name of the root filename (homepage)
ReceiveHTTPFile() will load the default root file (who was set by server)
Set ...
- Sun Aug 21, 2022 4:31 am
- Forum: Coding Questions
- Topic: HTTPRequest Timeout - How to abort the request?
- Replies: 9
- Views: 1121
Re: HTTPRequest Timeout - How to abort the request?
I am struggling to figure out how to abort an unsuccessful HTTPRequest, more specifically one that should time out.
; HTTP_Abort
; Marc56us - 2022/08/20
; Based on sample in PB help (HTTPProgress())
; https://www.purebasic.com/documentation/http/httpprogress.html
; URL$ = "http://www.purebasic ...
- Sat Aug 20, 2022 6:23 am
- Forum: Coding Questions
- Topic: HTTPRequest Timeout - How to abort the request?
- Replies: 9
- Views: 1121
HTTPRequest Timeout - How to abort the request?
Hi,
I am struggling to figure out how to abort an unsuccessful HTTPRequest, more specifically one that should time out. To be clear, it's just a simple GET request to grab the HTML from a website.
For example if I try and run an HTTP GET request on the website test.com, it freezes my program.
I ...
I am struggling to figure out how to abort an unsuccessful HTTPRequest, more specifically one that should time out. To be clear, it's just a simple GET request to grab the HTML from a website.
For example if I try and run an HTTP GET request on the website test.com, it freezes my program.
I ...
- Tue Jul 05, 2022 9:43 pm
- Forum: Coding Questions
- Topic: A literal string can't be bigger than 8192 characters
- Replies: 6
- Views: 2329
Re: A literal string can't be bigger than 8192 characters
If yes, is there a way to retrieve a longer string from DLL procedure ?
Just split it up:
ProcedureDLL.s GetDialogXML()
Global xml.s="<dialog>"+
"......"
xml.s+"......"+
"......"+
"</dialog>"
ProcedureReturn xml
EndProcedure
Thank you for this : )
- Tue Apr 19, 2022 3:18 pm
- Forum: Coding Questions
- Topic: Dynamic variable names in PureBasic?
- Replies: 6
- Views: 1038
Re: Dynamic variable names in PureBasic?
Thanks everyone for the replies, these are great!
I was trying to figure out a way to initialize a variable number of nested Lists/Arrays that are supplied by argument to a Procedure, and could be referenced after creation (by the generated variable names). I could not figure out how to do this ...
I was trying to figure out a way to initialize a variable number of nested Lists/Arrays that are supplied by argument to a Procedure, and could be referenced after creation (by the generated variable names). I could not figure out how to do this ...
- Tue Apr 19, 2022 3:18 am
- Forum: Coding Questions
- Topic: Dynamic variable names in PureBasic?
- Replies: 6
- Views: 1038
Dynamic variable names in PureBasic?
What I mean is where the variable names are generated based on something like a counter. Something like this:
Which would create 10 variables:
Is this possible? Thanks!
Code: Select all
For i = 1 To 10
var_ + i = i
Next
Code: Select all
var_1 = 1
var_2 = 2
...
var_10 = 10
- Thu Apr 14, 2022 4:04 am
- Forum: Coding Questions
- Topic: [SOLVED] ScintillaGadget - Changing font
- Replies: 7
- Views: 2599
Re: ScintillaGadget - Changing font
Yep, got it. (It's been a while since I needed to go through the code)
As a quick fix - I've added.
Global *ASCII_string
Procedure SetASCII_string(unicode.s)
If *ASCII_string
FreeMemory(*ASCII_string)
EndIf
*ASCII_string = AllocateMemory(Len(unicode) + 1)
If *ASCII_string
PokeS(*ASCII ...
- Thu Apr 14, 2022 3:29 am
- Forum: Coding Questions
- Topic: How to change the background color of the Scintilla Gadget? [Resolved]
- Replies: 3
- Views: 601
Re: How to change the background color of the Scintilla Gadget?
ScintillaSendMessage(#Gadget,#SCI_STYLESETBACK,#STYLE_DEFAULT,RGB(255,0,0))
This is great! :D Thank you!
Do you know if it's possible to make the margin disappear in the gadget?
EDIT:
I think I found an answer here: http://forums.purebasic.com/english/viewtopic.php?t=75000
It looks like ...
- Wed Apr 13, 2022 10:16 pm
- Forum: Coding Questions
- Topic: How to change the background color of the Scintilla Gadget? [Resolved]
- Replies: 3
- Views: 601
How to change the background color of the Scintilla Gadget? [Resolved]
Hi everyone,
I'm working on a text editor and would like to use the Scintilla Gadget but am unsure of how to change the background color of the editor. I am able to change the color of the font with #SCI_STYLESETFORE and the font background color with #SCI_STYLESETBACK but that's all I can find ...
I'm working on a text editor and would like to use the Scintilla Gadget but am unsure of how to change the background color of the editor. I am able to change the color of the font with #SCI_STYLESETFORE and the font background color with #SCI_STYLESETBACK but that's all I can find ...
Re: rtf files
This worked for me however every time I undo I hear the system Alert sound. Is there any way to disable this?Danilo wrote: Wed Jul 09, 2014 7:37 pmCode: Select all
CocoaMessage(0,GadgetID(0),"setAllowsUndo:",#YES) ; allow UNDO
![]()
I am using Catalina 10.15.7
Thank you!