Applescript numbers get active cell

I want to create a script that check the active cell or better / active column to auto switch keyboard layout from English to Korea and visa versa ....



I can't find it anywhere ....where to get active column? please help!!!

numbers app, apple script-OTHER, OS X El Capitan (10.11), apple script help

Posted on Oct 7, 2016 2:53 AM

Reply
6 replies

Oct 7, 2016 7:46 PM in response to okaypol

AppleScript to act on the current selection (whether the selection is a whole column or a single cell or some other range) is as follows:


tell application "Numbers"

tell front document's active sheet

tell (first table whose selection range's class is range)

tell selection range


-- do stuff here, e.g.:


-- set background color to "red"

-- set v to first cell's value

end tell

end tell

end tell

end tell



However, to switch keyboard layout I'm not sure why you would need to check specific range in Numbers. Perhaps you are thinking of looking at v (the value in, say, the first cell) to check whether it is in Korean or in another language?


SG

Oct 7, 2016 7:53 PM in response to SGIII

I am very grateful for your help! 😮


I'll try out what you wrote after writing this post~

I'm learning Korean so I want my keyboard to be Korean in column A and C


Cause they put me in a higher class and I need to save time somehow....The class is super fast....~.~


Like I select a cell in column A I want it to switch to Korean if I select a cell in column B or D it should change to English.



I just want to write in the language I prefer automatically


Is there a was to get the selection's column Alphabet ?

Oct 10, 2016 7:57 AM in response to okaypol

okaypol wrote:


Is there a was to get the selection's column Alphabet ?


To get the column letter you can do this:


tell application "Numbers"

tell front document's active sheet

tell (first table whose selection range's class is range)

tell selection range

set c to first cell's column's name

end tell

end tell

end tell

end tell



To get the column letter you can do this:


To get the column number use this:


setctofirstcell'scolumn'saddress


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript numbers get active cell

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.