Search found 27 matches

by jphoarau
Mon Jan 12, 2026 7:26 pm
Forum: Coding Questions
Topic: Downloading file with different name?
Replies: 7
Views: 401

Re: Downloading file with different name?

Thank you very much. I will test it. It seems more simple that mine.
by jphoarau
Sat Jan 10, 2026 3:55 am
Forum: Coding Questions
Topic: Downloading file with different name?
Replies: 7
Views: 401

[Solved] Re: Downloading file with different name?

I have solved the problem to rename a file. Here is the code below:

Enumeration
#File1
#File2
EndEnumeration

Global *Buffer
Global Length.q

Procedure ReadCallback( Status, Filename$, File, SizeRead )
Select Status
Case #PB_Status_Loaded
*Buffer = ExportFileMemory(#File1)
Length = Lof ...
by jphoarau
Thu Jan 08, 2026 9:39 am
Forum: Coding Questions
Topic: Downloading file with different name?
Replies: 7
Views: 401

Re: Downloading file with different name?

Thank you. I'm going to do that.
by jphoarau
Wed Jan 07, 2026 6:26 am
Forum: Coding Questions
Topic: Downloading file with different name?
Replies: 7
Views: 401

Re: Downloading file with different name?

I have found how to download a file, but I don't know how to rename it. I do that (based on example):


Procedure CreateFileCallback(Status, Filename$, File, SizeRead)
Select Status
Case #PB_Status_Saved

Case #PB_Status_Error

EndSelect
EndProcedure

Procedure ReadFileCallback(Status ...
by jphoarau
Mon Jan 05, 2026 11:46 am
Forum: Coding Questions
Topic: Downloading file with different name?
Replies: 7
Views: 401

Downloading file with different name?

Hello,

I would like to download a file and save it to the user with a different name than the one on the server. I'm doing this:

Procedure OnLeftClick_OK()
If( GetGadgetState( #Checkbox_0 ) = #PB_Checkbox_Checked )
;procedure to download moustique
Debug "Downloading book."
If( ReadFile(0 ...
by jphoarau
Sun Apr 14, 2024 6:03 pm
Forum: Coding Questions
Topic: Debug output failing?
Replies: 4
Views: 5002

Re: Debug output failing?

Thank you munfraid. It gives me an idea. But this is incredible to write such many lines of code for a single timer... In PB it is more simple.
by jphoarau
Fri Apr 12, 2024 2:47 am
Forum: Coding Questions
Topic: Debug output failing?
Replies: 4
Views: 5002

Re: Debug output failing?

munfraid wrote: Thu Apr 11, 2024 7:53 pm In SB use timers instead.
Okay, but in this case, how to make a Timer that only executes once to have the equivalent of Wait(1000) for example? There is RemoveWindowTimer(#Window, Timer), but how to be sure that the next Timer will not be executed before the first one is terminated.Thanks.
by jphoarau
Thu Apr 11, 2024 3:41 pm
Forum: Coding Questions
Topic: Debug output failing?
Replies: 4
Views: 5002

Debug output failing?

In the small piece of code below, the Debug is only displayed at the end of the execution whereas it should be displayed every second. Does anyone know why?
Thanks in advance.

Procedure Wait(milliseconds)
Start = ElapsedMilliseconds()

Repeat
delay = (ElapsedMilliseconds()-Start)
Until (delay ...
by jphoarau
Tue Apr 09, 2024 10:39 am
Forum: Coding Questions
Topic: A question on a small working code.
Replies: 5
Views: 5595

Re: A question on a small working code.

Quin wrote: Mon Apr 08, 2024 3:30 pm You're most certainly not the only one that doesn't understand this. We can run any javascript we want on page load... unless it plays sounds? :?
Yes. Perhaps, one day, I will understand? But for now, I don't even ask myself the question. :D
by jphoarau
Mon Apr 08, 2024 3:08 pm
Forum: Coding Questions
Topic: A question on a small working code.
Replies: 5
Views: 5595

Re: A question on a small working code.


The ability for sounds to play has to be triggered by a user action on the page. This is incredibly annoying, but it's a limitation of the web everywhere. Part of me gets why, but it's still annoying when you're making an application that uses a lot of sounds.

All right. I don't understand why ...