Talk about C # and hoisting conference

Source: Internet
Author: User

First, start by jumping

At the beginning of 2018, the jump-jump applet was a fire. For a time, a variety of strategies, and even auxiliary tools have emerged. As a member of the. NET camp, this section of the http://www.cnblogs.com/bqh10086/p/8253973.html jump-Jump Assistant program article, can be said to be a bright. The idea of implementation is broadly as follows:

1. Download the ADB tool;

2. Turn on the phone USB debug mode;

3. Call the ADB tool from the command line to send commands to your phone

3.1 Sending commands

3.2 Copy from phone to disk

3.3 Draw the phone to the pixturebox of the WinForm form

3.4 left mouse button click Villain Bottom, right click Target Point

3.5 Convert the distance between the point at the bottom of the villain and the target point to the screen press time

3.6 Send Screen Press command

4. Manually complete One Jump

Second, encounter hoisting conference

Consciously or unconsciously always met hoisting a few words, through the search, found is an online time-limited answer class app. Each problem three options, 10s within the answer, a total of 12 questions, to not answer correctly after the other full answer to the average bonus. Bonuses range from 50000-300000.

Https://livc.io/blog/204?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io This article provides a supplementary idea:

1. Capture your phone screen pictures

2. Issues in the identification

3. Call the browser to search for the topic

However, this idea is based on the iOS mobile operating system, using the iOS + mac+wda+ free OCR recognition to achieve.

Three, jump and hoisting conference

In the spirit of life lies in the principle of tossing, thinking in the Android phone operating system +windows operating system can also implement a supplementary tool. Borrow (Degreeshadhave) to (steal) the above realization idea, say, concrete realization process.

1. Send get Screen command "adb shell screencap-p/sdcard/xxx.png"

2. Send the command "pull/sdcard/xxx.png" to copy the phone to the local disk

3. Get the topic area

3.1 Own mobile phone screen resolution of 1080*1920, phone length of 16.5cm, the title began to appear at the top of the picture is 3cm, the topic width is about 2cm (the title is 2 lines of text), this step, jump-jump AIDS has been achieved.

3.2 Call algorithm, from the phone to intercept the picture of the size of the topic area Bitmap map = GetPart (file, 0, 0, T , (int) (1920x1080 * (5.5- 3)/ 16.5), 0, (int) (1920x1080 * 3/ 16.5));

1         /// <summary>2         ///get picture specified section3         /// </summary>4         /// <param name= "Ppath" >Picture Path</param>5         /// <param name= "Ppartstartpointx" >the coordinate x value at which the target picture starts to draw (typically 0)</param>6         /// <param name= "Ppartstartpointy" >the Y-value of the coordinate at which the target picture starts to draw (typically 0)</param>7         /// <param name= "Ppartwidth" >the width of the target picture</param>8         /// <param name= "Ppartheight" >height of the target image</param>9         /// <param name= "Porigstartpointx" >the coordinate x value at which the original image starts to intercept</param>Ten         /// <param name= "Porigstartpointy" >y value of the coordinate at which the original image starts to intercept</param> One         PrivateBitmap GetPart (stringPpath,intPpartstartpointx,intPpartstartpointy,intPpartwidth,intPpartheight,intPorigstartpointx,intporigstartpointy) A         { -Image originalimg =Image.FromFile (ppath); -  theBitmap PARTIMG =NewBitmap (Ppartwidth, ppartheight); -Graphics graphics =graphics.fromimage (PARTIMG); -Rectangle Destrect =NewRectangle (NewPoint (Ppartstartpointx, ppartstartpointy), -                 NewSize (Ppartwidth, ppartheight));//Target Location +Rectangle Origrect =NewRectangle (NewPoint (Porigstartpointx, porigstartpointy), -                 NewSize (Ppartwidth, ppartheight));//original position (the size of the image that is captured by default from the original is equal to the size of the target picture) +  A Graphics. DrawImage (originalimg, Destrect, Origrect, graphicsunit.pixel); at  -             returnpartImg; -}
getpartpicture

3.3 Use the open source OCR recognition Library tesseract to identify the topics in the previous map

1      2         Public Static stringGetocrtext (stringStartpath,stringfileName)3         {4             varresult =string. Empty;5 6             if(string. IsNullOrEmpty (fileName))7             {8                 return string. Empty;9             }Ten  One             Try A             { -                  -                 using(varEngine =NewTesseractengine (Startpath +@"/tessdata","Chi_sim", Enginemode.default)) the                 { -                     using(varIMG =Pix.loadfromfile (fileName)) -                     { -                         using(varpage =engine. Process (IMG)) +                         { -result =page. GetText (); +                         } A                     } at                 } -             } -             Catch(Exception ex) -             { -             } -  in              -             returnresult; to}
Getocrtext

3.4 Remove line breaks in the topic and handle special characters.

3.5 Calling the browser, searching for the topic

1 Private voidSearch (stringsearchcontent)2         {3             4             //S is your default browser, but with the parameters behind it, cut it, but note that the parameters behind the different browsers are not the same! 5             //"D:\Program Files (x86) \google\chrome\application\chrome.exe"--"%1"6Process.Start (Browserpath,string. Format ("http://www.baidu.com/s?wd={0}", Searchcontent));7}
Search

Iv. issues

1. Question 1: Access to the topic area, sometimes a row, sometimes two lines, the picture size is not too fixed

2. Issue 2: From the Get Send command, will be copied to the local disk, the size of the problem area of the image, identify the title of the picture, call the browser search, rendering the search results of a total time of about 6s, the answer time only 10s, a little less than enough

V. Summary

Although, the end result is not too ideal, but this extrapolate exploration process is fruitful. From the beginning of OCR recognition does not support Chinese, to Tesseract Library project compilation failed, and then to search tesseract support Chinese identification dependent file Chi_sim.traineddata, is to solve the problem of the ability to exercise, is also the process of posture. Overall is good. Welcome to the Exchange, welcome to praise.

Project Address: Https://github.com/LightSmileMu/JumpToTop

Talk about C # and hoisting conference

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.