Search found 115 matches

by CONVERT
Mon Mar 20, 2023 11:41 am
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

Re: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **

BarryG wrote: Mon Mar 20, 2023 11:26 am You didn't disturb for nothing - it was a good lesson for us.
Thanks :)
by CONVERT
Mon Mar 20, 2023 11:41 am
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

Re: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo.

BarryG wrote: Mon Mar 20, 2023 9:50 am Did you ever rename your profile at any time?
No, never. Travail was created as admin, and jeanc as normal user, and the two ones were never renamed.
by CONVERT
Mon Mar 20, 2023 10:56 am
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

Re: GetEnvironmentVariable("USERPROFILE") *** SOLVED ***

I remembered that I run PureBasic_Windows_X64_LTS_6.01_(xxxxxx).exe as admin, in a normal user session.

I uninstall it.

I run again PureBasic_Windows_X64_LTS_6.01_(xxxxxx).exe normally, in a normal user session, waiting for the admin password prompt.

No, it works fine.

Debug ...
by CONVERT
Mon Mar 20, 2023 9:57 am
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

Re: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo.

Of course, all the tests above are done with a normal user session (jeanc).

Purebasic launched with a normal user session seems to run with an admin session.
by CONVERT
Mon Mar 20, 2023 9:14 am
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

Re: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo.

You're right. Debug UserName() gives Travail (the admin one) and it's the same for GetEnvironmentVariable("USERNAME").

RunProgram("CMD") gives an admin windows command, and a direct launch of CMD from Windows gives an user Windows command.

Of course, if I launch from Windows CMD as admin (giving ...
by CONVERT
Sun Mar 19, 2023 9:33 pm
Forum: Coding Questions
Topic: GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **
Replies: 9
Views: 1602

GetEnvironmentVariable("USERPROFILE") does not give the same result as CMD echo. ** SOLVED **

Hello,

Windows 10 last version, Purebasic 6.01

Debug "userprofile=" + GetEnvironmentVariable("USERPROFILE")

gives:
userprofile=C:\Users\Travail

CMD command gives, in the same session, of course:
c:\>echo %USERPROFILE%
C:\Users\jeanc

I am logged as jeanc.

Travail is an admin account ...
by CONVERT
Mon Nov 15, 2021 12:40 pm
Forum: Coding Questions
Topic: HEIC image format
Replies: 14
Views: 4395

Re: HEIC image format

I compiled it, it works fine.

Now, I'll try to understand the minimum to save the original image (not scaled 0.25) into jpeg format.

Thanks a lot, Acreis.
by CONVERT
Fri Nov 12, 2021 10:11 pm
Forum: Coding Questions
Topic: HEIC image format
Replies: 14
Views: 4395

Re: HEIC image format

👍
by CONVERT
Fri Nov 12, 2021 2:22 pm
Forum: Coding Questions
Topic: HEIC image format
Replies: 14
Views: 4395

Re: HEIC image format

because it's more question of Powershell than Purebasic.

And about JuiceboxBuilder-Pro, I speak of it in another public post just before in this discussion.

Nevertheless, find below the private message I sent to JHPJHP:


Sent: Fri Nov 12, 2021 13:14
by CONVERT

Hello JHPJHP, thanks a lot.

Your ...
by CONVERT
Fri Nov 12, 2021 12:23 pm
Forum: Coding Questions
Topic: HEIC image format
Replies: 14
Views: 4395

Re: HEIC image format

Thanks a lot, Dige.

Since this time, I replaced my Purebasic generator of a HTML photo gallery by a little, cheap commercial generator which gives me satisfaction, JuiceboxBuilder-Pro, still continued. It gives a good detection and adaptation of the different platforms and browsers, with easy ...
by CONVERT
Fri Nov 12, 2021 12:17 pm
Forum: Coding Questions
Topic: HEIC image format
Replies: 14
Views: 4395

Re: HEIC image format

Hello JHPJHP,

Thanks a lot for your reply. It's very interesting, and a very good example of coding.

Check PM for more complete answer.
by CONVERT
Fri Apr 30, 2021 5:58 pm
Forum: Coding Questions
Topic: Audio beep @ 192k and 24 bits
Replies: 25
Views: 7537

Re: Audio beep @ 192k and 24 bits

Hello,

When I set "myfreq=220", I have an abort at
PokeA(*WAVBuffer+dataOffset+Ptr,Value & $FF) after the repeat in CreateSineWAV().

When I change the line
*Buffer=AllocateMemory(mydura*myfreq*2)
by
*Buffer = AllocateMemory(44 + (mydura/1000)*sarat * channel * (bitsam / 8))
after InitSound ...
by CONVERT
Mon Mar 02, 2020 5:18 pm
Forum: Coding Questions
Topic: Audio beep @ 192k and 24 bits
Replies: 25
Views: 7537

Re: Audio beep @ 192k and 24 bits

Thanks a lot for this code.

I set mydura to 1000

I set myfreq to 289. It works fine.
I set myfreq to 288. It works fine, but with F5, it says "The debugged executable quit unexpectedly" after a few seconds. The .exe takes somes seconds to quit (hourglass end).
I set myfreq to 285. The same as 288 ...