Search found 24 matches

by stevylake
Sun Mar 28, 2021 4:21 pm
Forum: Coding Questions
Topic: Changing Content-Disposition to be inline
Replies: 0
Views: 1014

Changing Content-Disposition to be inline

Hello,

I found this code on the forum to poke in a bit of HTML code into an email using the PB inbuilt MAIL commands. The code was from several years ago, 2012 I think.

What should happen is that the attachment is shown inline (awesome) as opposed to 'an attachment' (crap).


InitNetwork()
If ...
by stevylake
Thu Mar 25, 2021 11:58 pm
Forum: Coding Questions
Topic: Graphics not showing on window
Replies: 15
Views: 2528

Re: Graphics not showing on window

mk-soft wrote:Do not draw directly on the window. This is no longer supported by OS. Use a CanvasGadget,
I am not drawing as such. It is a normal window with an image gadget.
by stevylake
Thu Mar 25, 2021 11:28 pm
Forum: Coding Questions
Topic: Graphics not showing on window
Replies: 15
Views: 2528

Graphics not showing on window

Occasionally a graphic doesn't show on a window, particularly small dialog windows, because I think it the window creation doesn't appear to have time to process the image.

I have tried putting a delay in the code but this doesn't work.

Is there command I can use to give the window time to fully ...
by stevylake
Sun Mar 07, 2021 9:17 pm
Forum: Coding Questions
Topic: How to tell if a file is executable or not?
Replies: 16
Views: 3283

Re: How to tell if a file is executable or not?

Your question suggests that you are concerned with preventing "attacks" by malware.

Let's see where this thread takes us.
In general, however, other types of files can cause damage in addition to directly executable files.

You have to consider that scripts are also executed under Windows. For ...
by stevylake
Sun Mar 07, 2021 1:23 pm
Forum: Coding Questions
Topic: How to tell if a file is executable or not?
Replies: 16
Views: 3283

Re: How to tell if a file is executable or not?

...where you find a list of all those constants? Are they Microsoft constants or Pure Basic...
They're part of the Microsoft Win32 API, integrated as native constants in Windows versions of PureBasic.

They can be referenced here:
> Microsoft Win32 API Documentation

is it that SCS_64BIT_BINARY ...
by stevylake
Sun Mar 07, 2021 1:07 pm
Forum: Coding Questions
Topic: How to tell if a file is executable or not?
Replies: 16
Views: 3283

Re: How to tell if a file is executable or not?

... some kind of header within a file to determine what type of file it is?
There's a Windows API function for that, actually:

source: Microsoft Win32 API Documentation Procedure.s checkBinaryType(fileName.s)
Protected SCS_64BIT_BINARY = 6
Protected fileExt$ = UCase(GetExtensionPart(fileName ...
by stevylake
Sun Mar 07, 2021 3:29 am
Forum: Coding Questions
Topic: How to tell if a file is executable or not?
Replies: 16
Views: 3283

Re: How to tell if a file is executable or not?

Thanks for the code I just got stuck at this bit.

To call it, read the file data (you don't need to read the entire file, just enough to cover the PE header, 4kb is sufficient), and pass the pointer to that data, as well as the LOF() filesize.

:-)
by stevylake
Sat Mar 06, 2021 11:18 pm
Forum: Coding Questions
Topic: How to tell if a file is executable or not?
Replies: 16
Views: 3283

How to tell if a file is executable or not?

Hello
I was thinking of how to tell if a file is a renamed .exe or other executable file type?
Instead of PossibleVirus.exe it is renamed PossibleVirus.dat.
Or would that not even be a problem as the renamed file could never be run? Unless another program renamed it and ran it maybe.
There must be ...
by stevylake
Sun Feb 21, 2021 12:49 am
Forum: Coding Questions
Topic: So this has got me perplexed
Replies: 5
Views: 975

Re: So this has got me perplexed

OK. Well thanks to a slight change in the error checking offered by infratec it now seems that the sendmail() procedure is failing and the messages are not being sent with my domains in the Createmail() procedure.
by stevylake
Sun Feb 21, 2021 12:38 am
Forum: Coding Questions
Topic: So this has got me perplexed
Replies: 5
Views: 975

Re: So this has got me perplexed

There is no difference in the code except the email address in the AddMailRecipient() procedure.
Anything @gmail.com or @yahoo.com or @outlook.com works wonderfully and I receive the email.
Whack any of my domains in there and the mail gets lost in the ether.
I cannot see where the port or the ...
by stevylake
Sun Feb 21, 2021 12:21 am
Forum: Coding Questions
Topic: So this has got me perplexed
Replies: 5
Views: 975

So this has got me perplexed

This sends an email just fine

If CreateMail(1, "no-reply@gmail.com", "Test")
AddMailRecipient(1, "stevylake@outlook.com",#PB_Mail_To)
SetMailBody(1, "This is the body")
SendMail(1, "chi-node59.websitehostserver.net" , 465 , #PB_Mail_UseSSL , "sales@meatcostings.com", "!????????")
FreeMail(1 ...
by stevylake
Sun Jul 21, 2019 8:36 am
Forum: Coding Questions
Topic: httprequest() not a function
Replies: 2
Views: 909

Re: httprequest() not a function

Solved. Thanks. I wasn't running a too older version just one version (5.62) back but installed the 5.7 version and all good. Thanks again.
by stevylake
Sun Jul 21, 2019 8:27 am
Forum: Coding Questions
Topic: httprequest() not a function
Replies: 2
Views: 909

httprequest() not a function

Hello, I have found several examples on this forum that use the
httprequest() function. It is documented in the online documentation but not on my local documentation.
When I try out the examples my version of purebasic gives an error that the function is not valid. This is the code I copied and ...
by stevylake
Thu Apr 11, 2019 8:00 pm
Forum: Off Topic
Topic: Is SpiderBasic still available?
Replies: 8
Views: 4112

Re: Is SpiderBasic still available?

Sorry being dense. Didn't realise the grey text were links.
by stevylake
Thu Apr 11, 2019 7:18 pm
Forum: Off Topic
Topic: Is SpiderBasic still available?
Replies: 8
Views: 4112

Is SpiderBasic still available?

Is SpiderBasic still available? I can't see a download link on the website.

Thanks