clubreseau
Members-
Content Count
33 -
Joined
-
Last visited
Community Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Someone can help me ? How I can insert some subcategory Item in Category CRÉÉ on that code ? var Mi, Mx, My: TMenuItem; tblIDParent, tblIDCat : integer; tblName :string; begin tbl.SQL.Text:='SELECT c.id_category, c.id_parent, c.level_depth, cl.name FROM category AS c LEFT JOIN category_lang AS cl ON c.id_category = cl.id_category WHERE c.id_parent >= 2 ORDER BY c.id_category'; tbl.open; tbl.First; while not tbl.eof do begin tblIDCat := tbl.Fields[0].AsInteger; tblIDParent := tbl.Fields[1].AsInteger; tblName := tbl.Fields[3].AsString; if tbl.Fields[1].AsString = '2' then begin Mi := TMenuItem.create(popupmenu1); Mi.Caption := tblName; Mi.Tag := tblIDCat; popupmenu1.Items.add(Mi); end; if tbl.Fields[2].AsString = '3' then for var i := 0 to Popupmenu1.items.count - 1 do if Popupmenu1.items[i] is TMenuItem then if TMenuItem(Popupmenu1.items[i]).tag = tblIDParent then begin MI := TMenuItem.create(TMenuItem(Popupmenu1.items[i])); MI.Caption := tblName; MI.Tag := tblIDCat; TMenuItem(Popupmenu1.items[i]).Add(mi); Mx := TMenuItem.create(TMenuItem(Popupmenu1.items[i])); Mx.Caption := 'AJOUTER'; Mx.Tag := tblIDCat; Mx.OnClick := ONCLIK_ADD; Mi.Add(mx); Mx := TMenuItem.create(TMenuItem(Popupmenu1.items[i])); Mx.Caption := 'CRÉE'; Mx.Tag := tblIDCat; Mx.OnClick := ONCLIK_CREATE; Mi.Add(mx); end; tbl.next; end;
-
I fix it, than with AutoHotkeys property of the popup menu to maManual, Now my only problem, I want to add submenu to category DEL do you now how ?
-
I fix it, than with AutoHotkeys property of the popup menu to maManual, Now my only problem, I want to add submenu to category DEL do you now how ?
-
I fix it, than with AutoHotkeys property of the popup menu to maManual, Now my only problem, I want to add submenu to category DEL do you now how ?
-
Work perfect thank you How I can create subcategory to category DEL ?
-
Work perfect thank you only 1 problem on my onclick STR_PCAPTION := TMenuItem((Sender as TMenuItem).parent).caption; showmessage(STR_PCAPTION); all my category and subcategory start by &andthename ? How I can get the original name without & and how I can create subcategory to category DEL ?
-
How to create a popupmenu from a SQL loop with categories and sub-categories, and at the end of my loop add 2 items to all Level_Depth 3. please I am a novice would be nice if you can give me a some code how to do.
-
Hi, I use TedgeBrowser and I want when I go to this page https://login.aliexpress.com/ that write my email and password automatically someone can explain or show me a part of code how to do it. thank you
-
I use delphi 10.4 I create a button and inside I add WebBrowser1.Navigate('https://www.aliexpress.com/'); to make it simple and test it. and I got a many javascript error how i can fix this. thank you ror
-
You rock ! last question what is the commande to delete line in url.txt ?
-
its the opposite I would like.. delete url in listbox1. search in url.txt all duplicated remove in lixtbo1. in my listbox1 i have already 1000 URL, i dont want to load url from url.txt I want he look in URl.txt if line in litbox1 are in url.txt then delete the line in listbox.
-
sorry I misspoke then.
-
domain = http://welcome.com/hi.html the root or this domain is welcome.com remove http:// until /
-
this is my code and not working trying to loook into files and delete all duplicated URL in listbox1. procedure TForm1.DELETEURLClick(Sender: TObject); var Index : Integer; Dict : TDictionary<String, Integer>; URL : String; Domain : String; Value : Integer; sl : TStringList; ix : Integer; begin sl := TStringList.Create; Dict := TDictionary<String, Integer>.Create(100000); try ListBox1.Items.BeginUpdate; try for Index := ListBox1.Items.Count - 1 downto 0 do begin URL := ListBox1.Items[Index]; sl.LoadFromFile('C:\Users\myname\Documents\Url.txt'); ix := sl.IndexOf(URL); if URL = '' then begin ListBox1.Items.Delete(Index); continue; end; Domain := ExtractDomain(Trim(UpperCase(ix.ToString))); if Dict.TryGetValue(Domain, Value) then begin // Domain already found, delete from ListBox ListBox1.Items.Delete(Index); continue; end; // Domain not seen before, add to dictionary and don't remove from list Dict.Add(Domain, 0); end; finally ListBox1.Items.EndUpdate; end; finally FreeAndNil(Dict); sl.Free; end; end; function ExtractDomain(const URL : String) : String; var I, J : Integer; begin I := Pos('://', URL); if I <= 0 then I := 1 else Inc(I, 3); J := Pos('/', URL, I); if J <= 0 then begin Result := Copy(URL, I, MAXINT); Exit; end; Result := Copy(URL, I, J - I); end; thank you SIR !
-
Thank you its work perfectly ! How to convert it, to look at a file called url.txt that contain URL, and delete all duplicate domains in my listbox1 ? and like your code I want its look only domain root. If domain root are in Url.txt delete the entire URL in listbox1. Thank you