2022/04/23(土) [n年前の日記]
#2 [windows] AutoIt3用のSciTEの設定を少し変更
AutoIt (AutoIt3) は、Windows上で、特定のアプリにショートカットキーを送信したりして操作を自動化できるツール。
今回、Windows10 x64 21H2 上に AutoIt3 3.3.16.0 x86 をインストールして少し触ってみたのだけど、付属エディタ SciTE (SciTE4AutoIt3) の設定がちょっとアレだったのでカスタマイズしてみた。
_AutoIt Script Editor Downloads - AutoIt
上記ページから、SciTE4AutoIt3_Portable.zip をダウンロードして解凍。AutoIt3 インストールフォルダ\SciTE\ に上書きコピーした。
今回、Windows10 x64 21H2 上に AutoIt3 3.3.16.0 x86 をインストールして少し触ってみたのだけど、付属エディタ SciTE (SciTE4AutoIt3) の設定がちょっとアレだったのでカスタマイズしてみた。
_AutoIt Script Editor Downloads - AutoIt
上記ページから、SciTE4AutoIt3_Portable.zip をダウンロードして解凍。AutoIt3 インストールフォルダ\SciTE\ に上書きコピーした。
◎ 設定ファイルの内容。 :
設定ファイルは、SciTE を起動して、Options → Open User Options file、を選択すれば開ける。
内容は、以下にした。
_SciTEUser.properties
内容は、以下にした。
_SciTEUser.properties
import au3.keywords.user.abbreviations
import au3.UserUdfs
autocompleteword.automatic = 1
# set UTF8
code.page=65001
character.set=128
# set SJIS (Japanese)
# code.page=932
# character.set=128
# code.page=0
# character.set=204
# font setting
if PLAT_WIN
technology=1
font.monospace=font:HackGen,size:16
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
font.vbs=$(font.monospace)
# .au3 style
# Comment line
style.au3.1=fore:#008000
# Comment block
style.au3.2=fore:#008000
tabbar.visible=1
tabbar.multiline=1
statusbar.visible=1
title.full.path=1
# line number
line.margin.visible=1
line.margin.width=6+
margin.width=4
# tab size
tabsize=4
indent.size=4
use.tabs=0
# recent file
save.recent=1
save.session=1
load.on.activate=1
#save.on.deactivate=1
are.you.sure.on.reload=1
virtual.space=1
visible.policy.strict=1
visible.policy.lines=4
# fold.symbols=3
# shortcut keys
user.shortcuts=\
$(user.shortcuts)\
Ctrl+Space|IDM_COMPLETEWORD|\
Alt+Up|2620|\
Alt+Down|2621|
◎ 少し説明。 :
記述内容を少し説明。
import au3.keywords.user.abbreviations import au3.UserUdfsAutoIt3用(.au3)の設定ファイルをインポート。
autocompleteword.automatic = 1文字を打つと自動補完ウインドウが開くように指定。
# set UTF8 code.page=65001 character.set=128 # set SJIS (Japanese) # code.page=932 # character.set=128 # code.page=0 # character.set=204日本語文字列は UTF-8 として扱う。
# font setting
if PLAT_WIN
technology=1
font.monospace=font:HackGen,size:16
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
font.vbs=$(font.monospace)
フォント設定。全部モノスペースフォントにして、フォント種類は HackGen を指定した。「if PLAT_WIN」は、Windows上で動かした時に有効。「technology=1」を指定すると DirectWrite による描画になるらしい。# .au3 style # Comment line style.au3.1=fore:#008000 # Comment block style.au3.2=fore:#008000.au3 ファイル内のコメント部分が斜体で表示されるのが嫌なので、斜体の指定を外した。
tabbar.visible=1 tabbar.multiline=1 statusbar.visible=1 title.full.path=1タブバーを表示。
# line number line.margin.visible=1 line.margin.width=6+ margin.width=4行番号を表示。
# tab size tabsize=4 indent.size=4 use.tabs=0タブ文字のサイズを4文字に。かつ、タブ文字ではなくスペースにする。
# recent file save.recent=1 save.session=1最近開いたファイルを有効化。
load.on.activate=1 #save.on.deactivate=1 are.you.sure.on.reload=1 virtual.space=1 visible.policy.strict=1 visible.policy.lines=4 # fold.symbols=3巷の解説ページからよく分からずにコピペ…。
# shortcut keys user.shortcuts=\ $(user.shortcuts)\ Ctrl+Space|IDM_COMPLETEWORD|\ Alt+Up|2620|\ Alt+Down|2621|ショートカットキーを設定。
- Ctrl+ Spaceを補完キーにした。
- Alt+Up、Alt+Down に、選択範囲の上下移動を割り当て。
◎ 余談。 :
SciTE4AutoIt3 には、KODA FormDesigner という、AutoIt3用のGUIデザインツールも同梱されていた。SciTE上で Alt+M を叩いたら起動した。
_KODA FormDesigner [Koda]
_KODA FormDesigner [Koda]
[ ツッコむ ]
以上です。