• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do I alter value of stepper in Numbers, please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I alter value of stepper in Numbers, please


  • Subject: How do I alter value of stepper in Numbers, please
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 30 Mar 2015 10:15:14 +1100

G’day scripters

I’m trying to set the Graph vertical increment in a Numbers Chart, but can’t click on or select the Text Field for the stepper.

It will accept a value, but I cannot work out how to ‘lock’ the entered value. I’ve tried sending a keystroke, but it still reverts to its old setting.

Any advice please on how I can alter the stepper text field value, and have it ‘stick’.

Regards

Santa

tell application "Numbers"
activate
tell document 1
set maxValue to ""
try
tell sheet 1
tell table 1
set maxValue to 0
repeat with x from 2 to count of cells of column "B"
if value of cell x of column "B" > maxValue then set maxValue to value of cell x of column "B"
end repeat
end tell
end tell
if maxValue > 10000 then
set chartInterval to (maxValue + 10000) div 10000
else
if maxValue > 1000 then
set chartInterval to (maxValue + 1000) div 1000
else
if maxValue > 100 then
set chartInterval to (maxValue + 100) div 100
else
if maxValue > 10 then
set chartInterval to (maxValue + 10) div 10
else
set chartInterval to (maxValue + 1) div 1
end if
end if
end if
end if
end try
end tell # document 1
try
if chartInterval = "" then set chartInterval to "Auto"
tell document 1
tell sheet 1
set width of chart 1 to (width of chart 1)
end tell
end tell
end try
activate
tell application "System Events" to tell process "Numbers"
# tell window 1
tell current application to delay 0.2
click radio button 2 of radio group 1 of window 1
tell current application to delay 0.1
click radio button 1 of radio group 1 of scroll area 3 of window 1
tell current application to delay 1
say (exists text field 3 of scroll area 3 of window 1) --< true
try
click text field 3 of scroll area 3 of window 1
end try
try
select text field 3 of scroll area 3 of window 1
end try
tell current application to delay 0.1
set value of text field 3 of scroll area 3 of window 1 to chartInterval as text —< works, but doesn’t ‘stick’.
# keystroke chartInterval as text
tell current application to delay 0.1
keystroke return
#end tell
end tell
end tell

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How do I alter value of stepper in Numbers, please
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Spinning Pizza Wheel. Why?
  • Next by Date: Re: How do I alter value of stepper in Numbers, please
  • Previous by thread: Re: Spinning Pizza Wheel. Why?
  • Next by thread: Re: How do I alter value of stepper in Numbers, please
  • Index(es):
    • Date
    • Thread