4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HiMacroEx (マウス、キーボード操作自動化)メモ

Posted at

Windows10で動かすときはCOMDLG32.OCXが必要になる
XTRM Runtime をインストールすればOK

cmdを使う

クリップボードに今の時刻をコピー

cmd
@echo %time:~0,2%%time:~3,2% | clip
Enter

Excelをファイル指定で起動

cmd
@"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\1206y\Downloads\HiMacroEx\HiMacroEx\Test用.xlsx"
Enter

w Test用.xlsx- Excel

' 2秒待つ
2000

@A1に値をいれたよ!

現在時刻をExcelブックのシート名に入力する

cmd
@echo %time:~0,2%%time:~3,2% | clip
Enter

#TIME = GetClip
MsgBox #TIME

@"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\1206y\Downloads\HiMacroEx\HiMacroEx\Test用.xlsx"
Enter

' 3秒待つ
5000

w Test用.xlsx - Excel

' 3秒待つ
3000

' シート名を編集
LAlt Down
H
O
R
LAlt Up
' シート名を入力
Key #TIME
Enter

ほかのアプリケーションとの連携

cmd
@echo %time:~0,2%%time:~3,2% | clip
Enter

#time= GetClip
MsgBox #time

@"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\1206y\Downloads\HiMacroEx\HiMacroEx\Test用.xlsx"
Enter

' 3秒待つ
5000

w MarketSpeed

' 3秒待つ
3000

'---------------------
' デスクトップアプリ「Market Speed」をアクティブ化
w Market Speed Ver16.4

' 1秒待つ
1000

'--- 投資情報クリック ---
MousePos(520,70)
LMouse Down (520,69)
LMouse Up (520,69)

'--- ランキング情報クリック ---
MousePos(77,491)
LMouse Down (77,492)
LMouse Up (77,492)


'--- 値上がり率上位銘柄クリック ---
MousePos(355,120)
LMouse Down (355,121)
LMouse Up (355,121)

MousePos(322,145)
LMouse Down (321,145)
LMouse Up (321,145)

'--- 検索クリック ---
MousePos(603,135)
LMouse Down (603,134)
LMouse Up (605,134)

'--- クリップボードコピークリック ---
1000

MousePos(712,127)
LMouse Down (712,126)
LMouse Up (712,126)
1000
Enter

#stock_data= GetClip

'---------------------
' 「Excel」をアクティブ化
w Test用.xlsx - Excel
' A1を選択
LCtrl Down
HOME
LCtrl Up
@#stock_data

' シート名を編集
LAlt Down
H
O
R
LAlt Up
' シート名を入力
Key #time
Enter

使ってみた感想
ほんの数時間で実務に役立ちそうなことができた。
配列はアイディアで何とかなりそう

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?