08/04/26 02:24:52 +5+nJ7Ng0
S_WrapWindowWidthのマクロ自体がトグルなんだよね。
↓こんなので俺は我慢してるが、もっと上手くかけるはず
#Persistent ;Autohotkeyスクリプトの常駐
SetTimer, AutoWrapWindowWidth, 500 ;500m秒毎にAutoWarapWindowWidthを実行
return
AutoWrapWindowWidth: ;色を所得してショートカットキーを送るサブルーチンラベル
WinGetPos X, Y, Width, Height, ahk_class TextEditorWindow
Y1:=Height - Y ;サイドスクロールバーの”▼”部分のy座標
PixelGetColor, color, 20, Y1, RGB ;(20,Y1)の色を所得
if color3=0x000000 ;色が黒(000000)ならば
send,!^{u} ;Alt + Ctrl + U (現在のウィンドウ幅で折り返し)
return