You know the feeling. You need a specific input from your command line, but you can’t find something lightweight that does the job. Hence, the FDC.CommandLine was born.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
You can use – / or + as a switch, and use : or = as a flag for parameters.
You can use single and double quotes to be able to parse parameters that contain spaces and quotes.
/quoteoftheday:”This is a ‘quoted’ parameter”
It also supports lists of parameters.
/inputfiles:(file1.txt , “file with space.txt”)
Take a look at the TestFDCCommandLine.dpr for more examples of how it works.
Continue reading “Generic Command Line Parser for Delphi 10.3.x”
The entire source code for a huge array of Infocom text adventures and interactive stories is now available on Github, thanks to historian and archivist Jason Scott.
Among the titles are:
– Zork I, II, III
– Leather Godesses of Phobos
– Nord and Bert Couldn’t make Head or Tail of it
– Hitchhiker’s Guide to the Galaxy
Source: Gamasutra – The source code for Infocom’s classic text adventures is now on Github
Something safe for New Year’s Eve 🙂
Jan Horn wrote this, December the 29th in 2001! Just add Variants to the uses clause in the .dpr file to get past the “NULL not found” error.
Someone should port this to FireMonkey 🙂
Update: Upon trying to find Jan’s current whereabouts, I sadly learned that Jan Horn no longer is among us. May he rest in peace, and be remembered fondly.
Simple way of relaunching an application or a service
For example after replacing the .exe file for an upgrade (under Windows).
Uses CustomDebugOut (see other post).
FDCRelauncher.pas – http://pastebin.com/YCiqiNAq
Simple override for Windows.OutputDebugString which adds a timestamp, thread id and memory, and an overloaded string version to get rid of those pesky pChar casts.
The output shows up in the in the BDS Event Log, or it can be captured while running live with Sysinternal’s DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx).
CustomDebugOut.pas – http://pastebin.com/GM7DE18L