28-01-2022, Saat: 13:25
Selamlar bir sürü örnek var burada bununla ilgili ancak hiç biri işe yaramadı.
https://karisimbi.events/consumers-choic...f-the-year
Bu sayfadaki MONI baby altındaki Vote tıklanacak. Cash temizlenip tekrar tıklanacak. Hile gibi görünüyor ama rakip firmalar da bu hileyi kullanıyor. O nedenle sıkıntı yok. Operayı açıp cursörü oraya getirip tıklatıp yine cursor ile kapattırıp oy verdiriyorum ama uzun zaman alıyor. İşime yaramıyor.
Yaptığım ve denediğim yöntem kodlarda mevcut. Bunlar gibi bir çok kaynaktan yararlanmaya çalıştım fakat olmuyor.
http://www.delphiturkiye.com/forum/viewtopic.php?t=22058
https://stackoverflow.com/questions/21942040/delphi-webbrowser-how-to-get-value-from-tag-name-inside-id
https://www.delphican.com/showthread.php?tid=2270
https://karisimbi.events/consumers-choic...f-the-year
Bu sayfadaki MONI baby altındaki Vote tıklanacak. Cash temizlenip tekrar tıklanacak. Hile gibi görünüyor ama rakip firmalar da bu hileyi kullanıyor. O nedenle sıkıntı yok. Operayı açıp cursörü oraya getirip tıklatıp yine cursor ile kapattırıp oy verdiriyorum ama uzun zaman alıyor. İşime yaramıyor.
Yaptığım ve denediğim yöntem kodlarda mevcut. Bunlar gibi bir çok kaynaktan yararlanmaya çalıştım fakat olmuyor.
http://www.delphiturkiye.com/forum/viewtopic.php?t=22058
https://stackoverflow.com/questions/21942040/delphi-webbrowser-how-to-get-value-from-tag-name-inside-id
https://www.delphican.com/showthread.php?tid=2270
unit fmtikla;interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, shellapi, Vcl.ExtCtrls, Vcl.OleCtrls, SHDocVw, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, System.Net.URLClient, System.Net.HttpClient, System.Net.HttpClientComponent, Vcl.DBCtrls, Winapi.WebView2, Winapi.ActiveX, Vcl.Edge; type TForm1 = class(TForm) Edit1: TEdit; Edit2: TEdit; Timer1: TTimer; Timer2: TTimer; Button1: TButton; Button2: TButton; EdgeBrowser1: TEdgeBrowser; procedure koordinat; procedure Timer1Timer(Sender: TObject); procedure Timer2Timer(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; StreamData :TMemoryStream; Url,html,sec, sayfa,burc, burc1,deger,ad, link, resim, fiyat, indirim : string; implementation {$R *.dfm} Function aradansec( text, ilk, son:String ): String; begin Delete(Text, 1, pos(ilk, Text) + Length(ilk)-1); Result := Copy(Text, 1, Pos(Son, Text)-1); end; function degis(s:string):string; var sonuc:String; secenek:TReplaceFlags;//unutmayın begin result:=''; secenek:=[rfReplaceAll]; //Harf Duyarlılığı var s:=StringReplace(s,'ý','ı',secenek); //ÝÞ Ð s:=StringReplace(s,'þ','ş',secenek); s:=StringReplace(s,'ð','ğ',secenek); s:=StringReplace(s,'Ý','İ',secenek); // yaðýþ s:=StringReplace(s,'Þ','Ş',secenek); s:=StringReplace(s,'Ð','Ğ',secenek); result:=s; end; procedure soltikla; begin Mouse_Event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); Mouse_Event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); end; // Sağ tuş ile tıklama için procedure sagtikla; begin Mouse_Event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0); Mouse_Event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); end; // Çift tıklama için procedure cifttikla; begin soltikla; GetDoubleClickTime; soltikla; end; function StartApp(apchOperation, apchFileName, apchParameters, apchDirectory: PChar;awrdShowCmd: Word): Cardinal; var lseiInfo: TShellExecuteInfo; begin Result := 0; FillChar(lseiInfo, SizeOf(lseiInfo), Chr(0)); lseiInfo.cbSize := SizeOf(lseiInfo); lseiInfo.fMask := SEE_MASK_NOCLOSEPROCESS; lseiInfo.lpVerb := apchOperation; lseiInfo.lpFile := apchFileName; lseiInfo.lpParameters := apchParameters; lseiInfo.lpDirectory := apchDirectory; lseiInfo.nShow := awrdShowCmd; if Boolean(ShellExecuteEx(@lseiInfo)) then Result := lseiInfo.hProcess; end; procedure KillProcess(hProcess: Cardinal); Var ovExitCode: LongWord; begin try if hProcess <> 0 then begin GetExitCodeProcess(hProcess, ovExitCode); if (ovExitCode = STILL_ACTIVE) or (ovExitCode <> WAIT_OBJECT_0) then TerminateProcess(hProcess, ovExitCode); CloseHandle(hProcess); end; except end; end; procedure TForm1.Button2Click(Sender: TObject); begin EdgeBrowser1.Navigate( 'https://karisimbi.events/consumers-choice-awards-cca/hygiene-sanitation-brand-of-the-year'); Application.ProcessMessages; // WebBrowser1.OleObject.Document.GetElementByID('.vote').Click; end; procedure TForm1.koordinat; var p:TPoint; begin p:= Mouse.CursorPos; Edit1.Text:=inttostr(p.X); Edit2.Text:=inttostr(p.Y); end; procedure TForm1.Timer1Timer(Sender: TObject); begin koordinat; end; procedure islemebasla; var hApp : Cardinal; begin ShellExecute(0, 'open', 'Opera.exe', Pchar('https://karisimbi.events/consumers-choice-awards-cca/hygiene-sanitation-brand-of-the-year'), '', SW_Normal); Sleep(3000); SetCursorPos(847,648); soltikla; Sleep(3000); SetCursorPos(856,319); soltikla; SetCursorPos(1344,11); soltikla; SetCursorPos(818,410); soltikla; end; procedure TForm1.Timer2Timer(Sender: TObject); begin islemebasla; end; procedure TForm1.Button1Click(Sender: TObject); begin timer2.Enabled := True; end; end.
ve kolaylıkla yapabiliyorlardır.