objective c - Are we able to call dictation feature on Mountain lion on button click -


mountain lion dictation feature invoked default while pressing fn key twice in text control.

i know if possible invoke same feature other controls , events, example invoke after button click event?

i application use default dictation feature provided mountain lion. cross platform application (wxwidgets) has editor derived wxcontrol, not have default behaviour invoking dictation feature; feature works works fine if use default text control instead.

please suggest.

thanks

you can try this:

nsapplescript *scriptforcmdkey = [[nsapplescript alloc] initwithsource:@"tell application \"system events\"\nset theprocess first process frontmost true\ntell theprocess\nrepeat 2 times\nkey down {command}\nkey {command}\nend repeat\nend tell\nend tell"]; [scriptforcmdkey executeandreturnerror:nil];  nsapplescript *scriptforfnkey = [[nsapplescript alloc] initwithsource:@"tell application \"system events\"\nset theprocess first process frontmost true\ntell theprocess\nrepeat 2 times\nkey code 63\nkey code 63\nend repeat\nend tell\nend tell"]; [scriptforfnkey executeandreturnerror:nil]; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -