Image Painting Demos [Windows only]

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

Re: Image Painting Demos [Windows only]

Post by dodicat »

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: 2958
Joined: Jun 02, 2015 16:24

Re: Image Painting Demos [Windows only]

Post by Tourist Trap »

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: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Image Painting Demos [Windows only]

Post by dodicat »

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

Re: Image Painting Demos [Windows only]

Post by Tourist Trap »

dodicat wrote:Try it again TT, I have just edited the code.
Ahah all ok now, nice flower :)
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Image Painting Demos [Windows only]

Post by counting_pine »

https://freebasic.net/forum/viewtopic.p ... 43#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: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Image Painting Demos [Windows only]

Post by jj2007 »

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

Re: Image Painting Demos [Windows only]

Post by UEZ »

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: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Image Painting Demos [Windows only]

Post by jj2007 »

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 ;-)
Post Reply