Image Painting Demos [Windows only]

Post your FreeBASIC tips and tricks here. Please don’t post your code without including an explanation.
dodicat
Posts: 5701
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Image Painting Demos [Windows only]

Postby dodicat » Feb 08, 2019 15:16

If you are in program files (or the French version), perhaps you'll need double quotes all round.

Code: Select all

 


Sub savefile(filename As String,p As String)
    Dim As Integer n
    n=Freefile
    If Open (filename For Binary Access Write As #n)=0 Then
        Put #n,,p
        Close
    Else
        Print "Unable to save " + filename
    End If
End Sub

savefile( curdir +"\image.jpg","") 'create an empty file

dim as string site=" https://www.noz.de/article/teaser/1395114/full "

shell  "bitsadmin  /transfer new  /download  /priority normal " + _
        site + chr(34) +  curdir + "\image.jpg "+chr(34)
     
 shell chr(34) +curdir +  "\image.jpg" + chr(34)
 sleep
 
   
Tourist Trap
Posts: 2756
Joined: Jun 02, 2015 16:24

Re: Image Painting Demos [Windows only]

Postby Tourist Trap » Feb 08, 2019 15:28

dodicat wrote:If you are in program files (or the French version), perhaps you'll need double quotes all round.

This time the test goes to its end. It still cant dl the file. It can be the proxy or the antivirus, so as I can use a local file with little change I will do with this. Anyway it's a useful test that I'll try to keep in mind in the future.
Thanks.

My output:
Unable to save "C:\Program Files (x86)\FreeBasic\FBIde0.4.6r4\image.jpg"

BITSADMIN version 3.0
BITS administration utility.
(C) Copyright Microsoft Corp.

Unable to add file - 0x80070005
Accès refusé.
dodicat
Posts: 5701
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Image Painting Demos [Windows only]

Postby dodicat » Feb 08, 2019 15:30

Try it again TT, I have just edited the code.
Tourist Trap
Posts: 2756
Joined: Jun 02, 2015 16:24

Re: Image Painting Demos [Windows only]

Postby Tourist Trap » Feb 08, 2019 15:32

dodicat wrote:Try it again TT, I have just edited the code.

Ahah all ok now, nice flower :)
counting_pine
Site Admin
Posts: 6166
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Image Painting Demos [Windows only]

Postby counting_pine » Feb 11, 2019 20:51

viewtopic.php?p=258043#p258043
MrSwiss, we've had a complaint about your posts in this thread, in particular the one above.If you don't like the Windows dependency of the code, that's fine, but the derogatory and unconstructive comments are not welcome, and you've been warned not to do this before. If it happens again, you will face a longer ban than you did last time.

Aside from the rudeness towards UEZ (who has shown commendable patience with you), given the unprompted casual sexism as well, I require that you also edit your post and redact it.
UPDATE: Thanks for editing your post.
jj2007
Posts: 1134
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Image Painting Demos [Windows only]

Postby jj2007 » Feb 11, 2019 21:44

Cute! Downloads work fine, #3 remains black, though.
UEZ
Posts: 312
Joined: May 05, 2017 19:59
Location: Germany

Re: Image Painting Demos [Windows only]

Postby UEZ » Feb 11, 2019 21:48

jj2007 wrote:Cute! Downloads work fine, #3 remains black, though.


Did you pressed the lmb and moved your mouse cursor around?


@counting_pine: thank you for intervention.
jj2007
Posts: 1134
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Image Painting Demos [Windows only]

Postby jj2007 » Feb 11, 2019 23:02

UEZ wrote:
jj2007 wrote:Cute! Downloads work fine, #3 remains black, though.

Did you pressed the lmb and moved your mouse cursor around?

I moved the mouse around, and when I pressed the l, m or b keys, the window closed immediately.
Now I tried again, and I clicked also the mouse: nice lady ;-)

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest