Guide of misleading script? PathPoints index
Hello
I have had trouble finding how to access the PathPoint positions today.
Apparently, the correct way to do this is by writing something like this: app.activeDocument.pathItems [itemIndex] .pathPoints [pointIndex]
That makes sense (pathPoints is a table) and it works fine and everything. Large.
Now why in Illustrator Scripting Reference - JavaScript (CC 2015) PDF, page 138, this method is suggested: (itemKey) index, type number:, returns: PathPoint, "Gets an element from the collection."?
I tried to use it and the only thing I got is this error message "app.activeDocument.pathItems [0].pathPoints.index is not a function" (with pathPoints.index (0) for example) which leads me to believe that there is no index method in the API... Is this correct or am I just being very stupid and not to use the method correctly?
I take the time to write about it because it seems that I'm not the only one having this problem:
https://forums.Adobe.com/thread/440700
EDIT:
In addition, it seems pathPoints [pointIndex] works, but PathPoints [pointIndex], as it is written in the guide, is not.
I don't think it works because it is holding an anchor properties and try to re-destribute them? I think that a more manual method of each of the pathPoints collection in a table, re-ordering and build a new path through setEntirePath out of them.
Tags: Illustrator
Similar Questions
-
Complete reference guide from FrameMaker 12
Hi all, you know if there is a comprehensive reference guide for 12 FrameMaker? I have search in the web but I have found none. Thanks for your help.
Best regards
12 FrameMaker is a rich and complex. There is no single complete reference guide; such a book would be thousands of pages long:
- Start with the User Guide and online help.
- If you use the structure, read the Guide from the developer of Structure and Structure Developers-Reference.
- If you write scripts, read the Guide to the script and JavaScript Tools Guide.
- If you use the FDK (FrameMaker Developers Kit) to write plugins, read the FDK programmers Guide and reference Guide of FDK.
There is much more in addition to the foregoing. For a good index of available documents, see this web page:
http://www.daube.ch/docu/fmaker69.html
It covers documentation Adobe and third parties.
-
Hello
I'm looking to generate a report that describes a set of rules and the number of times where these rules have triggered alarms, similar to the information, you can find via rule Diagnostics > Diagnostic details. I think I need to use the methods RuletteStats, under foglightserver/console/script-help/index.html, but it is not documentation.
The question arises with obtaining the amount of times that have triggered alarms, I can find the name rules fairly easily. In addition, it is possible to get exactly the amount of time the alarms have shot for a certain period of time or is just the number of times that alarms fired altogether?
Thanks for your suggestions in advance.
Dillon
I don't know your exact use case, but the cartridge alarm analysis has a collection option. Maybe he has what you are looking for.
Best regards, Bart
-
Hello, I'm doing: Script error: Index Out of Range the following
Sprite (spriteNumber) .member = member (pBoard [cardNumber], "Cards")
This is a cast: maps where I have 10 cast members. I have a matrix of 20 cards in a game of memory and the cast members have half the number of matrix. But I can't over this error that won't go away no matter how hard I try.
The script which is placed on the chassis reads as follows:
-Definable properties
property pSpriteOffset, pDisplayDelay, pGameOverFrame
property pClickSound, pMatchSound, pNoMatchSound
property pNumberOfCards - the number of cards in the game
property pBoard - contains a list of what the cards are where the
property pCard1 - the first map of a clicked on pair
property pCard2 - the second card in a pair clicked on
property pCardTimer - the moment where a user clicked on the second map
on getPropertyDescriptionList me
List = [:]
-pSpriteOffset is used to determine how far to
-the first map of the upper part of the partition is
-so, if the first map begins to channel 11.
-the offset would be 10 (10 away from channel 1).
List of addProp, #pSpriteOffset,------.
[#comment: 'Card Sprite Offset', \]
#format: #integer,
[#default: 0]
-pDisplayDelay, how much is it ticks the pair of
-cards will be kept on the screen for the player
-to see before being removed or turned their backs
addProp list, #pDisplayDelay,------.
[#comment: "Display time-out,"------]
#format: #integer,
#default: 60,.
[#range: [#min: 0, #max: 240]]
-When the user clicks a sprite, the sound is played?
List of addProp, #pClickSound,------.
[#comment: 'Click', \]
#format: #sound,
[#default: 'click']
-If a sprite is matched, this sound is played?
List of addProp, #pMatchSound,------.
[#comment: 'The match', \]
#format: #sound,
[#default: 'fit sound']
-When a sprite does not match, the sound is played?
List of addProp, #pNoMatchSound,------.
[#comment: "Not of his Match,"------]
#format: #string,
[#default: ' "]
-When all the sprites are matched, the film, which frame to go to?
List of addProp, #pGameOverFrame,------.
[#comment: 'Game Over Frame', \]
#format: #marker,
[#default: #end]
back list
end
-shuffles the cards to generate a list of the pBoard
-Initializes the properties of game
on beginSprite me
-raises reference to library 'Maps' to see how many cards there are
pNumberOfCards = the number of members of castLib "cards".
-create a list with each card in the list twice
List =]
Repeat with i = 1 to pNumberOfCards
Add to the list, I have
Add to the list, I have
end repeat
-randomly populate the list of pBoard with elements of
-the previously created list
pBoard =]
Repeat while list.count > 0
r = random (list.count)
Add pBoard, list [r]
deleteAt list, r
end repeat
-initialization of set's properties
pCard1 = 0
pCard2 = 0
end
-called by the sprites when the user clicks on
-the spriteNumber parameter indicates the number of sprite clicked
on turnCard me spriteNumber
-play a sound, if there is a
If pClickSound <>' ' then puppetSound 1, pClickSound
-determine the number of card
cardNumber = spriteNumber - pSpriteOffset
If pCard1 = 0 then--first card clicked
-Save this map
pCard1 = cardNumber
-put it back
Sprite (spriteNumber) .member = member (pBoard [cardNumber], "Cards")
otherwise if pCard2 = 0 alors--deuxieme card clicked
-ignore if it's the same card
If cardNumber = pCard1 then exit
-Save this map
pCard2 = cardNumber
-put it back
Sprite (spriteNumber) .member = member (pBoard [cardNumber], "Cards")
-the timer
pCardTimer = ticks
else - two maps are already given {6}
-This occurs if the user clicks very quickly
-the strength of a look at the two maps
returnCards (me)
-Make sure that the card has not clicked twice
If sprite (spriteNumber) .memberNum = 0 then exit
-new card as the first map
pCard1 = cardNumber
-put it back
Sprite (spriteNumber) .member = member (pBoard [cardNumber], "Cards")
end if
end
-leans on two back cards and compares them
on returnCards me
If [pCard1] pBoard = pBoard [pCard2] then - they are a match
-play a sound, if there is a
If pMatchSound <>' ' then puppetSound 2, pMatchSound
-remove the two sprites {8}
Sprite(pCard1+pSpriteOffset).memberNum = 0
Sprite(pCard2+pSpriteOffset).memberNum = 0
-check for game over
If checkAllMatched (me) then
go to the pGameOverFrame framework
end if
on the other - no match
-play a sound, if there is a
If pNoMatchSound <>' ' then puppetSound 2, pNoMatchSound
-Turn the two cards {7}
Sprite (pCard1 + pSpriteOffset). Member = member ("card Back")
Sprite (pCard2 + pSpriteOffset). Member = member ("card Back")
end if
-reset set properties
pCard1 = 0
pCard2 = 0
end
on exitFrame me
If pCard1 <>0 and pCard2 0 then <>- two cards are turned
If ticks > pCardTimer + pDisplayDelay then - deadline expired
-check the maps to see if there is a football match
returnCards (me)
end if
end if
-loop on the frame
_movie. GB (_movie. Frame)
end
-check to see if the game is over
on checkAllMatched me
-loops through all the cards
Repeat with i = 1 to pNumberOfCards
-determine the sprite of the card
spriteNumber = i + pSpriteOffset
-If it's still a card, the game is not over
If sprite (i) .memberNum <>0 then return FALSE;
end repeat
-all the cards missing, then game on
Returns TRUE
end
and this is the script which is placed on the sprite in the matrix:
on mouseUp me
-just specify the script to frame this sprite has been clicked
sendSprite(0,#turnCard,me.spriteNum)
end
Well, I'm just to let anyone reading know that I finally solved my problem after much thought and looking at the code again and again.
That's what I did:
Here, I noticed that there is some code to add a list of twice
-create a list with each card in the list twice
List =]
Repeat with i = 1 to pNumberOfCards
Add to the list, I have
Add to the list, I have
end repeat
so I thought, what I mean is only a part of this list on my matrix and I finally got one brilliant idea that somewhere in this code there is another list to add. Then I looked carefully and finally the assumption that:
-randomly populate the list of pBoard with elements of
-the previously created list
pBoard =]
Repeat while list.count > 0
r = random (list.count)
Add pBoard, list [r]
deleteAt list, r
end repeat
a preceding
Add pBoard, list [r]
in the code once so maybe I have to add another
That's why I ended up with:
-randomly populate the list of pBoard with elements of
-the previously created list
pBoard =]
Repeat while list.count > 0
r = random (list.count)
Add pBoard, list [r]
Add pBoard, list [r]
deleteAt list, r
end repeat
that solved my error and now the game works. What a relief!
-
Local partitioned Global Index Index conversion online.
Hi all
I use the Release of oracle 10.2.0.4.0 version. As a solution to solve a performance problem, I intend to convert one of the partitioned local index in overall index. Here is the script that I made, but it will take a time out as because other applications may use the same index and will suffer from performance during the transition problem. My question is if I can reach the same onlline, only because the prod database is too busy down time? Please suggest.
Script:
drop index INDX_c1c2;
create the IDX_c1c2 index on tab1 (c1, c2);930254 wrote:
Hi all
I use the Release of oracle 10.2.0.4.0 version. As a solution to solve a performance problem, I intend to convert one of the partitioned local index in overall index. Here is the script that I made, but it will take a time out as because other applications may use the same index and will suffer from performance during the transition problem. My question is if I can reach the same onlline, only because the prod database is too busy down time? Please suggest.Script:
drop index INDX_c1c2;
create the IDX_c1c2 index on tab1 (c1, c2);
Your application will run without index during the time it takes to create. An alternative approach which avoids this would be:
create index INDX_c1c2null on tab1(c1,c2,null); drop index INDX_c1c2;
--
John Watson
Oracle Certified Master s/n
http://skillbuilders.comPublished by: JohnWatson on February 17, 2013 11:35
Typo - forgot to change the name of the index -
Properties property example javascript in Adobe introduction to scripting does not work?
I am completely new to scripting so I thought I would start with the guide Adobe pdf script.
Page 18 it gives examples of 3 ways to use properties. The first 2 work very well, but the third simply ignores the part of the properties even when I directly copy paste it.
It's the Tip:
JS also provides a properties property, which allows you to set multiple values in a statement. You
Place all of the values between the braces ({}). Within the braces, you use a colon (:)) to separate one)
name of the property of its value and the pairs of value of property name/separation of property by using a comma (,).
myDoc var = app.documents.add)
myLayer var = myDoc.layers.add)
myLayer.properties = {name: "my new layer", visible: false}
So I know about Photoshop, you must use ArtLayers, but even in Illustrator it added another layer without renaming or the definition of visibility.
Anyone has an idea why this does not work?
That might work for Illustrator but it does not for Photoshop. I'll see if I can find this owner of documents and bring them to clean it. See my post above for links to the Photoshop documents. You can try to post your Illustrator questions or comments on the Illustrator scripts forum.
-
Why import data if ready schema and index create, increase in Undo TableSpace
I have a problem importing data.
When I export data don't have schema import include the index schema.
And then I import the schema ready.
When I import data, I find this Undo TableSpace increase very fast.
I have therefore two tests.
1. IMPORT of data and index, every thing ok look
2 import a schema includes index
and then import data. Undo Tablespace very rapid increaseIf you mean undo tablespace increase in order to read consisten read.
N ° cancel space use increases due to the DML. (requests for consistent readings read undo, they generate no cancellation to grow)
so you're saying that redo log appear, rollback undo segment will increase.
N ° increase in written cancellations results increase in roll forward.
IF we import large data, we must export data with the index and import data right now
If you import large data, you must create the indexes after the data is imported. If the index definitions are included in the export, the default behavior is that import will create them once the data is imported. To do this, undo lower for indexes.
Note This will generate redo for the creation (but does not cancel and therefore not generate recovery for cancellation). You can avoid this by manually running CREATE INDEX... NOLOGGING - but it means you need to get and modify the scripts CREATE INDEX.Hemant K Collette
-
I created a group of 40 different icons (phone, star, diamond, etc.) and I need to apply 150 colors to each of these icons then save each icon individually as a PNG with a file name of < ICONNAME - COLORNAME.png >. These 150 colors have already been defined with the names of individual custom colors in a color group, that I created called "MyColors".
I understood the part of export PNG of javascript (and this script is available in every sense) but my scripting skills suck, and I'm not sure what I need to do to get there. I read the Guide to Illustrator scripts (I lost pretty quick) and I did some research for scripts, but without a bit of luck. I thought the best way to address the issue was to put each of the different icons (phone, star, diamond, etc.) on a single layer, each in a different illustrator file and then run the script on each file to automatically generate the colors and layers I need within each file. I could then run a script on each export file PNG. Or is there a better way to create these png?
I know it's asking a lot and I hate to ask, but I'll lose my mind if I have to do it by hand. Can someone help me with this script? I'd be happy to throw some money your way (or give it to the charity of your choice)!
I'm on Illustrator CS5/CS6...
1. When you add a new layer, the layers.length changed, and "var oldLayer = layers [i];" will always point to the wrong layer. If you must store the original layers in an array first.
2. for (var k = 0; k)< oldlayer.pathitems;="" k++)="" should="" be="" for="" (var="" k="0;" k="">< oldlayer.pathitems.length;="">
3 oldLayer.name = oldLayer.name;?
4 nLayer.pathItems [k] .selected = true; In the script you need not first select object to change color.
So, here you go:
var docRef = app.activeDocument; with(docRef) { var grp = swatchGroups.getByName('Rob'); var grpList = grp.getAllSwatches(); var originalLayerLength = layers.length; var oldLayers = []; for (var i = 0; i < originalLayerLength; i++) { oldLayers[i] = layers[i]; } for (var i = 0; i < oldLayers.length; i++) { var oldLayer = oldLayers[i]; oldLayer.visible = true; for (var j = 0; j < grpList.length; j++) { var nLayer = layers.add(); nLayer.name = oldLayer.name + '-' + grpList[j].name; for (var k = 0; k < oldLayer.pathItems.length; k++) { oldLayer.pathItems[k].duplicate(nLayer, ElementPlacement.PLACEATBEGINNING).fillColor = grpList[j].color; } } } }
I can't test because I don't have a document that you have.
-
Hyperion Planning Security to calc scripts
Hello
Please let me know how to assign security to Hyperion Planning calc scripts.
Thank you
ArouneI agree you must guide far using scripts calc for the planning of apps, well, if you have a night or more processes not requiring variables, then they can be useful.
You have the choice of the classic original way of the rules by EAS and calc Manager to version 11, both you can assign a user/group level security.See you soon
John
http://John-Goodwin.blogspot.com/ -
strange situation: index normally works, but preferences are missing
Hello
I was wondering if anyone has seen this before:
I have a couple of instances, one for development and one for production (Oracle XE).
View CTX_USER_PREFERENCES and I see all the preferences, I defined that, in the case of dev I can question serve as parameters for the context index I defined.
In the case of production, installed with EXP/IMP, there is no trace of these preferences, but context queries function normally. Also, if I generate the DDL for these clues I can see missing preferences are mentioned, but if I try to specify it in a new index, it tells me that there is no preference.
I tried to see if the mark CTX_PREFERENCES of SYS could make a difference, but it's not.
I'm stumped...
Flavio
----
http://oraclequirks.blogspot.com
http://www.yocoya.comHello
This is normal behavior if you use exp/imp, see the note 468599.1 on the Support of Oracle. The index will continue to work, but a change will lead to errors (missing preference).
If the preferences must be exported by hand, or use ctx_report.create_index_script to create a script for indexes.
Herald tiomela
http://htendam.WordPress.com -
I already used script (JavaScript) in the first, After Effects and Photoshop to help manage our projects and workflow in the House and I would like to be able to configure scripts for SOUL, but I'm unable to find any documentation on the reference or guide to the script for this application. The info I found say that SOUL is scriptable, but so far I have not seen any documentation or the example script.
to fix this is to change the setting to interpret the film, but this can be done in a per-file basis, manually one by one.
Not true. In the SOUL, select a bunch of files and click file | Interpreting the film. You can change both their interpretation.
-Jeff
-
I was debugging c# code that runs locally and I could create breakpoints and see what runtime objects are loaded and so on.
I wonder how to debug the workflow that I develop on desktop and run on the instance remote vcac. Is - it possible, or I'm away. How the development team develop / debug their vcac works?
Thank you in advance.
Hi Bernard, it is not quite clear to me where the problem is that you are experiencing. That is why I détaillerait the steps I would take to debug the script:
1. I have split the tasks for each workflow steps in several clues that are called via a main script (wrapper). (I would use a logic as described in http://d-fens.ch/2013/12/05/vcac-dynamically-execute-scripts-in-externalwfstubs-workflows-with-powershell/).
2. each index that you want to debug (or simply the script main wrapper) would have some kind of code on top that would be a kind of logical expectation (a "lock") that he would wait on. For this, I use logic as shown in (http://d-fens.ch/2013/11/16/synchronisation-issues-in-vcac-workflows-and-how-to-solve-them/).
3. now that the main workflow script is pending, you can run any code you want to asynchronously (with or without the ISE). In order to be able to process the same VM that uses your workflow script you need to retrieve the name of the virtual machine (or preferably the guid) for the script. Then, resolve you and retrieve the virtual computer object via a call like this:
PS > $Machine = $MgmtContext.VirtualMachines |? VirtualMachineID - eq "77b7bad5 - 65 c 8-4fe4-b977-24ff060e691e";
where $MgmtContext is the variable containing the vCAC management environment (as described in http://d-fens.ch/2013/10/10/investigating-the-vcac-5-2-mgmtcontext/) and "77b7bad5 - 65 c 8-4fe4-b977-24ff060e691e" is the guid of the machine currently being put into service.
To just get the 'new' machine created, you can run a call like this (in an environment where only you provisions of resources that could be easier than to note the guid of the machine):
PS > $MgmtContext.VirtualMachines | Select-Object VirtualMachineID, VirtualMachineName, VMCreationDate | Tri - VMCreationDate for property descending | Select-Object - 1 first;
4. When you run and test your script in ISE make sure you load all the assemblies again (even if they are already loaded into the PowerShell session) because it is a different process. Make sure that you run the ISE under the same account as service vcac account or specify credentials when you connect to the repository vcac. When you have loaded the script file to run and debugging (Ctrl + O) set a breakpoint in the script either through F9 FM "Set-PSBreaktPoint", and then use the interactive Shell (Ctrl + D) to type in the name of the script to run (in the same way that you would have executed him in the workflow). Using the breakpoint and single-step, you are now able to work through the script and do some checking and adjustments.
5. at the end of testing and debugging remove you the "lock" in step (2) so the main script continues to run and takes up the procurement process.
Keep in mind that there is only a timeout set how long a workflow can run, then when you need more time to make sure to increase this value.
So in short; the trick is to make the scripts (which are called by vCAC for a given workflow stage) wait, then you can start a session on your own to run asynchronous code element yourself. However, you will not be able to "break" into a script that is run from the workflow vCAC itself (different session, different processes).
Hope that makes things a little more clearly.
Best regards, Ronald
-
import of JavaScript instructions
Hi all
< code >
import java.awt.*. *;
Javax.script import. *;
Javax.swing import. *;
class c
{
/*-----------------------------------------------------------------------------------------------------*/
Public Shared Sub main (String... args)
{
ScriptEngine engine;
Engine = new ScriptEngineManager () .getEngineByName ("JavaScript");
try {}
Engine.put ("button", new JButton());
System.out.println (Engine.eval ("instanceof java.awt.Component button"));
}
catch (Throwable t)
{
System.out.println (t);
}
}
}
< code >
Is it possible to send statements of import to the engine, so that I don't have to write a full qualified class name (java.awt.Component)?
Thank youhttp://download.Oracle.com/javase/6/docs/TechNotes/guides/scripting/programmer_guide/index.html
Search for importPackage, importClass.
-
marking of the words in a .txt file
Hi all
We have looked everywhere on the internet for a script we can use/buy. But can not find it anywhere.
We have a fairly large document and an external list of words in a .txt file. This list contains the words that should be in the index at the end of the document.
Instead of a few hundred words filling and by linking them to the hand, it would be great if there is a script that can handle this.
We watched in Indexmatic2 (http://www.indiscripts.com/post/2011/07/indexmatic-2-public-release-and-user-s-guide ), but this script generates its own list of index and creates no links to the original words in the document.
We found a script that can create indexes links between words colored in the document.
Then someone knows if there is a script floating around that can load an external .txt wordlist and either color or add a character style to words in a document?
Or even a script that does what you need in 1 GB?
Thank you
Thedesmodus,
There is a script by Martin Fischer at www.hilfdirselbst.ch (swizz-German site) that might meet your needs. You can download it if you choose to be a premium member, which requires a small fee. It is written for InDesign CS3 but it should work with CS4 or CS5. I tested it with a small list of words, and it worked very well with InDesign CS5.
If you prefer a Google translation:
Uwe
-
Flash CS5 beginner - need help with Add URL link animated banner
I apologize if this is a very basic question, but I am a newbie in Flash design. I created a basic animation in Flash CS5 and I need to add a clickable URL link. I tried a few tutorials that seemed promising, but none of them solved my problem. I tried a number of things, including the conversion to parts or all of the simple images buttons or movies and linking them this way as well as type in the code ActionScript 2 and 3, which none was successful. The animation plays correctly in my browser, but when I click it, the link does not work. I wish that the entire banner clickable to take viewers to the website linked instead to use the text of the hyperlink. Also, when I open the Code snippets window, it is empty, any image or image I selected. Do I need to import snippets of code somewhere or just will I things the wrong way? Any help is greatly appreciated!
go to your help section and search the reference Guide of Action Script 3. It is the repository of all the possibilities of ActionScript with Flash and Flex. You can consult the alphabetical index URLRequest and navigateToUrl. There could even be code samples included. I haven't looked right, but you'll probably get before doing so.
Best,
-markerline
Maybe you are looking for
-
Stuff missing GPL for 6.4.0 released
When the Netgear will release the GPL sources for the 6.4.0 output? The page http://kb.netgear.com/app/answers/detail/a_id/2649/~/gpl-open-source-code-for-programmers does not list 6.4.0 so far.
-
I used Lotus Approach Windows XP for many years. The program seems to work with Windows 7 Pro, but when I try to export or import data files txt that approach branches into a message text of ODBC installation that does not work. It worked perfectly u
-
print to file window appear!
Hello When I print the file or whatever it is this window pops up (print to file) name of the output file and I have pic >
-
With the help of CTS EX60 without CUCM
Hello I want to test the solution of telepresence CTS EX60 without registering to CUCM or other platform. Is there a way to attribe him a private IP address and do NAT to test if it works or not? I have a CTSMX200 registered to CUCM, and I want to us
-
vMotion between ESX 3.5 5.1 ESXi MAchines?
Hi guys I need to know if possible to a Vmotion between ESX 3.5 s machines to ESXi 5.1?I hace 2 servers with ESX 2.5 I want to do the update to 4.1 and then to 5.1 hot, for that, I have 4 new esxi 5.1.