Search found 128 matches

by AMpos
Mon Oct 26, 2020 7:03 pm
Forum: Coding Questions
Topic: "Slow" DirExist
Replies: 5
Views: 1132

Re: "Slow" DirExist

I will give a shot to this "net use..." thing. The real problem is that I don't if the user has selected a normal folder, or a networked one. My idea was disable the "copy" button if destination wasn't available, but perhaps, give them an error msg after copying error is enough. ...
by AMpos
Mon Oct 26, 2020 12:34 pm
Forum: Coding Questions
Topic: "Slow" DirExist
Replies: 5
Views: 1132

"Slow" DirExist

I have made this proc to check if a directory exist or not: Procedure.i DirExist(path.s) If FileSize(path)=-2 ProcedureReturn #True Else ProcedureReturn EndIf EndProcedure Also, I have a "Z:" unit (windows) on my computer: it is a shared folder (another computer through a wifi connection),...
by AMpos
Sat Oct 24, 2020 12:50 am
Forum: Bugs - Windows
Topic: Disabled ButtonImageGadget() not shown OK with JPG files
Replies: 3
Views: 1571

Disabled ButtonImageGadget() not shown OK with JPG files

OpenWindow(0,200,200,200,200,"Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) UseJPEGImageDecoder():UsePNGImageDecoder() i=LoadImage(-1,OpenFileRequester("Choose an JPG or PNG file","","",0)) ButtonImageGadget(0,0,0,80,80,ImageID(i)) ButtonImageGadget(...
by AMpos
Fri Oct 23, 2020 12:00 am
Forum: Announcement
Topic: Google Translate Service
Replies: 19
Views: 3912

Re: Google Translate Service

Hi!

Can you explain me what is your program for?

Thank you.
by AMpos
Wed Oct 21, 2020 4:23 pm
Forum: Coding Questions
Topic: How to send photos to a server?
Replies: 5
Views: 751

Re: How to send photos to a server?

Simply Bluetooth if each guest agrees to wait his turn to send his photos. OR A shared folder (guest account) and a Wi-Fi hotspot (prevent guests from having to use the Internet and speed up transfers) :wink: -Bluetooth: LoL. Could be, but not. And BT is slow... -Shared: not bad if guests on mobile...
by AMpos
Wed Oct 21, 2020 4:18 pm
Forum: Coding Questions
Topic: How to send photos to a server?
Replies: 5
Views: 751

Re: How to send photos to a server?

infratec wrote:Install apache or nginx on the PC setup NextCloud and check the data directory for the incoming pictures.
Too complicated to ask a random guy to install apache on his computer... Thx anyway.
by AMpos
Wed Oct 21, 2020 4:15 pm
Forum: Coding Questions
Topic: How to send photos to a server?
Replies: 5
Views: 751

Re: How to send photos to a server?

Why should the guests transfer the pictures to the internet? They do not have to transfer pictures to the internet. Using internet for this is one of the possible solutions. AS I explained, my client wants to print photos done by the event' guests. Imagine you are on a wedding, you make a photo on ...
by AMpos
Wed Oct 21, 2020 11:42 am
Forum: Coding Questions
Topic: How to send photos to a server?
Replies: 5
Views: 751

How to send photos to a server?

I have a request from a client, and I am not sure how to do it. He have a computer in an event (like a wedding) with a printer. He wants to receive photos by the guests so he can print them. It has to be done as easily as possible. I think it has to be done with spider basic, but I am asking her bec...
by AMpos
Fri Oct 09, 2020 7:40 pm
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

Re: If a>255: a=255?

This is the code: -White can have any value from 0 to 255, with no decimals. It can be a float or a integer. procedure white-gamma(white) gwhite.f=white/255 for n=0 to ALOT If white<>255 ; ### White Point correction r=*red\a*gwhite:If r>255:r=255:EndIf:*red\a=r g=*green\a*gwhite:If g>255:g=255:EndIf...
by AMpos
Fri Oct 09, 2020 12:41 pm
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

Re: If a>255: a=255?

If a is of type Ascii, you will never be able to get a value above 255. It will always overflow. So you condition "a > 255" will never be true. b.a = 100 a.a = 200 a + b Debug a ; shows 44 Well, it works like this without branching, and therefore the prefetching of your CPU can help to ma...
by AMpos
Fri Oct 09, 2020 12:34 pm
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

Re: If a>255: a=255?

Jac de Lad wrote:That's exactly what I said...
Problems of not speaking non-native language. :oops:
by AMpos
Fri Oct 09, 2020 12:18 pm
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

Re: If a>255: a=255?

If you have a byte/ascii variable, and add over 255, then it start again: a.ascii=200+100=300, and a is really 300-256=44, so a=44 so a.ascii=200 a=a+100 if a>255 a=255 endif will never work as the "a.ascii" is a loop between 0 to 255. a.q=200 a=a+100 if a>255 a=255 endif does work. I was ...
by AMpos
Fri Oct 09, 2020 11:30 am
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

Re: If a>255: a=255?

Yeah, I know. If I define "a" as ascii, I will never get a value over 255, so I can't know if it was. In my code (it is an "image color levels / gamma" ), I use this: Protected *red.Ascii, *green.Ascii, *blue.Ascii, x,y,r,g,b,gwhite.f,gblack.f r=*red\a*gwhite:If r>255:r=255:EndIf...
by AMpos
Fri Oct 09, 2020 10:35 am
Forum: Coding Questions
Topic: If a>255: a=255?
Replies: 27
Views: 1607

If a>255: a=255?

Hi!

is there a faster/better method for this?

Code: Select all

a=a+b
if a>255
 a=255
endif
I want to add any valor to "a" (byte/ascii size), and any number greater than 255 crop to 255.