activate application "Finder"
tell application "System Events" to tell application process "Finder"
if not (exists (first window whose subrole is "AXSystemFloatingWindow")) then
set needReset to true
keystroke "j" using {command down}
repeat until exists (first window whose subrole is "AXSystemFloatingWindow")
delay 0.1
end repeat
else
set needReset to false
end if
tell (first window whose subrole is "AXSystemFloatingWindow") to tell first group
# get value of slider 1 # To get the value in use in a window using default spacing
# set value of slider 1 to 50.0
end tell
# Hide the floating window if it was hidden on entry
if needReset then keystroke "j" using {command down}
end tell
Yvan KOENIG (VALLAURIS, France) jeudi 20 décembre 2012 16:40:17