Multiple guide sets

In another thread a poster asked about multiple guide sets:
http://forums.adobe.com/message/4062904#4062904
It would seem that this should be fairly simple to achieve with writing guides’ properties into the metadata (possibly a dedidcated layer’s xmpMetaData) in sets and subsequently loading them from there.
One could even do just one dialog with an entry field for entering a name when saving a guide set and a dropDownList to load or remove such sets.
So I wonder if anybody either has already done something like this or has a (better) idea on the issue?
Thanks for any feedback.

Just a couple of amendments to it...
#target photoshop
app.bringToFront();
// Photoshop CS5 or better
function main(){
if(!documents.length) return;
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
// Set up metadata namespace
if (ExternalObject.AdobeXMPScript == undefined)  ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var psNamespace = "http://ns.ps-scripts.com/1.0/";
var psPrefix = "psscripts:";
XMPMeta.registerNamespace(psNamespace, psPrefix);
existingGuidePresets = [];
existingGuidePresets = getGuideArray();
var guides = app.activeDocument.guides;
var gH = '';
var gV = '';
for( var g = 0; g < guides.length; g++ ){
    if(guides[g].direction.toString() == 'Direction.HORIZONTAL'){
        gH+=(parseInt(guides[g].coordinate.value));
        gH+=',';
        }else{
            gV+=(parseInt(guides[g].coordinate.value));
            gV+=','
gH=gH.replace(/,$/,'');
gV=gV.replace(/,$/,'');
app.preferences.rulerUnits = startRulerUnits;
var win = new Window( 'dialog', 'Custom Guides' );
g = win.graphics;
var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
g.backgroundColor = myBrush;
win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
win.g1 = win.p1.add('group');
win.g1.orientation = "row";
win.title = win.g1.add('statictext',undefined,'Custom Guides');
win.title.alignment="fill";
var g = win.title.graphics;
g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
win.g5 =win.p1.add('group');
win.g5.orientation = "row";
win.g5.alignment='fill';
win.g5.spacing=10;
win.g5.st1 = win.g5.add('statictext',undefined,'Existing Presets');
win.g5.dd1 = win.g5.add('dropdownlist');
win.g5.dd1.preferredSize=[300,20];
for(var w in existingGuidePresets){
    win.g5.dd1.add('item',existingGuidePresets[w].toString().match(/[^#]*/));
win.g5.dd1.selection=0;
win.g10 =win.p1.add('group');
win.g10.orientation = "row";
win.g10.alignment='fill';
win.g10.spacing=10;
win.g10.bu1 = win.g10.add('button',undefined,'Remove Preset');
win.g10.bu2 = win.g10.add('button',undefined,'Use and Append Guides');
win.g10.bu3 = win.g10.add('button',undefined,'Use and Remove Guides');
win.g15 =win.p1.add('group');
win.g15.orientation = "row";
win.g15.alignment='fill';
win.g15.st1 = win.g15.add('statictext',undefined,'New Preset Name');
win.g20 =win.p1.add('group');
win.g20.orientation = "row";
win.g20.alignment='fill';
win.g20.spacing=10;
win.g20.et1 = win.g20.add('edittext');
win.g20.et1.preferredSize=[300,20];
win.g20.bu1 = win.g20.add('button',undefined,'Add New Preset');
win.g200 =win.p1.add('group');
win.g200.orientation = "row";
win.g200.bu1 = win.g200.add('button',undefined,'Cancel');
win.g200.bu1.preferredSize=[350,30];
win.g10.bu1.onClick=function(){//Remove preset
if(existingGuidePresets.length == 0) return;
existingGuidePresets.splice(win.g5.dd1.selection.index,1);
win.g5.dd1.removeAll();
for(var w in existingGuidePresets){
    win.g5.dd1.add('item',existingGuidePresets[w].toString().match(/[^#]*/));
win.g5.dd1.selection=0;
putGuideArray(existingGuidePresets);
win.g10.bu2.onClick=function(){//Use and append guides
if(existingGuidePresets.length == 0) return;
win.close(0);
var ar1 = existingGuidePresets[win.g5.dd1.selection.index].toString().split('#');
var Hor = ar1[1].toString().split(',');
var Ver = ar1[2].toString().split(',');
for(var H in Hor){
    activeDocument.guides.add(Direction.HORIZONTAL,new UnitValue(Number(Hor[H]),'px'));
for(var V in Ver){
    activeDocument.guides.add(Direction.VERTICAL,new UnitValue(Number(Ver[V]),'px'));
win.g10.bu3.onClick=function(){//Use and remove existing guides
if(existingGuidePresets.length == 0) return;
win.close(0);
clearGuides();
var ar1 = existingGuidePresets[win.g5.dd1.selection.index].toString().split('#');
var Hor = ar1[1].toString().split(',');
var Ver = ar1[2].toString().split(',');
for(var H in Hor){
    activeDocument.guides.add(Direction.HORIZONTAL,new UnitValue(Number(Hor[H]),'px'));
for(var V in Ver){
    activeDocument.guides.add(Direction.VERTICAL,new UnitValue(Number(Ver[V]),'px'));
win.g20.bu1.onClick=function(){//New preset
if(app.activeDocument.guides.length == 0){
    alert("No guides exist");
    return;
if(win.g20.et1.text == ''){
    alert("You need to enter a name for the new preset");
    return;
win.close(0);
currentGuides = win.g20.et1.text + "#" + gH + "#" + gV;
existingGuidePresets.push(currentGuides);
putGuideArray(existingGuidePresets);
win.center();
win.show();
function getGuideArray(){
var xmp;
var newGuideArray=[];
xmp = new XMPMeta( app.activeDocument.xmpMetadata.rawData );
var Count = xmp.countArrayItems(psNamespace, "GuideArray");
for(var i = 1;i <= Count;i++){
newGuideArray.push(xmp.getArrayItem(psNamespace, "GuideArray", i).toString());
return newGuideArray;
function putGuideArray(gArray){
var xmp;
xmp = new XMPMeta( app.activeDocument.xmpMetadata.rawData );
xmp.deleteProperty(psNamespace, "GuideArray"); 
for(var g in gArray){
xmp.appendArrayItem(psNamespace, "GuideArray", gArray[g].toString(), 0, XMPConst.ARRAY_IS_UNORDERED);
app.activeDocument.xmpMetadata.rawData = xmp.serialize();
function clearGuides() {
   var id556 = charIDToTypeID( "Dlt " );
       var desc102 = new ActionDescriptor();
       var id557 = charIDToTypeID( "null" );
           var ref70 = new ActionReference();
           var id558 = charIDToTypeID( "Gd  " );
           var id559 = charIDToTypeID( "Ordn" );
           var id560 = charIDToTypeID( "Al  " );
           ref70.putEnumerated( id558, id559, id560 );
       desc102.putReference( id557, ref70 );
   executeAction( id556, desc102, DialogModes.NO );
main();

Similar Messages

  • Multiple Guide Sets in Photoshop

    I've been able to find very little documentation (mostly just user requests) about having multiple guide sets in Photoshop. I really think this would be a useful tool. Has anyone heard anything about this feature (maybe in upcoming versions - can it be done another way)?

    J Baloney, did I push a button? First of all, I find it a little silly (and sad) you retracted/edited your original reply to me of "Good luck, level 12 guru. Be sure to look out for my noise in your next post. I'll make sure it's level one for you next time, punk." I don't know... maybe you realized I wasn't talking directly to you or about your replies, or maybe you realized calling me a punk was you just being hypocritical. You see, that's what the phrase "in general" means (that something isn't directly in response to the current conversation or topic). I even said so in what you quoted me as saying in your reply above.
    When you opened your reply (actually, it was your edited reply from what I pasted above) with "That's because the majority of your posts are feature requests.", you should have just left it at that.Now that I think about it - how the hell do you know what the majority of my posts are about - are you keeping track? If that's what you think (the majority of my posts...), doesn't it stand to reason I don't need a bunch of replies about possible solutions that (I think) any knowledgeable Photoshop user would have thought about in the first place? If you think about it, by the time you chimed in, I had already said (at least twice) how a series of actions would not benefit my issue. Then you throw in a lesson about how I should "Try reading the responses with the mindset... when they might be wrong" - thanks for the lesson, coach. I don't believe I said any response was "wrong" - I'm pretty sure I only went so far as to say how that particular response was either not really related to the core of the issue or that the response was more of a "band-aid" than a permanent solution (even temporary). I bet you watch CNN because that whole network likes to reword what's said to fit whatever point they are trying to make.
    Good luck. Be sure to look out for my noise in your next post. I'll make sure it's level one for you next time, grand master. I've got say I do take delight in knowing that PS employees who cruise
    this forum skip over queries with multiple posts, as they take that to
    mean it's been answered.
    Thank you for proving my point to... the... "T". Not only is it childish of you to claim you are going to follow me around this forum (maybe you already do since you know what the majority of my topics are about) just to add a bunch of "noise" to my posts, you bring up the exact reason I don't want a bunch of people replying with suggestions that (if they would have thought) aren't a future-forward solution. The more time I have to waste in replying (kind of like the time I've wasted with this reply) with how a user's suggestion wouldn't work for me (and I also take the time to explain why), the less likely I'm going to get an answer or suggestion by someone who might actually have either experienced what I am talking about or can read between the lines enough to know what I'm looking for in an answer. I don't come in here looking for a fight or for pointless arguments (even though arguments can sometimes yield in a solution no one would have thought about by being totally nice), but sometimes the arrogance from people (when they are told their answer isn't what I was looking for) takes over the whole post and nothing gets solved. Simply put, your idea/reply just wasn't what I was looking for - not to mention you basically regurgitated what JJMack already said.
    Jesus, I think I will just go back to the days I actually talked directly to the software engineers and had a lot of success as part of a group of beta testers - there are several programs out there in which my ideas are a part of (although I haven't done so with Adobe - become a beta tester). People on these forums take things too personal and get their feelings hurt and I end up appearing to be the bad person to others who simply skim the surface in reading some of these posts.
    Oh, and what you're really looking for is a grid.
    Uh, that would be a "no" - I'm looking for a way to have "multiple guide line sets" (as the topic states) - nothing to do with grids - but good effort [is this what you wanted to hear even though you are way off-topic]?
    In case you're not familiar with google. Oops, level one hint dropped. Awww, snap.
    Google? What on earth is that? Where would I be able to buy one of those things? Do they have multiple guide line sets I could use?
    To close - my analogy [you may have to look up that word] of level 1 and level 12 was not meant to imply I'm any "grand master" or "punk guru". It was to emphasize how some responses I read (from other forums/posts) can sometimes be so out of touch with the actual topic, and as you mentioned, the more responses a topic gets, the less likely the ones who "really" know the answer would be inclined to read the topic. So, if it is your desire to discombobulate [another word for you to look up] me and sabotage my posts by adding your "noise", at least I have it in your writing so I can forward to Adobe forum moderators.
    Now, to JJMack
    If you want help with available Photoshop versions use the Photoshop Windows, Photoshop Macintosh and Photoshop Scripting Forums.The way I see it your posting to the wrong forum. 
    I'm not posting in the wrong forum - I think I can discern where my particular issue should go. At the time of my original post, I wasn't requesting for a feature - I was asking if anyone had heard about multiple guide sets and/or if anyone had heard about this being talked about for future releases. Now, if/when I would have been told this was not a current feature and/or they had never heard anyone else talking about it, THEN I would have thought to search for the website to request the function.
    Anyway, I'm done with this topic. I will just use 2 separate documents (if needed) in order to have different sets of guide lines. The funny thing is all this time has been wasted on an instance that's only come up one time with me. I just thought there might be an easier way to accomplish my issue for any future needs. I think I will just tell the client "one version only, next"! That's what you call a joke/humor just in case you read that wrong too.

  • I have multiple computers set up on homesharing under one itunes account. Can I use face time on all of them or do i need seperate accounts for each?

    I have multiple computers set up on homesharing under one itunes account. Can I use face time on all of them or do i need seperate accounts for each?

    I'd suggest you consider a cloud-based file sharing service such as Dropbox for this sort of use. iOS is not designed to be synched with more than one iTunes library at a time, so attempting to use it as you describe, connecting a single iPad to multiple computers, almost certainly won't work as you intend and is likely to cause nothing but headaches.
    Regads.

  • How Data Integrator supports multiple character sets in a single ETL transaction

    <p>When using Data Integrator (DI) to process a mix of multi-byte and single-byte data, it is recommended that you use UTF-8 for the job server codepage. You can, however, use different codepages for the individual datastores.</p><p>Imagine this situation : Great Big Company Inc. wants to create a global customer database. To do this, Great Big Company Inc. must read from a database of US customers, and a database of Korean customers. Great Big Company Inc. then wants to load both sets of customers into a single database.</p><p>Can DI manage these requirements? Of course. The codepage is the thing.</p>

    I've never seen this used the way you are using it. In my experience the only way to do this would be to execute a single SQL statement that returns multiple result sets - you are trying to append two SQL statements.
    You could define an in-line procedure wrapping your two select statements, or you could define a stored procedure to do the same thing. Then (either way) use CallableStatement to execute the call to the procedure.

  • How to multiple/ parellal sets of books to generate more than one financial statement based on different (or the same) accounting principles.

    How to multiple/ parallel sets of books to generate more than one financial statement based on different (or the same) accounting principles.
    My Client needs Parallel Ledger in SAP B1 similar like SAP ECC. Is this functionality available ?

    Dear Mr. Nagrajan,
    Thank you for your response. I have already gone through documents but not able to understand. Is there any setup for this ? or its just work around i.e. using template and special field in JV i.e. Ref. 1 /2
    My doubts :
    I understand that Chart of Account structure is one and common for IFRS and other accounting method. We need to create only those account separately ( 2 times with prefix like IFRS revenue account, GAAP Revenue account).
    Now at time of entry, Assume some entries / adjustment are specifically for IFRS and not for other ledger. In this case, What need to do ?
    You have mentioned about DTW approach but do we need to insert all JV's again with other ledger ?
    Someone suggested that if any entry which are specific to IFRS Ledger, We need to user Ref.1 /2 column or Transcation code column and in which we can put IFRS
    Based on this, Need to create 2 seperate template for IFRS and other ledger for all report.
    This is my understanding of Solution in SAP B1. Please help me to clarify my though process
    Please do needful.If you have done implemenation and if you can share doucment, it would be great help.
    Email :[email protected]

  • Matching across multiple character sets

    Would like to know whether anyone has attempted matching across multiple character sets, for example, between English and Japanese: what are the pitfalls to avoid, what are the best practices, and what you would like to see from application/tools perspective as an ideal solution. thanks

    If you upgrade to Logic Pro, you'll get WaveBurner as part of the package which helps you do this, including tweaking your pauses between tracks, fades etc.
    If you have Toast, you can do it there too.
    If you don't have any 3rd. party software, the work around would be to assemble all your songs in order, end to end in a new Logic file, and listen to all your tracks and adjust the relative levels between songs, then bounce out the individual tracks which have volume changes with their new volume settings. Finally you could then use any burning app such as [SimplyBurns|http://bit.ly/c1oglP] to create CDs or bounce them out in Logic with the additional .mp3 option.
    Obviously it's important to listen to your material in order, in context, as some songs will be at the wrong subjective level depending on the tracks either side in the placement. This isn't really important in digital distribution where your material probably won't be listened to as a whole, but as individual downloads.

  • Multiple characater set data

    I have data in multiple character sets, eg. ASCII, IBM850, Windows1252, UTF8 etc. I want to insert them into the database. How do I specify the character set of the data at bind time in ODBC.
    If this is not possible, what is an alternative?

    thanks matt; despite a questionable layout for this setup i think that you'll end up with problems exporting those values to xml as you can't join them in a say, people subset, as each person is basically a standalone value.
    in any case i can argue that this is a real deal breaker for a bunch of organizations given that you would expect a simple multiple choice field based on existing lookup values with an optional possibility to populate the set with new values for the end user (based on your permission) -- or alternatively a text input with auto suggestion based on lookup values that allows you to add/remove multiple records via [+/-] which again end up in one single field.

  • One attribute assigned to Multiple Attribute Sets

    Hello There,
    I have created general attributes like Firs_Name (Character - 40), Last_Name (Character - 40) & Age (Numeric - 3) and assigned them to Multiple Attribute sets like Family_Info1, Family_Info2 & Family_Info3.
    Then i have assigned the above mentioned 3 Attribute sets to a BP.
    The problem is, when i maintain the info in Family_Info1 for First_Name, Last_Name & Age, system is updating the Family_Info2 & Family_Info 3 with the sames values and if i maintain the Family_Info2 with a different Value, the Family_Info1 is overwritten with Values from Family_Info2.
    Pls advise, if this is the standard SAP behavior and i should create different Attributes for different Attribute Sets (Like First_Name1 for Family_Info1 & First_Name2 for Family_Info2 etc) OR, it could be a SAP Bug or i need to do some config to fix this issue.
    Thanks and Regards.

    This is the standard behaviour and you can create different attributes and assign them to these different attribute sets to avoid this.
    Prakash

  • Stored Procedure With Multiple Result Sets As Report Source : Crosspost

    Hello Everyone,
    I have an issue where i have created a stored procedure that returns multiple result sets
    /* Input param = @SalesOrderID */
    SELECT * FROM Orders TB1
      INNER JOIN OrderDetails TB2 ON  TB1.ID = TB2.ID
    WHERE TB1.OrderID = @SalesOrderID
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Shipping'
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Billing'
    This is just a quick sample, the actual procedure is a lot more complex but this illustrates the theory.
    When I set the report source in Crystal X to the stored procedure it is only allowing me to add rows from the first result set.
    Is there any way to get around this issue?
    The reason that I would prefer to use a stored procedure to get all the data is simply performance. Without using one big stored procedure I would have to run at least 6 sub reports which is not acceptable because the number of sub reports could grow exponentially depending on the number of items for a particular sales order.
    Any ideas or input would be greatly appreciated.
    TIA
        - Adam
    P.S
    Sorry for the cross post, I originally posted this question [here|/community [original link is broken];
    but was informed that it might be the wrong forum
    Edited by: Adam Harris on Jul 30, 2008 9:44 PM

    Adam, apologies for the redirect, but it is better to have .NET posts in one place. That way anyone can search the forum for answers. (and I do not have the rights to move posts).
    Anyhow, as long as the report is created, you should be able to pass the datasets as:
    crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
    Of course alternatively, (not sure if this is possible in your environment) you could create a multi-table ADO .NET dataset and pass that to the report.
    Ludek

  • CC / RAR 5.2 - Multiple Rule Set Question

    How does the system handle the use of multiple rule sets in CC / RAR 5.2?
    For example, letu2019s say I want to keep a standard SAP rule set in tact to use for testing and comparison in RAR, but I also want to load another one.
    I realize that only 1 can be the u201CDEFAULTu201D so what does that mean?  I know that a risk analysis is only run against the rule set you set as default.  I also know that you can select the rule set to use in processing when you manually run either through Informer or Configuration tab a risk analysis.  What I am really concerned with is what happens if you take the results to u201Cmanagement reportsu201D from 2 different rule sets?
    First, can you even do it?
    Second, if you can, then I think you must have to come up with a different RISKID configuration schema for each rule set otherwise, I do not see how you can differentiate from which rule set the violation is generated.  That said, you will also need to export the report information into Excel and make any u201Crule set sortu201D there as I donu2019t see a way to do it directly in RARu2026.maybe a future improvement?
    Can anyone confirm the impact of multiple rule sets and how you manage them?
    Regards,
    Greg

    Greg,
    You can maintain the different severity levels for different Rule Sets. For example, in one Rule Set you can keep the "Critical" Risks and in other you can keep "High", "Medium" & "Low". Run your analysis against first Rule Set if you want to know the "Critical" Risks and second Rule set you can use for rest of the severity levels. I hope this way you can manage your multiple Rule Sets in RAR.
    Thanks,
    Tavi
    SAP Security & GRC Consultant.

  • Handling Multiple Result Sets

    Hi
    I have a problem while handling multiple result sets. To fix that problem i need to upgrade my JDBC version2.0 to 4.0.
    My Problem is that i dont know which jars need to be downloaded to upgrade my JDBC version.

    Mallika_23 wrote:
    Is that any more ideas ???1. Learn how google works.
    2. Find the drivers
    3. Read the documentation
    4. Ask questions here once you have actually read the documentation.

  • Multiple Keyword Sets (For Multiple Databases)

    I work with several different Lightroom databases and it would be nice to be able to have separate sets of keywords that go with each database.
    In my specific case, I use one database for my personal photographic endeavors and another for an image library for our church. The keywords tags used for my Nature photography images and the tags used for the event photography shots for church are very different. Hence, there are lots of keywords in both libraries that have zero images attached to them.
    It would be very useful in you could allow multiple keyword sets to track with multiple databases.
    Dave Mayfield

    There issues'Purge unused Keywords' option under Menu/Metadata.
    Don't ya know.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Multiple record sets???

    I am having a tough time with setting up a list that is set
    up as shown at the bottom of the page. So I thought maybe I could
    create multiple record sets... one for each category. The problem
    is that there are 30+ categories. I really could use some help.
    Is multiple record sets the proper way to do this or am I
    missing the big picture?
    The other direction that was in my mind was if there was a
    way to change the "WHERE category = ?" statement as I get to each
    category.... is that possible?
    Category 1
    field 1 field 2 field 3
    field 1 field 2 field 3
    field 1 field 2 field 3
    Category 2
    field 1 field 2 field 3
    field 1 field 2 field 3
    Thanks in advance
    Dave

    Sounds like you need a join statement in your SQL, is the
    category and field info in different tables, then a join would be
    perfect, also what language are you using. I know another way in
    php you could use a while loop with another RS inside that gets the
    proper field info for each category.
    check out this:
    http://www.w3schools.com/sql/sql_join.asp

  • Hi everyone, I have just purchased a new iMac 27. Is this device able to support a multiple monitor set-up (additional two screens)? If so what do I need and are there any draw backs?

    Hi everyone,
    I have just purchased a new iMac 27. Is this device able to support multiple monitor set-up (an additional two screens)? I am not a gamer, so require the set-up for 'office suite' type work and video viewing. if the set-up is possible, what would I need, is it pretty straight forward and are there any draw backs?
    Thank you.

    I just purchased the same imac. I connected the other displays using a thunderbolt to dvi adapter and it works fine.

  • Trying to assign multiple category sets to an item

    Trying to assign multiple category sets to an item-- i created a new category set and went to set it as the default set for Order Management. Receiving this error:
    category set is defined with Multiple Category Assignment flag set to yes. Order Managment functional area can be assigned only category sets having Multiple Category Assignment flag set to No.
    Is this a setting that I can change??

    If the item is in transit, I'm not certain there is a way that you can do this. It will be delivered to the person at address that is on the postage label. If there is Signature Confirmation selected on the parcel, it might be held somewhere until you pick it up, though. Since you are registered to ebay in Australia, it might be best if you contact Australia Post with this question. We can only answer with our experience in dealing with Canada Post and the couriers here. And do be sure to update your addresses with both ebay and paypal to prevent this from happening in future. Best of luck to you as you carry forward.  Sorry, that is assuming you are the receiver and not the seller. 

Maybe you are looking for