'現在のフォーカス位置へ文字列を送信します Dim instance As ScreenHwnd Dim msg As String 'Overloads instance.SendKey()
'Point構造体で表されるスクリーン座標値にマウスポインタを移動して、 'フォーカスを合わせる為にマウス左ボタンクリック後文字列を送信します Dim instance As ScreenHwnd Dim pt As System.Drawing.Point Dim msg As String 'Overloads instance.SendKey(pt, msg)
'x,yで表されるスクリーン座標値にマウスポインタを移動して、 'フォーカスを合わせる為にマウス左ボタンクリック後文字列を送信します Dim instance As ScreenHwnd Dim x As Integer Dim y As Integer Dim msg As String 'Overloads instance.SendKey(x, y, msg)
'+(プラス)と任意キーとの組み合わせでShift+キーを表します
"+a" 'Shift+A
"+c" 'Shift+C
'^(キャレット)と任意キーとの組み合わせでCtrl+キーを表します
"^a" 'Ctrl+A
"^c" 'Ctrl+C
'%(パーセント)と任意キーとの組み合わせでAlt+キーを表します
"%a" 'Alt+A
"%c" 'Alt+C
'~(チルダ)はEnterキーを表します
"~" 'Enter
'+、^、%、~そのものは{}でくくります
"{+}" '+
"{^}" '^
"{%}" '%
"{~}" '~
"{BACKSPACE}" 'BackSpace
"{BS}" 'BackSpace
"{BS 24}" 'BackSpaceを24回 その他キーも繰り返し数値指定可能
"{BREAK}" 'Break
"{CAPSLOCK}" 'CapsLock
"{CLEAR}" 'Clear
"{DELETE}" 'Delete
"{DEL}" 'Delete
"{ESCAPE}" 'Esc
"{ESC}" 'Esc
"{END}" 'End
"{TAB}" 'Tab
"{RETURN}" 'Return
"{ENTER}" 'Enter(テンキー)
"{HELP}" 'Help
"{HOME}" 'Home
"{INSERT}" 'Ins
"{NUMLOCK}" 'NumLock
"{SCROLLLOCK}" 'ScrollLock
"{PGDN}" 'PageDown
"{PGUP}" 'PageUp
"{LEFT}" '←
"{UP}" '↑
"{RIGHT}" '→
"{DOWN}" '↓
"{F1}" 'F1~F15まで
'ScreenHwndクラス SendKeyメソッド
Imports System.Windows.Forms
Public Class AddIn
Private shw As ScreenHwnd
Private std As Std
Public Sub New()
shw = New ScreenHwnd()
std = New Std()
MessageBox.Show("実行ボタンでX:200 Y:300の位置に文字列を送信します。")
End Sub
Public Sub AddIn_Start()
shw.SendKey(200, 300, "あういえおかきく{ENTER}")
End Sub
End Class
このページのQRコード
便利ウェブサイト
便利 Steam アプリ
便利 Android アプリ