Search found 125 matches

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

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: 1455

"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
Fri Oct 23, 2020 12:00 am
Forum: Announcement
Topic: Google Translate Service
Replies: 22
Views: 10406

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: 1069

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: 1069

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: 1069

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: 1069

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: 2444

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: 2444

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: 2444

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: 2444

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: 2444

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: 2444

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.
by AMpos
Fri Sep 25, 2020 11:56 am
Forum: Coding Questions
Topic: How to know when the mousewheel has stoped?
Replies: 6
Views: 1192

Re: How to know when the mousewheel has stoped?

Hi AMpos, If I understand correctly, I think you're saying that the user draws a "rubber band" style zoom box on the area of the currently displayed image that they wish to expand and you want to know when they're done with the zooming 'frame' so that you can then compute and display the ...
by AMpos
Fri Sep 25, 2020 11:53 am
Forum: Coding Questions
Topic: How to know when the mousewheel has stoped?
Replies: 6
Views: 1192

Re: How to know when the mousewheel has stoped?

Find a solution: OpenWindow(1,0,0,400,400,"Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) CanvasGadget(1,10,10,380,380) Debug "Start" Repeat event=WaitWindowEvent() Select event Case #PB_Event_Gadget Select EventType() Case #PB_EventType_MouseWheel If GetGadgetAttribute(1...