Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
rohinomiya / Sample_Send_AltTab.ahk
Created June 21, 2012 16:31
プロセス名を元に、そのアプリのウィンドウを操作する ref: http://qiita.com/items/198feae9488edc25c5d9
Send, {ALT DOWN}{TAB}
@rohinomiya
rohinomiya / Sample_HotString.ahk
Created June 21, 2012 13:43
AutoHotKeyで、IMEがOFFの時のみホットストリングを有効にする(文字置き換え) ref: http://qiita.com/items/7334577b7586fc3c2dd2
#include <ime> ; ime.ahk (【入手先】http://d.hatena.ne.jp/blechmusik2/20120126/1327510037)
#If ! IME_GET() ; IME がOFFの時だけ有効
::ahk::AutoHotKey
#If ; End #If
@rohinomiya
rohinomiya / SampleCommandLineArgs.ahk
Created June 19, 2012 16:59
AutoHotKeyで、コマンドライン引数を取得するサンプル ref: http://qiita.com/items/7ee04ffc03721559e94d
; コマンドライン引数を取得するサンプル
ArgCount=%0%
if(ArgCount==0)
{
MsgBox [使用法] %a_scriptname% [files..]
ExitApp
}
Loop, %ArgCount%
{
@rohinomiya
rohinomiya / autoclick_itunes.ahk
Created June 18, 2012 15:44
AutoHotKeyで、クリック作業を自動化する ref: http://qiita.com/items/a13239df948e4d7fa4d5
;iTunes の削除確認ダイアログ自動クリック
SetTitleMatchMode,2
#Persistent
SetTimer AutoClickiTunes,500 ; millisecond
return
AutoClickiTunes:
IfWinExist, iTunes ahk_class iTunesCustomModalDialog
{
@rohinomiya
rohinomiya / SampleControliTunes.ahk
Created June 14, 2012 14:53
AutoHotKey_L でCOMを利用してiTunes を操作する ref: http://qiita.com/items/b628202469f10ea2ca8e
; control iTunes
;
iTunes := ComObjCreate("iTunes.Application")
#right::
iTunes.NextTrack()
return
#left::
iTunes.PreviousTrack()
@rohinomiya
rohinomiya / .vimrc
Created June 13, 2012 14:12
VIMでAutoHotKeyスクリプトファイルの辞書補完を行う ref: http://qiita.com/items/59e8a157c5212dc21519
autocmd FileType autohotkey set dictionary+=~/.vim/dict/autohotkey.dic
@rohinomiya
rohinomiya / delay_f1.ahk
Created June 12, 2012 15:48
Microsoft Excel/Wordで、意図せずにF1キーを押しヘルプが暴発するのを防ぐ ref: http://qiita.com/items/b655115b3ba3e1eaafbe
#If WinActive("Microsoft Excel") or WinActive("Microsoft Word")
$F1::
KeyWait, F1, T0.2 ; 0.2秒以上キーが離されなかったら、ErrorLevel=1
if ErrorLevel
Send, {F1}
else
TrayTip, 警告, ExcelやWordでヘルプを表示するには、F1キーを長押ししてください。
; キーが離されるまで待つ
keywait, F1
@rohinomiya
rohinomiya / file0.bat
Created June 9, 2012 08:35
Watir でIEやGoogle Chromeを自動操縦する ref: http://qiita.com/items/389d75daa97e9d2275cc
gem update --system
gem install watir
gem install watir-webdriver
@rohinomiya
rohinomiya / copy_title_and_url.js
Created June 8, 2012 14:09
今見ているページのタイトルとURLをMarkdown取得するブックマークレット ref: http://qiita.com/items/55111e2b8e73b4542b89
javascript:(function(){prompt('今見ているページのタイトルとURL:コピーしてQiitaに貼り付けてください','* [' + document.title + ']('+document.URL+')')})();
@rohinomiya
rohinomiya / Set_Registry_Editor_AutoHotkeyScript.ahk
Created June 5, 2012 16:22
AutoHotKeyスクリプトを開く標準のテキストエディタを設定する ref: http://qiita.com/items/50de27ef9e498915146c
; Set text editor for editing AutoHotKey script.
ShowUsage(){
msgbox, [Usage]: %A_ScriptName% [FullPath of editor application]
}
ContainSpace(s)
{
StringGetPos, Pos, s, %A_Space% ,
return Pos >= 0