Dẫn nhập
Nếu bạn là tín đồ C#, lại đang tu luyện combo Auto C# của Kteam. Thì hẳn đây sẽ là một khóa học giúp bạn tăng thêm bội phần công lực. Ahihi!
Ở khóa này chúng ta sẽ cùng tìm hiểu cách để điều khiển một giả lập để làm những tool auto hoặc game android điển hình là dự án thực tế được hướng dẫn trong khóa này - TOOL CÀY VIEW CHO WEBSITE .
Ở bài trước, chúng ta đã tìm hiểu cách VÀO BÀI VIẾT ĐẦU TIÊN TRONG HOWKTEAM.COM . Trong bài này, chúng ta sẽ cùng tìm hiểu về Hoàn thiện tool
Nội dung
Nội dung bao gồm Source code & các lưu ý chính về quá trình thực hiện phần mềm. Kteam khuyến khích bạn cập nhập thêm nhiều kinh nghiệm cũng như hiểu chi tiết hơn về các kỹ thuật được đề cập trong bài học thông qua các video đính kèm.
Đừng quên Like Facebook hoặc +1 Google để ủng hộ Kteam và tác giả.
Để có đủ khả năng học hiểu các nội dung được đề cập đến trong khóa học. Bạn nên có tối thiểu kiến thức về các phần:
Ngoài ra, cũng nên trau dồi thêm kiến thức khác qua các project thực tế như:
Phần mềm sử dụng
Để việc thao tác theo hướng dẫn được tốt nhất bạn nên cài đặt phần mềm
Project tham khảo
Form1.cs
using KAutoHelper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Cay_View_HowKteam
{
public partial class Form1 : Form
{
public bool IsStop { get ; set ; }
public Form1 ()
{
InitializeComponent();
IsStop = true ;
}
private void button1_Click (object sender, EventArgs e)
{
ChangeDCom();
}
private void button2_Click (object sender, EventArgs e)
{
MoWebbrowser();
}
private void button3_Click (object sender, EventArgs e)
{
VaoBaiDauTien();
}
private void button5_Click (object sender, EventArgs e)
{
IsStop = true ;
}
private void button4_Click (object sender, EventArgs e)
{
IsStop = false ;
Task t = new Task(()=> {
while (!IsStop)
{
ChangeDCom();
Delay(5 );
ThoatApp();
Delay(2 );
VaoBaiDauTien();
}
});
t.Start();
}
#region methods
void ChangeDCom()
{
var handleDComChanger = AutoControl.FindWindowHandle(null , "DcomChanger" );
if (handleDComChanger != IntPtr.Zero)
{
var buttonChangeHandle = AutoControl.FindHandle(handleDComChanger, null , "Change" );
if (buttonChangeHandle != IntPtr.Zero)
{
AutoControl.SendClickOnPosition(buttonChangeHandle, 43 , 20 );
}
}
}
IntPtr GetLeapdroidHandle()
{
IntPtr handle = AutoControl.FindWindowHandle(null , "Leapdroid (v1.8.0.0)" );
return handle;
}
void ThoatApp()
{
ClickLenNutThoatApp();
Delay(2 );
ClickDeLenApp();
Delay(1 );
ClickRemoveFromApp();
}
void ClickLenNutThoatApp()
{
ClickOnLeapdroidPosition(771 , 745 );
}
void ClickRemoveFromApp()
{
ClickOnLeapdroidPosition(1182 , 526 );
}
void ClickDeLenApp()
{
ClickDownOnLeapdroidPosition(1165 , 372 );
Delay(2 );
ClickUpOnLeapdroidPosition(1165 , 372 );
}
void ClickOnLeapdroidPosition(int x, int y)
{
var handle = GetLeapdroidHandle();
AutoControl.SendClickOnPosition(handle, x, y);
}
void ClickDownOnLeapdroidPosition(int x, int y)
{
var handle = GetLeapdroidHandle();
AutoControl.SendClickDownOnPosition(handle, x, y);
}
void ClickUpOnLeapdroidPosition(int x, int y)
{
var handle = GetLeapdroidHandle();
AutoControl.SendClickUpOnPosition(handle, x, y);
}
void MoWebbrowser()
{
ClickOnLeapdroidPosition(126 ,129 );
}
void ClickLenThanhDiaChi()
{
ClickOnLeapdroidPosition(861 , 105 );
}
void ClickLenButtonBatDau()
{
ClickOnLeapdroidPosition(511 , 634 );
}
void ClickLenCategoryLapTrinh()
{
ClickOnLeapdroidPosition(144 , 577 );
}
void ClickLenCategoryNet()
{
ClickOnLeapdroidPosition(182 , 619 );
}
void ClickLenKhoaHocDauTien()
{
ClickOnLeapdroidPosition(796 , 623 );
}
void ClickLenBaiHocDauTien()
{
ClickOnLeapdroidPosition(195 , 584 );
}
void PressOnLeapdriod(string keys)
{
var handle = GetLeapdroidHandle();
AutoControl.SendTextKeyBoard(handle, keys);
}
void PressEnterOnLeapdroid(VKeys key)
{
var handle = GetLeapdroidHandle();
AutoControl.SendKeyBoardPress(handle, key);
}
void VaoBaiDauTien()
{
MoWebbrowser();
Delay(3 );
ClickLenThanhDiaChi();
Delay(1 );
PressOnLeapdriod("howkteam.com" );
Delay(2 );
PressEnterOnLeapdroid(VKeys.VK_RETURN);
Delay(3 );
ClickLenButtonBatDau();
Delay(3 );
ClickLenCategoryLapTrinh();
Delay(1 );
ClickLenCategoryNet();
Delay(4 );
ClickLenKhoaHocDauTien();
Delay(4 );
ClickLenBaiHocDauTien();
Delay(4 );
}
void Delay(double delay)
{
double delayTime = 0 ;
while (delayTime < delay)
{
Thread.Sleep(TimeSpan.FromSeconds(1 ));
delayTime++;
}
}
#endregion
}
}
Form1.Designer.cs
namespace Cay_View_HowKteam
{
partial class Form1
{
private System.ComponentModel.IContainer components = null ;
protected override void Dispose (bool disposing)
{
if (disposing && (components != null ))
{
components.Dispose();
}
base .Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent ()
{
this .button1 = new System.Windows.Forms.Button();
this .button2 = new System.Windows.Forms.Button();
this .button3 = new System.Windows.Forms.Button();
this .button4 = new System.Windows.Forms.Button();
this .button5 = new System.Windows.Forms.Button();
this .SuspendLayout();
this .button1.Location = new System.Drawing.Point(12 , 12 );
this .button1.Name = "button1" ;
this .button1.Size = new System.Drawing.Size(408 , 23 );
this .button1.TabIndex = 0 ;
this .button1.Text = "Change DCom" ;
this .button1.UseVisualStyleBackColor = true ;
this .button1.Click += new System.EventHandler(this .button1_Click);
this .button2.Location = new System.Drawing.Point(12 , 41 );
this .button2.Name = "button2" ;
this .button2.Size = new System.Drawing.Size(408 , 23 );
this .button2.TabIndex = 1 ;
this .button2.Text = "Mở webbrowser" ;
this .button2.UseVisualStyleBackColor = true ;
this .button2.Click += new System.EventHandler(this .button2_Click);
this .button3.Location = new System.Drawing.Point(12 , 70 );
this .button3.Name = "button3" ;
this .button3.Size = new System.Drawing.Size(408 , 23 );
this .button3.TabIndex = 2 ;
this .button3.Text = "Vào bài đầu tiên" ;
this .button3.UseVisualStyleBackColor = true ;
this .button3.Click += new System.EventHandler(this .button3_Click);
this .button4.Location = new System.Drawing.Point(12 , 99 );
this .button4.Name = "button4" ;
this .button4.Size = new System.Drawing.Size(408 , 23 );
this .button4.TabIndex = 3 ;
this .button4.Text = "Kịch bản hoàn chỉnh" ;
this .button4.UseVisualStyleBackColor = true ;
this .button4.Click += new System.EventHandler(this .button4_Click);
this .button5.Location = new System.Drawing.Point(12 , 128 );
this .button5.Name = "button5" ;
this .button5.Size = new System.Drawing.Size(408 , 23 );
this .button5.TabIndex = 4 ;
this .button5.Text = "Stop" ;
this .button5.UseVisualStyleBackColor = true ;
this .button5.Click += new System.EventHandler(this .button5_Click);
this .AutoScaleDimensions = new System.Drawing.SizeF(6 F, 13 F);
this .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this .ClientSize = new System.Drawing.Size(432 , 274 );
this .Controls.Add(this .button5);
this .Controls.Add(this .button4);
this .Controls.Add(this .button3);
this .Controls.Add(this .button2);
this .Controls.Add(this .button1);
this .Name = "Form1" ;
this .Text = "Tool auto cày view website howkteam.com" ;
this .ResumeLayout(false );
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
}
}
Project tải xuống
Nếu việc thực hành theo hướng dẫn không diễn ra suôn sẻ như mong muốn. Bạn cũng có thể tải xuống PROJECT THAM KHẢO ở link bên dưới!
Phần mềm & Thư viện khác
Kết
Trong bài này, chúng ta đã tìm hiểu cách Hoàn thiện tool.
Kteam hy vọng bạn đã có đầy đủ kiến thức để tiếp cận các tài liệu về Auto C# hoặc các khóa học khác trên Howkteam.com
Bạn cũng có thể mời tác giả khóa học một ly cafe hoặc Tài trợ cho các khóa học khác, giúp ai cũng có cơ hội tiếp cận GIÁO DỤC MIỄN PHÍ qua link bên dưới!
https://www.howkteam.vn/donate
Cảm ơn các bạn đã theo dõi bài viết. Hãy để lại bình luận hoặc góp ý của mình để phát triển bài viết tốt hơn. Và đừng quên “Luyện tập – Thử Thách – Không ngại khó ”
Tải xuống
Tài liệu
Nhằm phục vụ mục đích học tập Offline của cộng đồng, Kteam hỗ trợ tính năng lưu trữ nội dung bài học Hoàn thiện tool cày view dưới dạng file PDF trong link bên dưới.
Ngoài ra, bạn cũng có thể tìm thấy các tài liệu được đóng góp từ cộng đồng ở mục TÀI LIỆU trên thư viện Howkteam.com
Đừng quên like và share để ủng hộ Kteam và tác giả nhé!
Thảo luận
Nếu bạn có bất kỳ khó khăn hay thắc mắc gì về khóa học, đừng ngần ngại đặt câu hỏi trong phần BÌNH LUẬN bên dưới hoặc trong mục HỎI & ĐÁP trên thư viện Howkteam.com để nhận được sự hỗ trợ từ cộng đồng.
Cho em hỏi sao em k dùng được với LDPlayer nhỉ?
Mình có thể áp dụng để cày view theo từ khóa tìm kiếm kiểu như ép cọc bê tông tại Hải Phòng rồi vào trang đích được không?
c
a