delay is needed after click not throughout the whole script

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 02aca3cb9c
commit 8d3c421e48
  1. 10
      src/frameworks/UBPlatformUtils_mac.mm

@ -661,16 +661,12 @@ void UBPlatformUtils::showOSK(bool show)
{ {
NSString *source = NSString *source =
@"tell application \"System Events\"\n\ @"tell application \"System Events\"\n\
delay 0.1\n\
if application process \"TextInputMenuAgent\" exists then\n\ if application process \"TextInputMenuAgent\" exists then\n\
delay 0.1\n\
tell application process \"TextInputMenuAgent\"\n\ tell application process \"TextInputMenuAgent\"\n\
delay 0.1\n\
tell menu bar item 1 of menu bar 2\n\ tell menu bar item 1 of menu bar 2\n\
delay 0.1\n\
ignoring application responses\n\ ignoring application responses\n\
delay 0.1\n\
click\n\ click\n\
delay 0.5\n\
end ignoring\n\ end ignoring\n\
end tell\n\ end tell\n\
end tell\n\ end tell\n\
@ -686,13 +682,9 @@ void UBPlatformUtils::showOSK(bool show)
} }
source = [source stringByAppendingString:@" running then\n\ source = [source stringByAppendingString:@" running then\n\
delay 0.1\n\
tell application \"System Events\"\n\ tell application \"System Events\"\n\
delay 0.1\n\
tell application process \"TextInputMenuAgent\"\n\ tell application process \"TextInputMenuAgent\"\n\
delay 0.1\n\
tell menu 1 of menu bar item 1 of menu bar 2\n\ tell menu 1 of menu bar item 1 of menu bar 2\n\
delay 0.1\n\
click menu item 2\n\ click menu item 2\n\
end tell\n\ end tell\n\
end tell\n\ end tell\n\

Loading…
Cancel
Save