ECクライアントでマクロにて画面操作を行うには
[UO][EC] Gump ID List
script GumpsParsing.PressButton(X, Y)
をテキスト入力ボックスに入力します。
X = このリストからのgumpID
Y = そのガンプで押したいボタンのインデックス番号
ガーデニングで使う画面のIDとボタンのインデックス番号をまとめた。
植木鉢でも花壇でも、まずは、それをターゲットして、ダブルクリック(使用)する必要がある。
マクロに備わっている「Store Default Object 1~5」で登録してからターゲットする場合
script HandleSingleLeftClkTarget( Interface.DefaultObject1 )
で、ターゲットしたアイテムをダブルクリック(使用)
<UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
最初の画面から、収穫画面へ移動
以下スクリプトに貼り付ける。
script GumpsParsing.PressButton(29842,1)
資源回収ボタンと、種収穫ボタンを交互に8階ずつ押す。(Delay 0.5秒挟む)
(User Dataのマクロ記述をそのまま示す)
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,6)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,7)" />
観葉植物化画面へ移動する。
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,8)" />
確定ボタンを押す。
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(42422,1)" />
もしくは、最初の画面に戻って、破棄する場合
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(22222,1)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(29842,12)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(29582,3)" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
こんな感じです。
で、さらなる効率化のために。
「Store Default Object 1~5」の分だけ同じように(コピペして)作れば、5つ指定して、5つ分の収穫が自動化される。
んで、観葉植物を剪定ハサミでチョキチョキするのもマクロ化できる。
ホットバーも一緒なんだけど、ドラッグ&ドロップでマス目に置くと、それは「使用(ダブルクリック)」になる。
ターゲットじゃない。
なので3つ目は、Target By Typeで、切る対象の植物を指定する。
Typeといっても、Hue(色)も一致してないと、認識してくれないと思う。

ーー
種植えマクロ
オブジェクトIDでターゲットする場合
script HandleSingleLeftClkTarget(オブジェクトID)
ClifeUI(カスタムUI)入れていれば、簡単にオブジェクトIDは取得できる。

9カ所のオブジェクトIDを調べると、こんな感じ。
script HandleSingleLeftClkTarget(1112178376)
script HandleSingleLeftClkTarget(1112178380)
script HandleSingleLeftClkTarget(1112178381)
script HandleSingleLeftClkTarget(1112178375)
script HandleSingleLeftClkTarget(1112178374)
script HandleSingleLeftClkTarget(1112178373)
script HandleSingleLeftClkTarget(1112178369)
script HandleSingleLeftClkTarget(1112178367)
script HandleSingleLeftClkTarget(1112178365)
なので、種をダブルクリックして使用 →カーソル待ち →上記でターゲット →現在のターゲットのマクロを組めばOK
こんな感じです。
まぁ手動でも問題ないような気もするけれど。

植木鉢に種をまくのも、マクロ化できる。
空の植木鉢に、Fertile Dirtを入れて、水を2回入れて、種を植えてガンプを閉じる。
ただ、空の植木鉢と、土が入った植木鉢はTypeで区別が出来るけれど、
種入りかどうかは区別できないので連続動かすと、初めのに水やりして「水浸し」になる。
改良の余地あり。
<UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="script Actions.TargetByType(5629, 0)" />
<UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
<UserAction type="WaitForTargetCursor" id="0" iconId="618" targetType="Cursor" />
<UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="script Actions.TargetByType(3969, 0)" />
<UserAction type="CursorTargetCurrent" id="0" iconId="643" targetType="Cursor" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="2.00" />
<UserAction type="UseObjectType" id="369229824" iconId="5634" targetType="Cursor" iconObjectType="0" iconObjectHue="0" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="1.00" />
<UserAction type="UseTargetedObject" id="0" iconId="646" targetType="Cursor" />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.50" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(29842, 6) " />
<UserAction type="Delay" id="0" iconId="623" targetType="Cursor" delay="0.20" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GumpsParsing.PressButton(29842, 6) " />
<UserAction type="UseObjectType" id="231669826" iconId="3535" targetType="Cursor" iconObjectType="0" iconObjectHue="0" />
<UserAction type="WaitForTargetCursor" id="0" iconId="618" targetType="Cursor" />
<UserAction type="UserCommand" id="5207" iconId="865005" targetType="Cursor" text="script Actions.TargetByType(5634, 0)" />
<UserAction type="CursorTargetCurrent" id="0" iconId="643" targetType="Cursor" />
<UserAction type="UserCommand" id="0" iconId="790" targetType="Cursor" text="script GenericGumpOnRClicked(WindowGetId(GenericGump.LastGump))" />
