{"identifier":35701,"topic":"Commands","name":"drag","text":"<code><pre>drag from <i>point<\/i> to <i>point<\/i>\ndrag from <i>point<\/i> to <i>point<\/i> with <i>key1<\/i><u>\n<\/u>drag from <i>point<\/i> to <i>point<\/i> \u00ac\n   with <i>key1<\/i>, <i>key2<\/i><u>\n<\/u>drag from <i>point<\/i> to <i>point<\/i> \u00ac\n   with <i>key1<\/i>, <i>key2<\/i>, <i>key3<\/i><u>\n<\/u><\/pre><\/code> The<code> drag <\/code>command simulates the user dragging the mouse manually (except that you must use the<code> with shiftKey <\/code>option in order to select text in a field). <br>\n<br>\nThe<code> with <i>key<\/i> <\/code>options specify combinations of the<code> commandKey,<\/code> the<code> optionKey,<\/code> and the<code> shiftKey,<\/code> simulating the user holding down the key or keys while dragging. <br>\n","related":{"32047":"click at","70900":"dragSpeed","59412":"mouseLoc"},"examples":"","demo":"on mouseUp\n   set the cantModify of this stack to true\n   show bkgnd field \"Demo Field\"\n   show card picture\n   dragChart \"13,184,98,268\",70 -- Pile One\n   dragChart \"100,184,185,268\",133 -- Pile Two\n   dragChart \"185,184,270,268\",93 -- Pile Three\n   dragChart \"270,184,355,268\",140 -- Pile Four\n   dragChart \"355,184,440,268\",175 -- Pile Five\n   choose browse tool\n   wait 50\n   hide card picture\n   hide bkgnd field \"Demo Field\"\n   set cantModify of this stack to false\n end mouseUp\n <br><br>\n\n on dragChart theRect, theHeight\n   put item 1 of theRect into theLeft\n   put item 2 of theRect into theTop\n   put item 3 of theRect into theRight\n   put item 4 of theRect into theBottom\n   choose select tool\n   set the dragSpeed to 0\n   <b>drag<\/b> from theLeft,theTop to theRight,theBottom with optionKey\n   put round((theRight - theLeft)\/2 + theLeft) into locH\n   put round((theBottom - theTop)\/2 + theTop) into locV\n   doMenu \"opaque\"\n   set the dragSpeed to 200\n   <b>drag<\/b> from locH,locV to locH,(locV - theHeight) \u00ac\n   with optionKey,commandKey\n end dragChart\n ","debug":{"9":["drag from point to p"],"10":["The with key options"]}}