Skip to content

Instantly share code, notes, and snippets.

View romichi's full-sized avatar

loromichi romichi

  • japan
View GitHub Profile
@romichi
romichi / sendInput.py
Created July 12, 2012 10:07
pythonからsendInputを使う
# -*- coding:utf-8 -*-
import time
from ctypes import *
import win32gui, win32con
PUL = POINTER(c_ulong)
class KeyBdInput(Structure):
@romichi
romichi / ScreenShot.cs
Created February 17, 2013 10:10
特定のアプリケーションのスクリーンショットを取得する
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
public struct RECT {
public int left;
public int top;
@romichi
romichi / SendKey.cs
Last active October 24, 2024 07:40
C#でSendInputを使う
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
class SendKey {
[StructLayout(LayoutKind.Sequential)]
private struct MOUSEINPUT {
public int dx;
public int dy;
@romichi
romichi / yahooLogin.py
Created May 13, 2013 11:12
pythonでyahooにログインする
# -*- coding:utf-8 -*-
import time
import mechanize
def yahooLogin(username, password):
print u"ログイン開始"
#mechanizeの設定
br = mechanize.Browser()
br.set_handle_robots(False) # robotsに従わない
@romichi
romichi / 2chCrawler.py
Last active December 30, 2015 14:09
2chのクローラ
# -*- coding:utf-8 -*-
import json
import codecs
from collections import defaultdict
import urllib.request
class Crawler():
def __init__(self):
@romichi
romichi / EyeTribeSample
Last active January 3, 2016 00:39
視線でマウスカーソルを操作する.右目を閉じるとEnterを押す
using System;
using System.Net.Sockets;
using System.Windows.Forms;
using TETCSharpClient;
using TETCSharpClient.Data;
using Newtonsoft.Json.Linq;
public class GazePoint : IGazeUpdateListener {
private TcpClient socket;