Search found 391 matches

by normeus
Wed Mar 20, 2024 7:03 am
Forum: Windows
Topic: [Solved] Get REAL logged-in user name
Replies: 6
Views: 357

Re: Get REAL logged-in user name

How about something like this : Define Folder_ID,SFolderLoc.s If SHGetSpecialFolderLocation_(0, $28, @Folder_ID) = 0 ;CSIDL_PROFILE =$28 SFolderLoc.s = Space(#MAX_PATH*2) SHGetPathFromIDList_(Folder_ID, @SFolderLoc) CoTaskMemFree_(Folder_ID) EndIf Debug sFolderLoc Debug StringField(sFolderLoc, 3,&qu...
by normeus
Wed Mar 20, 2024 5:24 am
Forum: Windows
Topic: [Solved] Get REAL logged-in user name
Replies: 6
Views: 357

Re: Get REAL logged-in user name

Would this work:

Code: Select all

Debug GetEnvironmentVariable("USERNAME")
It shows my username but that might be because I am an admin of my computer.

Norm.
by normeus
Thu Mar 14, 2024 11:28 pm
Forum: Coding Questions
Topic: FindMapElement() need a simple pointer example
Replies: 6
Views: 254

Re: FindMapElement() need a simple pointer example

Thank you idle! So this would be an example of the element changing and the usage of the pointer returned by FindMapElement() NewMap Country.s() Country("US") = "United States" Country("FR") = "France" Country("GE") = "Germany" If FindMapEl...
by normeus
Thu Mar 14, 2024 6:10 pm
Forum: Coding Questions
Topic: FindMapElement() need a simple pointer example
Replies: 6
Views: 254

FindMapElement() need a simple pointer example

The example for FindMapElement() should also show the state of the current map element after the command: NewMap Country.s() Country("US") = "United States" Country("FR") = "France" Country("GE") = "Germany" If FindMapElement(Country(), &qu...
by normeus
Thu Mar 14, 2024 5:58 pm
Forum: Feature Requests and Wishlists
Topic: case statements can have the same values?
Replies: 17
Views: 526

Re: case statements can have the same values?

PB is a single pass compiler, here is a simpler example: Select 2 Case 1 Debug "Value = 1" Case 2 Debug "Value = 20" Case 2 Debug "Value = 2" Default Debug "I don't know" EndSelect There might be some switches you can use with the C compiler to look for these ...
by normeus
Tue Mar 12, 2024 11:09 pm
Forum: Coding Questions
Topic: SQLite Problem
Replies: 2
Views: 136

Re: SQLite Problem

The last double quote is in the wrong place: CheckDatabaseUpdate(0, "CREATE TABLE 'servers' ('serverid' INTEGER, 'srvmachinename' TEXT, 'srvOS' TEXT, 'srvIP4' TEXT, 'adminuser' TEXT, 'adminpass' TEXT, 'status' INTEGER Not NULL Default 0, PRIMARY KEY('serverid')") Take a look at blueznl's g...
by normeus
Sat Mar 09, 2024 11:22 pm
Forum: Bugs - IDE
Topic: Is this a Line Continuation Bug?
Replies: 3
Views: 215

Re: Is this a Line Continuation Bug?

Here is a less mind boggling version:

Code: Select all

If ((2 = 21) And 
    (( Not 86) = (a )))
  
the first parenthesis of the 2nd line get's the wrong color

Norm.
by normeus
Sat Mar 09, 2024 11:01 pm
Forum: Coding Questions
Topic: String Gadgets Hiding Themselves
Replies: 2
Views: 120

Re: String Gadgets Hiding Themselves

Change the width of the text gadgets, they are overlapping the other gadgets:

Code: Select all

a1gad=TextGadget  (#PB_Any, 10, 913*s, 15, 24, "A1") ; new width 15
norm
by normeus
Fri Mar 08, 2024 11:04 pm
Forum: General Discussion
Topic: [PB 5.72 x64] - export to PDF question ...
Replies: 6
Views: 302

Re: [PB 5.72 x64] - export to PDF question ...

I think it would look nice if you created the image in memory then loaded the image to a page using pbPDF image from memory command: ;Definition PDF::ImageMemory(ID.i, ImageName.s, *Memory, Size.i, Format.i, X.f=#PB_Default, Y.f=#PB_Default, Width.f=#PB_Default, Height.f=#PB_Default, Link.i=#NoLink)...
by normeus
Thu Mar 07, 2024 2:21 am
Forum: General Discussion
Topic: Finding a bug when Purifier and line numbering doesn't help?
Replies: 24
Views: 865

Re: Finding a bug when Purifier and line numbering doesn't help?

BarryG, At least Hard code oleacc.dll: Global oleacc=OpenLibrary(#PB_Any,"C:\Windows\System32\oleacc.dll") I have 29 different instances of "oleacc.dll" at least 6 of those in "C:\Windows\" under different folders on one of my computers. I think part of it might be from...
by normeus
Tue Mar 05, 2024 12:44 pm
Forum: General Discussion
Topic: Finding a bug when Purifier and line numbering doesn't help?
Replies: 24
Views: 865

Re: Finding a bug when Purifier and line numbering doesn't help?

Are you loading any system DLLs? I remember KCC had a problem with a program that was loading "Oleacc.dll" and it turned out that it was being loaded from an older copy another program in the path had installed. I say this because your program exits on some computers not all of them. Make ...
by normeus
Fri Mar 01, 2024 6:35 pm
Forum: Coding Questions
Topic: Solve 1 Equation with 2 Unknowns
Replies: 23
Views: 729

Re: Solve 1 Equation with 2 Unknowns

Everyone who has answered knows that with the given information there are an infinite number of answers, for any number in y there will be a different number in x and, no number is a wrong answer. If you are sure that the answer is y=10100, it means that there is a 2nd equation that defines a point ...
by normeus
Mon Feb 05, 2024 10:55 pm
Forum: Coding Questions
Topic: Replace paragraph text in Word
Replies: 10
Views: 657

Re: Replace paragraph text in Word

@punak, I do not think you could write an output file to your c: drive from MSWord change the output to a subdirectory in c:\. What do you mean it does not change text in paragraphs? Could you please show an example of a paragraph? IS this a good paragraph? Comate plus IS good. Sometimes I think it ...
by normeus
Tue Jan 30, 2024 3:14 am
Forum: Coding Questions
Topic: PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.
Replies: 3
Views: 385

Re: PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.

To disable debugger uncheck "Use Debugger" from Debugger menu at top ( debugger still runs even if you type "DisableDebugger" ) From help: Syntax DisableDebugger Description This will disable the debugger checks on the source code which follow this command. It doesn't not fully t...
by normeus
Fri Jan 26, 2024 11:19 pm
Forum: General Discussion
Topic: I Couldn't find a PB archive for my OS
Replies: 3
Views: 602

I Couldn't find a PB archive for my OS

GEOS in my opinion the best looking GUI for a C64

Image

Notice the 2nd hole I cut, so I could write on the back of that Floppy disc.

Norm.