score:0
you're mixing photoshop and illustrator dom: photoshop doesn't have pathitems.ellipse
or pathitems.rectangle
methods. check the photoshop scripting reference to look for specific methods. you can use this snippet to create rectangular or elliptical paths in photoshop:
/**
creates a new path or adds to an existing path
example: createpath({
addtopath: false, // will create a new path
type: 'rctn', //'elps' for ellipse
top: 50,
left: 50,
bottom: 150,
right: 150
})
*/
function createpath(data)
{
if (data == undefined) return false;
data.addtopath == undefined && data.addtopath = false;
data.type == undefined && data.type = 'rctn'; //'elps';
var desc10 = new actiondescriptor();
var ref4 = new actionreference();
if (data.addtopath)
ref4.putenumerated(ctid('path'), ctid('ordn'), ctid('trgt'));
else
ref4.putproperty(ctid('path'), ctid('wrpt'));
desc10.putreference(ctid('null'), ref4);
var desc11 = new actiondescriptor();
desc11.putunitdouble(ctid('top '), ctid('#pxl'), data.top);
desc11.putunitdouble(ctid('left'), ctid('#pxl'), data.left);
desc11.putunitdouble(ctid('btom'), ctid('#pxl'), data.bottom);
desc11.putunitdouble(ctid('rght'), ctid('#pxl'), data.right);
desc10.putobject(ctid('t '), ctid(data.type), desc11);
executeaction(ctid(data.addtopath ? 'addt' : 'setd'), desc10, dialogmodes.no);
function ctid(s)
{
return app.charidtotypeid(s);
};
function stid(s)
{
return app.stringidtotypeid(s);
};
}; // end of createpath()
Source: stackoverflow.com
Related Query
- Undefined is not an object in photoshop scripting
- Getting undefined is not an object in React native when rendering
- Undefined is not an object evaluating this.state.*
- undefined is not an object (evaluating '_this2.props.navigation.navigate') - React Native
- react-native undefined is not an object (evaluating RCCManager.setRootController)
- React-Native - TypeError: undefined is not an object evaluating useContext
- undefined is not an object (evaluating '_reactNative.PropTypes.string') Error
- How to fix TypeError: undefined is not an object (evaluating 'state.routes')
- TypeError: undefined is not an object (evaluating 'this.setState')
- undefined is not an object (evaluating 'this.props.navigator.push')
- undefined is not an object (evaluating 'RCTWebSockerManager.connect') -- React Native
- evaluating ( this.props.navigator ) Undefined is not an object
- TypeError: undefined is not an object (evaluating 'appState.remove')
- undefined is not an object evaluating NativeReactModules.startApp
- Undefined is not an object (evaluating 'navigator.permissions.query')
- Expo SDK32 undefined is not an object (evaluating '_expo2.default.KeepAwake')
- TypeError: undefined is not an object in React
- Undefined is not an object while filtering a Flatlist
- React can not convert undefined or null to object
- dataSource.rowIdentities undefined is not an object React-Native
- TypeError: undefined is not an object (evaluating 'object['body']')
- Why am I getting Render Error undefined is not an object (evaluating 'listing.image')?
- [React Native, RN]TypeError: undefined is not an object (evaluating 'route.params')
- TypeError: undefined is not an object (evaluating 'this.localVideoref')
- TypeError: undefined is not an object (evaluating 'state.routes.find')
- TypeError: undefined is not an object (evaluating 'undefined.state') with React-router-dom
- TypeError: undefined is not an object (evaluating '_this.props.auth(values.username, values.password).then')
- TypeError: undefined is not an object - reactjs
- Why do I get TypeError: undefined is not an object (evaluating 'items.items.map') when removing a component?
- MERN: TypeError: undefined is not an object (evaluating 'this.props.params.id')
More Query from same tag
- Warning: A component is changing an uncontrolled input of type text to be controlled
- onChange for input React JS makes typing render slow
- Calculate sum of values in state with React Hooks
- Make Table Column Draggable React
- How to show/hide component in parent component via a button in a child component when using a map of buttons?
- React/Gatsby: Wrong div loads for a brief moment when conditional rendering
- Displaying state list in JSX
- How do I delete an Item from an array save on local storage?
- Regex for 2 words, non-numeric, and one space
- Best way to compare a string to a deeply nested string value of an object property?
- Dropdown increasing its size after selecting options (React)
- How to template a variable in a javascript file with webpack 4
- Convert json data in reactjs
- How does React Router get into the React context?
- Implementing an online game in react
- How to handle 15+ useStates in reactJS
- React class component unusual this binding on methods
- How do I extent multiple components' styles in styled-components
- Why Tooltip from primereact library doesn't work to tag <pre>?
- I want when i got 401 error code then application will logout. But in my case , logout api call but it is not logout properly
- Kendo React Treelist - Select/Deselect the checkboxes column's values' based on an external dropdown selection
- Separate templates to external file in React
- react render don't show anything
- PropTypes for specific children components
- How to change button background color and text color using setSate in react?
- Next js: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- React Button Click should change the display value of div
- Action creator in Redux giving error: TypeError: Cannot read property 'filter' of undefined
- write SVG text from keyboard
- FluentUI/React - Get key of dynamic checkbox list onChange