set position {0,0} of element accessibillityTitle via Applescript I have a UI element called accessibillityTitle with value Layers and I want to position this element in the top right corner, but I don't know how to acces it via Applescript. I have found the element using Accessibility Inspector and here is what the rest looks like.  

AXApplication
    AXWindow:AXDialog
Attributes
    isAccessibilityFocused  NO
    accessibilityTitle  Layers
    accessibilityGrowArea   &lt;nil&gt;
    accessibilityMinimizeButton &lt;nil&gt;
    accessibilityDocument   &lt;nil&gt;
    accessibilityCloseButton    &lt;nil&gt;
    isAccessibilityMain NO
    accessibilityFullScreenButton   &lt;nil&gt;
    accessibilityProxy  &lt;nil&gt;
    accessibilityDefaultButton  &lt;nil&gt;
    isAccessibilityMinimized    NO
    accessibilityChildren   10 items
    accessibilityRole   AXWindow
    accessibilityParent &lt;AXApplication&gt;
    accessibilityTitleUIElement &lt;nil&gt;
    accessibilityCancelButton   &lt;nil&gt;
    isAccessibilityModal    NO
    accessibilitySubrole    AXDialog
    accessibilityZoomButton &lt;nil&gt;
    accessibilityRoleDescription    dialog
    accessibilityToolbarButton  &lt;nil&gt;
    accessibilityFrame  x=1038.00 y=23.00 w=240.00 h=773.00
    accessibilityIdentifier com.pixelmatorteam.pixelmator.layers.palette
Actions
    accessibilityPerformRaise


How can I use set position to {1280, 0} to this element?
Actually I dealt with a similar case, when I wanted to move a previously generated dialog to the top-right corner of my screen.
I only succeeded in doing so thru a 2nd script that was launched simultaneously, but had a "repeat nothing until" loop built in to await the dialog's pop-up. In my experience, no matter what I tried, the dialog would hinder an "in-script moving" while its window stayed open ...
(I attached both to a folder: I just had to add #2 to its list.)   

In script #1 the final command reads:

tell application "Finder" to display dialog DL_display as string with ¬
  title "Recent downloads" buttons {"Close"} default button 1


The 2nd one:

tell application "Finder"
    set screenRgt to bounds of the window of desktop  --&gt; independent of
    set rightEdge to (item 3 of screenRgt) - 425      --&gt; screen resolution
end tell
tell application "System Events" to tell process "Finder"
    repeat while not (exists window "Recent downloads")
    end repeat
    delay 0.1
    set position of window "Recent downloads" to {rightEdge, 61}
end tell


You can see there's a (minute) delay after "repeat-nothing". Even waiting 0.1s sometimes my MacMini's so busy that the delay's too short, and the dialog remains centered ...
(To make sure set a higher value, say: 0.5.)
My "Recent downloads" Workaround #2 for Safari can be found HERE.