Re: [fpc-pascal] Range Check runtime errors

2020-12-09 Thread James Richters via fpc-pascal
as like that until you pointed it out and I went back to see what you were talking about. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Selecting Records with a variable

2020-12-19 Thread James Richters via fpc-pascal
x27;C' Then Writeln(AxisValue.C); End; I would rather have something like this: Procedure ShowAxis(Axisletter:Char); Begin Writeln(AxisValue.AxisLetter); End; Is there some syntax that would work to select the correct record based on th

Re: [fpc-pascal] Selecting Records with a variable

2020-12-19 Thread James Richters via fpc-pascal
No, this is just a simplified example.. The procedure will be working with dozens of records, so I need a way to call the procedure and specify which element of all the records to use... it will not be called for every element. James -Original Message- From: fpc-pascal On Behalf Of

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread James Richters via fpc-pascal
); Variable3. Y := SomeFormula(Variable4.Y * ScaleFactor.Y); End; ... 7 more times ... ... 70 lines of things that all have a 9 case statements, sometimes I can combine them, most of the time not. ... End; James ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread James Richters via fpc-pascal
Thank you Luca, that will work much better for me! James -Original Message- From: fpc-pascal On Behalf Of Luca Olivetti via fpc-pascal Sent: Sunday, December 20, 2020 10:11 AM To: fpc-pascal@lists.freepascal.org Cc: Luca Olivetti Subject: Re: [fpc-pascal] Selecting Records with a

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread James Richters via fpc-pascal
it cleaner, and the whole project has been changed over in a relatively short amount of time... and now I can start consolidating all those functions and procedures. It was way less work to just change it all to a better structure than it was to work around it. James >I think this is a typical

[fpc-pascal] Reading Serial Hex Data

2020-12-27 Thread James Richters via fpc-pascal
Read serial port Delay the amount of time one byte should take If Byte is received Begin Count:=-0; String:=String+ByteRead; Inc(Bytes_Read); End Else Inc(Count); Until MaxBytesRead Or (Count=2) James _

Re: [fpc-pascal] Reading Serial Hex Data

2020-12-27 Thread James Richters via fpc-pascal
be happening is that I'm I'm using SerRead, it does seem that I never miss anything, it's just that I'm not detecting the end of data accurately if I have writeln's right before I read the serial port. James -Original Message- From: fpc-pascal On Behalf Of Bo Ber

Re: [fpc-pascal] Reading Serial Hex Data

2020-12-27 Thread James Richters via fpc-pascal
t Does not. I think the best solution is to make the separate thread that reads everything available all the time and create a software Buffer. James -Original Message- From: fpc-pascal On Behalf Of James Richters via fpc-pascal Sent: Sunday, December 27, 2020 6:21 PM To: bo.bergl..

[fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread James Richters via fpc-pascal
i:/programming/gcode/test/clipboard formats.pas $00408F67 Line 60 is: GetClipboardFormatName(Format_Id,FN,250); It only gets run for non-standard formats. As I understand it that's all it us supposed to be used for. It's pretty short program so I pasted it below. A

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
ct 49964|22|Borland IDE Block Type|orland IDE Block Type 16 CF_LOCALE 1 CF_TEXT 7 CF_OEMTEXT James -Original Message- From: fpc-pascal On Behalf Of Martin Frb via fpc-pascal Sent: Wednesday, December 30, 2020 8:00 PM To: fpc-pascal@lists.freepascal.org Cc: Martin Frb Subject: Re: [fpc-p

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
Thanks for the info on SynEdit. Where can I find the synedit source related to the clipboard? I think the link you indtended ater 'See the code at.' Didn't come though, can you pleaese send it again? James -Original Message- From: fpc-pascal On Behalf Of Martin Frb

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
I don’t have Lazarus, just FPC, Thanks for the link. Thanks for the information, I understand how it works now. I appreciate the help. James From: fpc-pascal On Behalf Of Martin Frb via fpc-pascal Sent: Thursday, December 31, 2020 12:37 PM To: fpc-pascal@lists.freepascal.org Cc: Martin

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
)); move(q^,pp^,l+1); SetClipboardData(BorlandIDEBlockType,h); GlobalUnlock(h); End; James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2021-01-01 Thread James Richters via fpc-pascal
)); move(q^,pp^,l+1); SetClipboardData(BorlandIDEBlockType,h); GlobalUnlock(h); End; James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2021-01-02 Thread James Richters via fpc-pascal
o put the vertical column editing mode into the clipboard https://github.com/Zaaphod/Inches_To_Feet James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Avoiding File conflicts

2021-01-03 Thread James Richters via fpc-pascal
tten? I'm on a windows system if that makes any difference and this is a console program. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] PTCGraph Causing 217

2021-01-06 Thread James Richters via fpc-pascal
is present, just stop trying to do Getimage() or PutImage() until the condition is resolved. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] PTCGraph Causing 217

2021-01-11 Thread James Richters via fpc-pascal
h is doing Keypresed (sometimes the error is on putimage) Other things that cause it: Unplug monitor and plug it back in Change Display settings Putting computer to sleep Unknown reasons. system just idle James >Can you provide an example program and exact steps to reproduce this

Re: [fpc-pascal] PTCGraph Causing 217

2021-01-12 Thread James Richters via fpc-pascal
with exitcode 217 EAccessViolation: Access violation on line 114 which is doing Keypresed (sometimes the error is on putimage) Other things that cause it: Unplug monitor and plug it back in Change Display settings Putting computer to sleep Unknown reasons. system just idle James From: fpc-pasca

Re: [fpc-pascal] PTCGraph Causing 217

2021-01-30 Thread James Richters via fpc-pascal
Any idea what's causing this crash yet? Is there some way I can at least detect the error and handle it myself instead of crashing? James From: fpc-pascal On Behalf Of James Richters via fpc-pascal Sent: Monday, January 11, 2021 9:37 AM To: 'FPC-Pascal users discussions&#

Re: [fpc-pascal] PTCGraph Causing 217

2021-02-03 Thread James Richters via fpc-pascal
ndows. James From: fpc-pascal On Behalf Of Nikolay Nikolov via fpc-pascal Sent: Sunday, January 31, 2021 4:30 AM To: ja...@productionautomation.net; 'FPC-Pascal users discussions' Cc: Nikolay Nikolov Subject: Re: [fpc-pascal] PTCGraph Causing 217 On 1/29/21 3:52 PM, Nikolay Nikolov wrot

Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread James Richters via fpc-pascal
register a legitimate program as not having a virus. I've had this issue before but managed to track down the section of code that caused it... after a completely exhaustive search. James -Original Message- From: fpc-pascal On Behalf Of Graeme Geldenhuys via fpc-pascal Sent: F

Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread James Richters via fpc-pascal
How does one sign an executable? From: fpc-pascal On Behalf Of Dmitry Boyarintsev via fpc-pascal Sent: Friday, February 12, 2021 4:28 PM To: FPC-Pascal users discussions Cc: Dmitry Boyarintsev Subject: Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program Are signed executa

Re: [fpc-pascal] Generic routines for both dynamic array and other collections

2021-02-21 Thread James Richters via fpc-pascal
separate count variable could go wrong and be off from the actual number of elements. James -Original Message- From: fpc-pascal On Behalf Of Sven Barth via fpc-pascal Sent: Sunday, February 21, 2021 5:00 PM To: FPC-Pascal users discussions Cc: Sven Barth ; Ryan Joseph Subject: Re: [fp

[fpc-pascal] Formatting Question

2021-04-03 Thread James Richters via fpc-pascal
s always in the same position. The string will later be either output to the console or saved into a file. It will only ever be viewed with a fixed width font. Does anyone have any idea if this can be done with any function included with FPC or am I going to write my own functio

Re: [fpc-pascal] Formatting Question

2021-04-04 Thread James Richters via fpc-pascal
That looks almost perfect.. can I suppress the trailing zeros with the format command without losing the alignment? James Richters <http://www.productionautomation.net> www.productionautomation.net <mailto:ja...@productionautomation.net> ja...@productionau

Re: [fpc-pascal] Formatting Question

2021-04-04 Thread James Richters via fpc-pascal
0.5 2.53 12.5 Thanks! That’s exactly that I was looking for. Thank you for sharing your code! James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Directory Tree

2021-04-06 Thread James Richters via fpc-pascal
going graphical with Lazarus for something like this? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread James Richters via fpc-pascal
Is there any documentation or a sample program for TDirListBox? I tried doing a search but only found a page that showed it's functions and procedures, but no real explanation on what they are supposed to do. James >FPC package FV (FreeVision) contains an object TDirListBox whic

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread James Richters via fpc-pascal
#x27;ll have to figure out Lazarus and go that way. I haven't even started the project yet, but this tree selection with the ability to expand or collapse branches is going to be a big part of it, so I'm trying to see what's available. James -Original Message- From:

Re: [fpc-pascal] Directory Tree

2021-04-07 Thread James Richters via fpc-pascal
dy a built in way to load a data file that somehow designates the hierarchical order. James -Original Message- From: fpc-pascal On Behalf Of James Richters via fpc-pascal Sent: Tuesday, April 6, 2021 1:13 PM To: 'FPC-Pascal users discussions' Cc: James Richters ; 'Jea

Re: [fpc-pascal] Directory Tree

2021-04-08 Thread James Richters via fpc-pascal
The data I'm trying to display in the tree is a list of filename, but they aren't the names of the files on the disk, they are modified to include the time they take to run on a CNC machine. What I have is an INI file with a list like this: [Files] M:\Project1\File1=8:32 M:\Project1\File2=7:43

Re: [fpc-pascal] Directory Tree

2021-04-10 Thread James Richters via fpc-pascal
s there is a way to change this that isn't super complicated. James -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent: Friday, April 9, 2021 7:36 PM To: fpc-pascal@lists.freepascal.org Cc: Jean SUZINEAU Subject: Re: [fpc-pascal] Directory Tree (I

Re: [fpc-pascal] Directory Tree

2021-04-11 Thread James Richters via fpc-pascal
children under the parent. Is this even possible with TTreeView? Or is this another reason I might use something else? Or will I have to re-build the input file to include the totals somehow? James -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent: Sun

Re: [fpc-pascal] Directory Tree

2021-04-13 Thread James Richters via fpc-pascal
o accomplish) Thanks again for the help with this! James -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent: Sunday, April 11, 2021 6:53 PM To: fpc-pascal@lists.freepascal.org Cc: Jean SUZINEAU Subject: Re: [fpc-pascal] Directory Tree I have updated the Vi

Re: [fpc-pascal] Directory Tree

2021-04-14 Thread James Richters via fpc-pascal
>I've removed this file. I work both with Linux and Windows, most of the time >it's ok I still can’t get off the Master branch on my windows machine. I deleted everything, re-forked it, re-cloned it, and I still can’t check out any branch other than Master… It’s not that impor

Re: [fpc-pascal] Directory Tree

2021-04-15 Thread James Richters via fpc-pascal
ould happen before the forms are displayed, and where is the proper place to save the INI file right before the program is closed? Thanks again! James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-15 Thread James Richters via fpc-pascal
a somehow and just do a writeln to a file with the right formatting. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-17 Thread James Richters via fpc-pascal
File2 7:43 Any ideas how to get box characters to work? James -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent: Friday, April 16, 2021 6:23 PM To: fpc-pascal@lists.freepascal.org Cc: Jean SUZINEAU Subject: Re: [fpc-pascal] Directory Tree Le 15/04/2021

Re: [fpc-pascal] Directory Tree

2021-04-18 Thread James Richters via fpc-pascal
and everything above that are not.. they are using the vertical line instead of a crossing character.. so if there are 7 files in the branch, the first 5 will be vertical lines , the 6th one will be the correct crossing character and the 7th will be the correct angle character. Thank you again

Re: [fpc-pascal] Directory Tree

2021-04-18 Thread James Richters via fpc-pascal
e data file. Thank you. I figured out how to make a pdf file, but I don’t know how to implement it… if we can just have a button to print result.txt… then I could just change the printer to Microsoft Print to PDF which is included with Widows 10….

Re: [fpc-pascal] Directory Tree

2021-04-19 Thread James Richters via fpc-pascal
I updated Lazarus to Lazarus 2.0.12 / fpc 3.2.0 and that indeed did fix the default encoding error. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-22 Thread James Richters via fpc-pascal
s still a gap. If I could close that gap it would be perfect. Is there an easy way to send a page break between the file list and the tree? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-22 Thread James Richters via fpc-pascal
: Unable to Open File: C:\Users\James\AppData\Local\Temp\Fi8004.odt Press OK and risk data corruption or press abort to kill the program I think it must have something to do with using Microsoft Word to save the template. James From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent

Re: [fpc-pascal] Directory Tree

2021-04-23 Thread James Richters via fpc-pascal
. Thanks for your help James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-24 Thread James Richters via fpc-pascal
Get Checked or Selected works great, but if I push it twice, the second time I get: Unable to open file C:\Users\James\AppData\Local\Temp\FiC152.odt But I did make sure to close word and the PDF file before pushing it a second time. I tried to change formatDateTime to include Days, because

Re: [fpc-pascal] Directory Tree

2021-04-24 Thread James Richters via fpc-pascal
have the buttons on it yet when it does the load.. and it is also doing the load when I push a button.. which is not what I want to happen. Any idea how to do the load once automatically after the screen is up so I can see the load progress bar and after all the buttons are on the form? James

Re: [fpc-pascal] Directory Tree

2021-04-25 Thread James Richters via fpc-pascal
never needs to be editable. I have a date time routine for one of my big console projects that displays days, hours, minutes and seconds and takes off any leading zeros for days and hours from a date/time variable. I’ll see if I can bring that routine over and get it to work. James From: fpc

Re: [fpc-pascal] Directory Tree

2021-04-25 Thread James Richters via fpc-pascal
FValue:=FValue+Format ('%.2d:',[MinuteOf(FdValue)]); FValue:=FValue+Format ('%.2d',[SeconDof(FdValue)]); end; I made a pull request to your repository on Github with it James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-25 Thread James Richters via fpc-pascal
w if it's ok for you. still not getting a page break using word to open the odt file. The duration looks great, all the test cases look great too. I'm not getting the page break in word either. James ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Directory Tree

2021-04-25 Thread James Richters via fpc-pascal
ime); I'm not sure what I'm doing wrong.. maybe it's the way I re-named the text box from edit1 ?? Any ideas what I'm doing wrong? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-04-25 Thread James Richters via fpc-pascal
I'll install open office and see if it's just a word for windows issue. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Detecting IO errors with INI file

2021-04-28 Thread James Richters via fpc-pascal
has an {$i+} in it and so that's why it's blowing up? Any ideas how to keep retrying to access with ini file until it is either successful or a timeout? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Detecting IO errors with INI file

2021-04-29 Thread James Richters via fpc-pascal
information. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Detecting IO errors with INI file

2021-04-29 Thread James Richters via fpc-pascal
i.ini'); except on e: EFOpenError do // Identifier not found “EFOPenError” Writeln(EFOpenError); on e: Exception do Writeln(Exception); end; Do I need some other unit for EFOpenError to work? James ___ fpc-pascal maillist -

Re: [fpc-pascal] Detecting IO errors with INI file

2021-04-29 Thread James Richters via fpc-pascal
>Best add SysUtils and Classes. Thanks, that worked. But now I'm getting "cannot read or write variables of this type" for Writeln(Exception) is there an easy way to find out what the exception is? James ___ fpc-pascal maill

Re: [fpc-pascal] Detecting IO errors with INI file

2021-04-29 Thread James Richters via fpc-pascal
Thanks everyone for the help. I have it working now I did some more searching and found out I can get "Try" to work with {$Mode TP} If I add {$Modeswitch exceptions} and appearantly {$R+} to make sure range checking is on. So I have it working in my {$Mode TP} Unit. _

Re: [fpc-pascal] Directory Tree

2021-05-01 Thread James Richters via fpc-pascal
ve and restore the column widths for VirtualStrinTrees in the ini file? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-05-02 Thread James Richters via fpc-pascal
isn’t delaying the initial load anymore… I’m back to having a long delay while it loads and then the form is displayed with a large data file.. but I see the timer is still there. I increased the amount of time on the timer, but it still loads before the screen is displ

Re: [fpc-pascal] Directory Tree

2021-05-02 Thread James Richters via fpc-pascal
hange(Sender: TObject); begin If Not(tFirst.Enabled) Then Load_from_File; end; James From: fpc-pascal On Behalf Of James Richters via fpc-pascal Sent: Sunday, May 2, 2021 9:14 AM To: 'FPC-Pascal users discussions' Cc: James Richters ; 'Jean SUZINEAU' Subject:

Re: [fpc-pascal] Directory Tree

2021-05-02 Thread James Richters via fpc-pascal
application, but I’m thinking I should have made the variable part of the TText_to_PDF class… I tried to put it under public, but that did not work so I just made it a unit variable. Is there a better way I should have defined this variable? James ___ fpc

Re: [fpc-pascal] Directory Tree

2021-05-03 Thread James Richters via fpc-pascal
e better because it sorts properly) but here in the USA 05-03-2021 is customary.I don’t see where [Date] gets filled in with the date or how to define the format of it. I think I could make my own date format, but I don’t want to over-complicate things. Thank

Re: [fpc-pascal] Directory Tree

2021-05-03 Thread James Richters via fpc-pascal
_Configuration.ini which contains one section: [Options] and one entry under that: Chemin_Global= Any idea what’s causing this? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Directory Tree

2021-05-13 Thread James Richters via fpc-pascal
>I have split the unit uEXE_INI (subdirectory pascal_o_r_mapping/02_Units ) and >moved the code causing the creation of this entry in a new unit >uEXE_INI_Global. Thank you, it is not creating this other file anymore. James ___ fpc-pascal

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread James Richters via fpc-pascal
uns at.. in fact I regulate the frequency of the main loop in a similar way.. At the end of the main loop I have a tight loop with Sleep and the comparison to Now and when I'm past the minimum time I want for the main loop, I stop doing the loop: Repeat

Re: [fpc-pascal] Remove last character from pchar

2021-06-10 Thread James Richters via fpc-pascal
. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Remove last character from pchar

2021-06-10 Thread James Richters via fpc-pascal
Also StrPCopy will take the contents of an existing PChar and put it in an AnsiString… And sometimes I have regular pascal strings I want to pass to something as a Pchar, so then I do: Pchar(AnsiString(mystring)); But lately I’ve been just making all strings AnsiStrings anyway. James

[fpc-pascal] TRegistry documentation

2021-06-15 Thread James Richters via fpc-pascal
ing there should be a way to find out what type of key they all are and more functions to read and write the different types of keys. Anyone know where I can find this information? James ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] TRegistry documentation

2021-06-15 Thread James Richters via fpc-pascal
I'm not using Lazarus. I guess I can try to make a sample program with it just to see what the options are. It seems like there should be a ReadDword, and ReadQword because there are an awful lot of Dword and Qword types in the registry.

Re: [fpc-pascal] TRegistry documentation

2021-06-15 Thread James Richters via fpc-pascal
change to administrator with a request from within the program? I guess I could make just a small program that changes the key I want to change and launch that in administrator mode from the main program.. just curious is there was a way to do it with a single progr

Re: [fpc-pascal] TRegistry documentation

2021-06-16 Thread James Richters via fpc-pascal
ng me think I have the wrong thing all together. Are there functions to use the windows registry in the Windows unit? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to check if a network is available?

2021-06-18 Thread James Richters via fpc-pascal
Do a Ping to an address on the network to see if it's connected? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-18 Thread James Richters via fpc-pascal
Neither of which have a length limit that I know of. I am doing a Writeln if Both DefaultFileName and TFileName.lpstrFile and they both match, nothing is being truncated. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.free

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-18 Thread James Richters via fpc-pascal
. which it appears to be. So now I have: TFileName.nMaxFile:= Length(DefaultFileName)+1; TFileName.lpstrFile:=Pchar(DefaultFileName); I need the +1 for the #0 at the end of the Pchar, and now it works fine, and I can have strings as long as they need to be. Thank you for the hel

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-18 Thread James Richters via fpc-pascal
me could be significantly larger than the default. So I think I'm best off setting TFileName.nMaxFile := Max_Path; then TFileName.lpstrFile will always be able to hold anything the operating system can support. James ___ fpc-pascal maillis

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-21 Thread James Richters via fpc-pascal
that caused my original problem. I don't have a really good understanding of the conventions of putting various letters in front of Variables, like the T.. but I would never put the T there myself.. variables I define never have the T.. so if I wasn't copying an example, I would have done

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-21 Thread James Richters via fpc-pascal
x27;+OutpuSaveAsFileName); Assign(MyFile,OutpuSaveAsFileName); ReWrite(MyFile); Writeln(MyFile,'Test'); Writeln(MyFile,OutpuSaveAsFileName); Close(MyFile); End; End. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-21 Thread James Richters via fpc-pascal
m.. maybe I don't need the buffer, maybe I just needed: StrPLCopy( SaveAsFileName.lpstrFile, DefaulSaveAsFileName, Max_Path+1); ? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-21 Thread James Richters via fpc-pascal
u for the explanation, that explains why it crashed without the buffer but was fine with it. For some reason I thought SaveAsFileName.lpstrFile was a Pchar Variable. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.fre

Re: [fpc-pascal] Hello, new Pascal programmer. had a question!

2021-08-29 Thread James Richters via fpc-pascal
also put something like a ReadLn; at the end of my program so I can see the results before it switches back to the IDE.. Although pushing ALT-F5 will also show you the output if you don’t have the ReadLn; {$Mode TP} Uses CRT; Begin ClrScr; WriteLn('Hello World'); ReadLn; En

Re: [fpc-pascal] Hello, new Pascal programmer. had a question!

2021-09-01 Thread James Richters via fpc-pascal
ects get larger and you decide maybe using some Lazarus units might be a good idea, then you won’t have the compatibility issues that I have. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to list IP and MAC of network adapters on Windows?

2021-09-10 Thread James Richters via fpc-pascal
>You can use the ipconfig command and parse its output (especially ipconfig >/all). Here’s how I use ipconfig and parse the output: https://gist.github.com/Zaaphod/d1b7bf7a29aa653e3b0b61a836a03f62 James ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] How to list IP and MAC of network adapters on Windows?

2021-09-10 Thread James Richters via fpc-pascal
Well, that sure is a lot simpler than parsing the IPConfig output! Is there a way to capture the MAC address this way as well? uses {$IFDEF MSWINDOWS}Windows, WinSock,{$ENDIF} Should have a ; at the end instead of a , uses {$IFDEF MSWINDOWS}Windows, WinSock;{$ENDIF} James

Re: [fpc-pascal] Why the difference in the rounded results?

2021-10-15 Thread James Richters via fpc-pascal
for Double. So I don't use Win64, I only use 32 bit so I can get the precision. So when using SetRoundMode(rmNearest) which is the default to decide whether to round 22.575 up or down it's very slightly in nearest to 22.58 with 64 bit and very slightly nearest to 22.57 with 3

[fpc-pascal] Keeping current with FPC Source on gitlab

2021-11-05 Thread James Richters via fpc-pascal
e a better way to just update everything when I update the repository without re-installing it? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Getting Last User Input reliably

2021-12-03 Thread James Richters via fpc-pascal
was user input, If there is, is it a bad idea to reset it to 0? Maybe some system processes are also using it? Anyone have any ideas? I don't need this accurate to 1ms, accurate to a second or ten would be fine. James ___ fpc-

Re: [fpc-pascal] Getting Last User Input reliably

2021-12-05 Thread James Richters via fpc-pascal
one rollover between checks.. and the math all fixes itself... after being sure to keep it all Dword My program will be running anyway... and even if it's not it won't matter because I will cause user input when I start it. James ___ fpc-p

Re: [fpc-pascal] Getting Last User Input reliably

2021-12-05 Thread James Richters via fpc-pascal
5 DWresult:=(QWresult AND $); writeln(DWresult); end. But if I do QWresult:=(QWord(num1)+QWord(num2)); It does not So I'm wondering why QWresult:=QWord(num1+num2); Did not work as I expected it to. James ___ fpc-pascal maillist

Re: [fpc-pascal] Getting Last User Input reliably

2021-12-05 Thread James Richters via fpc-pascal
Thanks for the explanation. This works the way I want it to... working with the rollover without causing an overflow error even if I leave overflow checking turned on. DWord((QWord(GetTickCount) - QWord(Last_Input_Info.dwTime)) AND $) James

Re: [fpc-pascal] {$include %dateyear%}

2021-12-24 Thread James Richters via fpc-pascal
don't need to mention the integer exceptions here because we are only talking about environment variables now) I didn't know these directives existed, so thanks for the Christmas present, these will be very useful! James -Original Message- From: fpc-pascal On Behalf Of

Re: [fpc-pascal] {$include %dateyear%}

2021-12-25 Thread James Richters via fpc-pascal
ext being inserted. I don't really know what to call it, but integer seems to indicate it has a type, so I agree it should be distinguished from any specific variable type. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] {$include %dateyear%}

2021-12-26 Thread James Richters via fpc-pascal
I can put some more thought into it.. but I'm wondering how to properly submit a change request for this documentation. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FPC Backtrace

2022-01-03 Thread James Richters via fpc-pascal
jects. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC Backtrace

2022-01-03 Thread James Richters via fpc-pascal
That works great!!! Exactly what I was wanting Thank you, James On Mon, Jan 3, 2022 at 3:28 PM James Richters via fpc-pascal mailto:fpc-pascal@lists.freepascal.org> > wrote: I’m curious if there is some way, perhaps with some directive or something to force a debug backtrace to

Re: [fpc-pascal] FPC Backtrace

2022-01-04 Thread James Richters via fpc-pascal
to not work and I always hit a roadblock where I just don't know how to make it work... and then I need to get some real work done, so I just open the FPC Text IDE and everything is fine. James -Original Message- From: fpc-pascal On Behalf Of Graeme Geldenhuys via fpc-pascal Sent:

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread James Richters via fpc-pascal
A new function that works with other types of strings would simply need to be called something else, and not use the val function at all then it would interfere with nothing. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread James Richters via fpc-pascal
I don’t see what the problem with a shortstring buffer is.. strtoint could not make use of an input string longer than 256 characters anyway, because the output integer could not have more than 19 digits anyway.. so an input string longer than this would be useless… just convert to a shortstrin

[fpc-pascal] Windows Volume Control

2022-01-15 Thread James Richters via fpc-pascal
Are there functions to check the current volume level and to set the volume with just FPC (not Lazarus) on Windows 10? All I need is the master system volume, not any of the mixer controls. James ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] Putting Delimited text into a StringList

2022-02-06 Thread James Richters via fpc-pascal
my output: 1:This 2:is 3:a 4:test 5:1234 6:5678 I am wanting the output of this to be: 1: This is a test 2: 1234 3: 5678 James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

<    2   3   4   5   6   7   8   9   >