This article is published in acfun, please note
Http://www.acfun. TV /v/ac291028)
With the arrival of the Year of the Dragon, acfun will start a new year. In the new year, acfun always hopes to do something for the AC Niang, A hard-pressed programmer still writes some gadgets for AC and makes them an actool tool set. I hope this tool will bring you some convenience and provide more functions you want. Let's complete this together ~ Hope to wake up some potential AC personnel ~
The following tools are all open-source and can be freely spread and changed, but do not remove the acfun logo.
So this evening I will write a basic tutorial on "the landlord is a good guy" and C # programming.
I don't know if you often encounter welfare situations for the landlord. It is often because the landlord puts things on it. There is a bunch of "the landlord is a good person, and the good person is safe for life" and then leave a mailbox.
In this case, I have had so much time as the owner to capture the mailbox one by one. So I recently planned to learn the regular expression, and then I made a good email collector. (I will tell you that it is written because I leave my mailbox and do not receive any benefits)
Take this article
Auspicious year! All kinds of watermelon white silk black silk welfare map package to send!
Http://www.acfun. TV /v/ac290658/
For example
The address is ac290658.
Enter "capture". After a while, you can capture all the mailboxes.
Of course, to facilitate one-time welfare sending, you can set the separator number to a semicolon for sending (;)
Of course, Baidu Post bars can also be crawled by other normal websites.
In fact, as long as the expression has been written, everything can be captured, such as capturing some MP3 files and others.
For expression writing, we recommend that you use regexbuddy.
This tool can detect or graphically insert expressions very conveniently.
For example, you can change the expression to 115.com/file/ ([\ W-.] +) If you want to capture the 115 address left by the up Master in the comment)
In this way, the 115 address is captured. However, due to the time of tonight, I did not write a filter, and it may be repeated. At first, I thought I would not write = If my mailbox had its own filter.
The next step is to teach you how to expand actool by writing simple things. C #, which is easy to use, is recommended because it is basic #
In fact, programming is not as difficult as you think. Don't envy the technology house. They just know how to search for it better than you think.
C # is recommended for programming. It is easy to use as a little tool.
Then, we started to teach new users with a basic knowledge (eager to become a Technology House) as a small tool.
For example, the kind of image that Cao laoye has recently published is the kind of image that appears when you right-click the image and save it as RAR. It seems to be awesome, but it is actually very easy to implement.
How simple is it, Baidu?
Baidu discovered that only one
Copy/B a. jpg + B. rar C. jpg
The cmd command of can be implemented. That is, you just need to fill in the file to be created in the CMD with the check mark.
This is the principle. The software is to make the replication process simple, so we don't want to execute this command every time.
So let the software help us.
1: first install vs2010
2: open new-project-Visual C # select Windows Forms Application on the right
3: After confirmation, a blank box is displayed.
4: there are a bunch of controls on the left. label is the button for you to write text, and the textbox box is the input text box. You can drag the control in as it is.
Click a control and you will see the text attribute. You can change the text name.
Because it is a basic thing, we will simply introduce it. First, double-click the button control we dragged out.
Will automatically jump to the CS code file. This is what will happen when you press this button.
What should I do if I want him to execute the code above cmd? No.
Baidu, the newbie can find the C # code for executing the CMD command.
Public void runcmd (string cmd) // implicitly execute cmd
{
Process proc = new process ();
Proc. startinfo. createnowindow = true;
Proc. startinfo. filename = "cmd.exe ";
Proc. startinfo. useshellexecute = false;
Proc. startinfo. redirectstandarderror = true;
Proc. startinfo. redirectstandardinput = true;
Proc. startinfo. redirectstandardoutput = true;
Proc. Start ();
Proc. standardinput. writeline (CMD );
Proc. Close ();
}
It doesn't matter if you are a newbie. If you can use it, you will be able to understand the meaning of this code later.
This code is a "method", and the method cannot define another method, so we paste this code
Private void button#click (Object sender, eventargs e ){}
Outside
After the post, return to the empty
Private void button#click (Object sender, eventargs e ){}
Now we are writing code to {}. How can we write it? Because we just found the code for executing cmd, we can call the runcmd method directly.
Enter runcmd ("Notepad") in the empty ");
Then try to press F5 to start the program and click your button to see if a notepad exists?
That's right. I just laid the notepad line command under the CMD command and started notepad. so we only need to replace the above notepad with copy/B. JPG + B. rar c. JPG is enough.
However, files a \ B \ c are unknown, so you should select them by yourself. In this case, you can enter these addresses as parameters. To maximize convenience, I wrote a drag-in method.
I have already written the file path obtained by dragging the file into it. Since it is 0-based, I will talk about this for the time being, and the rest will be similar.
I have left a homework.
1: Refer to intercepting AC comments in batches. Make a Baidu Post. All comments of this post can be intercepted. Enter the Baidu Post ID to obtain all comments of this post.
2: perform a duplicate filter (Tip: use split to group the intercepted content and then use Baidu to filter the content .)
If you still don't understand it, please refer to my source code and learn more about Baidu. We hope that acfun talents will generate a large number of talents to contribute to the rebirth of AC in the new year!
Http://115.com/file/e7h0vvd2
Worker source code and program .rar