Skip to content

Commit

Permalink
type function
Browse files Browse the repository at this point in the history
  • Loading branch information
PhosCity committed Dec 6, 2022
1 parent 8215e37 commit 2d8d9f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
16 changes: 9 additions & 7 deletions aegisub
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ xdo() {
xdotool click 1
}

# type key $1 in the keyboard
# press a key $1 in the keyboard
key() {
sleep "${SLEEP_DURATION}"
xdotool key "$1"
}

# type $1 in the keyboard
type() {
sleep "${SLEEP_DURATION}"
xdotool type "$1"
}

# File selector. The extention of file is $1
select_file() {
# Create cache file if it doesn't exist
Expand Down Expand Up @@ -278,14 +284,10 @@ case "${PLUGIN_NAME}" in
xdo 705 536 # Click on 7
xdo 734 367 # Click on Scale x
key ctrl+a
key 1
key 0
key 0
type 100
xdo 738 399 # Click on Scale y
key ctrl+a
key 1
key 0
key 0
type 100
xdo 730 436 # Click on OK Button
asswipe
;;
Expand Down
8 changes: 7 additions & 1 deletion template
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ xdo() {
xdotool click 1
}

# type key $1 in the keyboard
# press a key $1 in the keyboard
key() {
sleep "${SLEEP_DURATION}"
xdotool key "$1"
}

# type $1 in the keyboard
type() {
sleep "${SLEEP_DURATION}"
xdotool type "$1"
}

# File selector. The extention of file is $1
select_file() {
# Create cache file if it doesn't exist
Expand Down

0 comments on commit 2d8d9f9

Please sign in to comment.