set N to text returned of (display dialog "반복할 횟수를 입력하세요." default answer "")
try
set A to N as integer
-- if A > 0 and A < 10 then
-- exit repeat
-- else
-- display dialog "Your entry was out of bounds"
-- end if
on error
display dialog "An Integer, Please"
end try
--repeat A times
-- say "hello"
-- end repeat
delay 2
repeat A times
(*
tell application "Extra Suites" to set kd to ES keys down
*)
tell application "System Events"
keystroke "%" using {shift down, command down}
(* keystroke tab *)
delay 0.5
keystroke (key code 76)
delay 0.1
keystroke (key code 124)
delay 0.1
(*
set userInput to display dialog "반복 중지하려면 'q'를 누르세요." buttons {"q"} default button "q"
-- 사용자 입력 확인
set userChoice to button returned of userInput
-- 'q'가 입력되면 반복 종료
if userChoice is "q" then
exit repeat
end if
*)
end tell
(* *)
end repeat
댓글