-
Content Count
290 -
Joined
-
Last visited
-
Days Won
3
Everything posted by KodeZwerg
-
Tested positive, thankyou!
-
@HolgerX I will test out your modification and tell if it works that no fields get hidden values 🙂 Thank you for sample and link, i really appreciate it.
-
fast file searching, what do you recommend, please?
KodeZwerg replied to KodeZwerg's topic in Windows API
Write Indexer to speed up search is a good best idea, I second that for sure. My thought was, if I am not wrong, PIDL is cached Windows stuff. So if you do not index but start new search, I hoped to get faster results than using above IOUtils. I should look deeper in that virtual shell tree example from Borland. There the PIDL usage isnt explained much but I hope I get it working like above function does. Indexing and monitoring every write access aint my goal. For that purpose way better tools exists than I need in my application. Since I use not a "*.*" filemask, it is quit fast or at least fastest way ATM for me. Thankyou for reading and your opinions.- 21 replies
-
- findfiles()
- win32
-
(and 1 more)
Tagged with:
-
fast file searching, what do you recommend, please?
KodeZwerg replied to KodeZwerg's topic in Windows API
Sorry if I interpreted wrong. function FindFiles( const initPath, FileMask: String; const DoRecursive, IncludeDirectories, IncludeFiles: Boolean ): TStringList; var LList: TStringDynArray; I: Integer; LSearchOption: TSearchOption; begin Result := TStringList.Create(); { Select the search option } if ( DoRecursive = True ) then LSearchOption := TSearchOption.soAllDirectories else LSearchOption := TSearchOption.soTopDirectoryOnly; try { For all entries use GetFileSystemEntries method } if ( IncludeDirectories = True ) and ( IncludeFiles = True ) then LList := TDirectory.GetFileSystemEntries(initPath, LSearchOption, nil); { For directories use GetDirectories method } if ( IncludeDirectories = True ) and not ( IncludeFiles = True ) then LList := TDirectory.GetDirectories(initPath, FileMask, LSearchOption); { For files use GetFiles method } if not ( IncludeDirectories = True ) and ( IncludeFiles = True ) then LList := TDirectory.GetFiles(initPath, FileMask, LSearchOption); except { Catch the possible exceptions } // MessageDlg('Incorrect path or search mask', mtError, [mbOK], 0); Exit; end; if Length( LList ) > 0 then begin for I := 0 to Length(LList) - 1 do Result.Add(LList[I]); end; end; Thankyou for hint with speed between those two (FindFirst() and IOUtils) I do stick with that Embarcadero sample i found. If someone know faster ways to do what this function does, please share knowledge 🙂- 21 replies
-
- findfiles()
- win32
-
(and 1 more)
Tagged with:
-
Hello community, I have a problem where I somehow don't know the correct solution. What I am try doing is to read out a Hotkey value from a Shortcut (.lnk) file and write it back. The read out works very well and is stored that way, my problem i added aswell: Uses Menus; // ( ShortcutToText(), TextToShortcut() ) var HotKeyMod: Word; begin // read out part is working HotKeyMod := Hi( SLI.HotKey ); cbALT.Checked := ( HotKeyMod and HOTKEYF_ALT ) = HOTKEYF_ALT; cbCTRL.Checked := ( HotKeyMod and HOTKEYF_CONTROL ) = HOTKEYF_CONTROL; cbSHIFT.Checked := ( HotKeyMod and HOTKEYF_SHIFT ) = HOTKEYF_SHIFT; edHotKey.Text := ShortcutToText( SLI.HotKey ); // save part is not working HotKeyMod := 0; HotKeyMod := ( TextToShortcut( edHotKey.Text ) ); if cbALT.Checked then HotKeyMod := ( HotKeyMod and HOTKEYF_ALT ); if cbCTRL.Checked then HotKeyMod := ( HotKeyMod and HOTKEYF_CONTROL ); if cbSHIFT.Checked then HotKeyMod := ( HotKeyMod and HOTKEYF_SHIFT ); SLI.HotKey := HotKeyMod; end; I dont know how to correct put that Hi byte into that Lo Word. I tried so many combinations but not the correct one. If someone can help, please do 🙂
-
How to combine a byte and a word as a hotkey word?
KodeZwerg replied to KodeZwerg's topic in Windows API
HotKeyMod := 0; if cbALT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_ALT ); if cbCTRL.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_CONTROL ); if cbSHIFT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_SHIFT ); SLI.HotKey := (HotKeyMod SHL 8) OR ( TextToShortcut( edHotKey.Text ) AND $FF ); Success @Primož Gabrijelčič Last line was interpreted wrong, now all works like a beauty! Thankyou for inspiration! -
How to combine a byte and a word as a hotkey word?
KodeZwerg replied to KodeZwerg's topic in Windows API
My full call uses LinkHelper, // name of my helper unit ; ... // here i load all procedure TForm1.ListBox1Click(Sender: TObject); var SLI: TShellLinkInfo; HotKeyMod: Byte; begin { ShowCmd: 1 = normales fenster 3 = maximiertes fenster 7 = minimiertes fenster } if ( ( ListBox1.Count > 0 ) and ( ListBox1.ItemIndex >= 0 ) ) then begin SLI := GetShellLinkInfo( ListBox1.Items[ ListBox1.ItemIndex ] ); edPathName.Text := SLI.PathName; edArguments.Text := SLI.Arguments; edDescription.Text := SLI.Description; edWorkingPath.Text := SLI.WorkingDirectory; edIconLocation.Text := SLI.IconLocation; edIconIndex.Text := IntToStr( SLI.IconIndex ); case SLI.ShowCmd of 1: cbShowCmd.ItemIndex := 0; 7: cbShowCmd.ItemIndex := 1; 3: cbShowCmd.ItemIndex := 2; else cbShowCmd.ItemIndex := 0; end; edHotKey.Text := ''; HotKeyMod := Hi( SLI.HotKey ); cbALT.Checked := (HotKeyMod and HOTKEYF_ALT) = HOTKEYF_ALT; cbCTRL.Checked := (HotKeyMod and HOTKEYF_CONTROL) = HOTKEYF_CONTROL; cbSHIFT.Checked := (HotKeyMod and HOTKEYF_SHIFT) = HOTKEYF_SHIFT; edHotKey.Text := ShortcutToText( SLI.HotKey ); btnSaveCurrent.Enabled := True; end; end; // here i save all with problem at hotkey procedure TForm1.btnSaveCurrentClick(Sender: TObject); var SLI: TShellLinkInfo; HotKeyMod: word; TBC: TWordByteConversion; begin SLI.PathName := edPathName.Text; SLI.Arguments := edArguments.Text; SLI.Description := edDescription.Text; SLI.WorkingDirectory := edWorkingPath.Text; SLI.IconLocation := edIconLocation.Text; SLI.IconIndex := StrToInt( edIconIndex.Text ); case cbShowCmd.ItemIndex of 0: SLI.ShowCmd := 1; 1: SLI.ShowCmd := 7; 2: SLI.ShowCmd := 3; end; HotKeyMod := 0; HotKeyMod := ( TextToShortcut( edHotKey.Text ) ); if cbALT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_ALT ); if cbCTRL.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_CONTROL ); if cbSHIFT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_SHIFT ); SLI.HotKey := (HotKeyMod SHL 8) OR (HotKeyMod AND $FF); // here was error SetShellLinkInfo( ListBox1.Items[ ListBox1.ItemIndex ], SLI ); end; -
How to combine a byte and a word as a hotkey word?
KodeZwerg replied to KodeZwerg's topic in Windows API
Thankyou for pointing that out, I do still have no success. HotKeyMod := 0; if cbALT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_ALT ); if cbCTRL.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_CONTROL ); if cbSHIFT.Checked then HotKeyMod := ( HotKeyMod or HOTKEYF_SHIFT ); HotKeyMod := ( HotKeyMod or TextToShortcut( edHotKey.Text ) ); -
How to know that a file is not used by another program?
KodeZwerg replied to Juan C.Cilleruelo's topic in Cross-platform
*removed* -
User settings - split logic and UI
KodeZwerg replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
source link full german thread link copy/pasted the idea: uses Registry; // Speichern des Headers in die Registry procedure TForm1.Button1Click(Sender: TObject); var regi : TRegistryIniFile; buffer : TMemoryStream; begin regi := TRegistryIniFile.Create(DEINKEY); Buffer := TMemoryStream.Create; VirtualStringTree1.Header.SaveToStream(Buffer); Buffer.Position := 0; //hier Regi.WriteBinaryStream(SECTION, NAME, Buffer); regi.Free; VirtualStringTree1.Header.Columns.Clear; end; // Laden der Daten aus der Registry procedure TForm1.Button2Click(Sender: TObject); var regi : TRegistryIniFile; buffer : TMemoryStream; i : Integer; p : PChar; begin regi := TRegistryIniFile.Create(DEINKEY); Buffer := TMemoryStream.Create; regi.ReadBinaryStream(SECTION, NAME, Buffer); Buffer.Position := 0; VirtualStringTree1.Header.LoadFromStream(Buffer); Buffer.Free; regi.Free; end; -
firemonkey Compiler Defines for FireMonkey and VCL in inc files.
KodeZwerg replied to Ugochukwu Mmaduekwe's topic in General Help
Visual Component Library wich contain Lossless Compression Library :-] -
User settings - split logic and UI
KodeZwerg replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
how about memorystream usage? i mean load registry at startup into a global stream. access that stream all the time. in UI with writeback to Registry option. -
firemonkey Compiler Defines for FireMonkey and VCL in inc files.
KodeZwerg replied to Ugochukwu Mmaduekwe's topic in General Help
Cool trick @Uwe Raabe, i really like it even if i do not use FMX 🙂 VCL i know what it mean, but what stand LCL for? cant find reference in my Delphi Help. -
I will update again very soon. ATM Replacing XOR with AES128. Added keyname crypting aswell. Adding Crypt Variant for everything. ( TDateTime is for now my enemy o_O ) Planned: additional pump all in a class for OOP :-] single calls resides for quick usage. Any more Ideas, wishes, suggestions, bugs? Feel free to tell.
-
Fixed Version. XOR encryption & decryption is working. Stream buffer is fixed too. Enjoy. (i'd thought it's kinda a tutorial on how to play with Ini-Files on Windows systems, okay thank you for moving) IniHelper.7z
-
@Neutral General Hello again, I have a question about used codeline list.innerHTML = '<li><strong>' + obj.outerHTML + '</strong></li>' + list.innerHTML; If a command is avail to adjust size (make it a bit bigger) could you teach me that command please? I've forgot to mention, this belongs to name above avatar (I would like that name is as big as font in message view? Is that possible?) as you see, i already took out italic to make it a bit more readable.
-
fmx TImageList and TImage which loads image files from directories
KodeZwerg replied to John Kouraklis's topic in I made this
For wich Delphi Versions it may work please? (i use D2010) In Readme.md Fmx aint mentioned, that i've read. Now realized name off "Extension to FMX TImageList and TImage to load files from directory" Nevermind. -
Is there already a statistic about the new registrations?
KodeZwerg replied to sh17's topic in Community Management
@Markus Kinzler how about add "Total: X" (as info text not as bar/beam, maby add to/replace "New members" header, like "New members (All = X)"?) -
Idk if possible, how about a simple line by line parser/checker?
-
Aslong operators are busy you might checkout this link. You will find there a Browser Modification, to me it is working good.
-
Hello, members just have a limited ammount of reactions. (like "Thankyou cups"...) Please add it visible that a member know how much he can give. Thanks for reading.
-
-
if (enable_username_above_avatar && !isDiscover) { var authorOriginal = $('.cAuthorPane_author > strong > a'); authorOriginal.each( function(i, obj) { var txt = obj.innerHTML; var list = obj.parentElement.parentElement.nextSibling.nextSibling; list.innerHTML = '<li><strong>' + obj.outerHTML + '</strong></li>' + list.innerHTML; obj.outerHTML = '_'; }); } In Opera I need this. Header Display a underline but Name is above Avatar. With all setting set to true, on Opera I do not see the Editor any more if I Private Message someone.
-
Since I am doing a lot wrong, I would like to ask how you quick select a code block for CTRL-C? ATM I do it classical by leftmouse on line 1 and down to end of block. I do miss a "select" feature. l just see "open/close" but no "select".
-
option "select block" to quick copy text?
KodeZwerg replied to KodeZwerg's topic in Community Management
Thanks to confirm this, I already started believing all my failures are based on my Browser/the way I use it. I am a bit sceptical now. I will looking forward to such option. Regards, KodeZwerg