Delete one guide at a time

Hi
any idea on how to delete/remove one guide at a time pl. I've gone through the forum which clears all the guides but couldnt find any help on deleting guides one at a time.
Any possible solution

Yes, with older versions you are stuck with using Action Manger to work with guides. And as far as I can tell you can't remove a single guide with AM code.
You can remove all guides and you can create guides. I also have code that will let you get info about the current guides in a document. With that you could get the info about the guides in a document, remove all the guides, then add back the ones you want to keep. Not pretty but it should work. Here is the code.
To get guide info:
#target photoshop
app.bringToFront();
/* the info about guides can be found in the photoshop tag hex 35 42 49 4D 04 08
   the length of the tag is found at offset 11. that value is the length to the next tag
   the number of guides can be found at offset 27. From that point the data repeats
   for each guide. 4 bytes for the location. That value / 32 = pixels
   and one byte for type 0 = vert and 1 = horz
   Note: this info is just a best guess from looking at the data
// Function: getGuideInfo
// Description: Saves the document as a temp jpg file
//                        and extracts the info about the guides
//                        in document if any
// Usage: var guides = getGuideInfo( activeDocument );
// Input: Document
// Return: Object: TotalCount property  = number of guides
//                  HorizontalCount property = number of horizontal guides
//                  VerticalCount property = number of vertical guides
//                  Horizontal = horizontal guides
//                  Vertical property = vertical guides
// Source: Modified from http://ps-scripts.com/bb/viewtopic.php?t=3283
function getGuideInfo( doc ) {
   saveOptions = new JPEGSaveOptions();
   // we don't care about image quality in the temp file
   // we do want the smallest file size
   saveOptions.quality = 0;// we don't care about image quality in the temp file
   var tempFile = new File( Folder.temp + '/' +'guideTemp.jpg' );
   // Dupe the doc, make it savable as JPEG, save it, then close the file
   doc = doc.duplicate();
   if( doc.mode == DocumentMode.BITMAP ) doc.changeMode(ChangeMode.GRAYSCALE);
   doc.bitsPerChannel = BitsPerChannelType.EIGHT;
   doc.changeMode(ChangeMode.RGB);
   doc.saveAs(tempFile, saveOptions, true);
   doc.close(SaveOptions.DONOTSAVECHANGES);
  tempFile.encoding = 'BINARY';
  tempFile.open('r');
  var str = tempFile.read();
  tempFile.close();
  tempFile.remove();
   var guideTag = '8BIM\x04\x08';
   var tagPos = str.search(guideTag);
   var guides = new Object;
   guides.toString = function(){ return 'GuideInfo'; }
   var horGuides = new Array;
   var vertGuides = new Array;
   if( tagPos != -1 ) {
      var tagLength = 12 + str.charCodeAt( tagPos + 11 );
      var guideStr = str.substring( tagPos, tagPos+tagLength );
      guides.count = str.charCodeAt( tagPos + 27 );
      var pointer = tagPos + 28;
      for( var i =0; i < guides.count; i++ ){
       //  var n = ((str[pointer] << 3) + (str[pointer+1] << 2) + (str[pointer+2] << 1) + str[pointer+3])/32;
      //var n = Number( '0x'+getHexString( str, pointer )+getHexString( str, pointer+1 )+getHexString( str, pointer+2 )+getHexString( str, pointer+3 ))/32;
             var n = ((str.charCodeAt(pointer)<< 32) + (str.charCodeAt(pointer + 1)<< 16) +
                    (str.charCodeAt(pointer + 2) << 8) + str.charCodeAt(pointer+3))/32;
if  (str.charCodeAt( pointer + 4 ) == 0) {
          //vertical
          vertGuides = insertValueInOrder(vertGuides, n);
       } else {
          //horizontal
          horGuides = insertValueInOrder(horGuides, n);
        // guides[ i ] =  [ (str.charCodeAt( pointer + 4 ) ? 'horz':'vert'), n ];    
         pointer = pointer + 5;
     guides.HorizontalCount =horGuides.length;
     guides.VerticalCount =vertGuides.length;
     guides.Horizontal = horGuides;
     guides.Vertical = vertGuides;
   }else{
      guides.TotalCount = 0;
     guides.HorizontalCount =0;
     guides.VerticalCount =0;
   function insertValueInOrder(a , n) {
      var b = new Array;
      var i = 0;
      if (a[0] == undefined)
         b[0] = n;
      else {
         while (a[i] < n && i < a.length) {
               b[i] = a[i];
               i++;
         b[i] = n;
         while (i < a.length) {
            b[i+1] = a[i];     
            i++;
      return b;
   return guides;
  function fromCharCode(input) {
      output = eval("String.fromCharCode(" + input + ")");
     return output;
// demo
var masterDocument = app.activeDocument;
var guideInfo = getGuideInfo( masterDocument );
var s = "Vertical Guides: " + guideInfo.Vertical + "\nHorizontal Guides: " + guideInfo.Horizontal;
alert(s);
To remove all guides:
function clearAllGuides() {
     var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID( "Gd  " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Al  " ) );
     desc.putReference( charIDToTypeID( "null" ), ref );
     executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
To add a guide:
function guideLine(position, type,unit) {// from Paul MR
   //units '#Pxl' pixel '#Rlt' =Relative  '#Prc' = percent
   // types: 'Vrtc' & 'Hrzn'
    var desc = new ActionDescriptor();
        var desc2 = new ActionDescriptor();
        desc2.putUnitDouble( charIDToTypeID('Pstn'), charIDToTypeID(unit), position);
        desc2.putEnumerated( charIDToTypeID('Ornt'), charIDToTypeID('Ornt'), charIDToTypeID(type) );
    desc.putObject( charIDToTypeID('Nw  '), charIDToTypeID('Gd  '), desc2 );
    executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );

Similar Messages

  • **HOW DO I DELETE ONE CALL AT A TIME FROM MY IPHONE 4???**

    Please help I can't delete one call at a time from my call log!!

    Lol! I'm not cheating on anyone, never have... I just delete multiples of calls so my phone doesn't get too filled up.. But I'm also guessing now that I have an iPhone and not an htc I won't have a space issue. Thanks very much!!

  • How do I delete  one item at a time from trash?

    How does one delete one item at a time from trash?

    In general, one doesn't.
    I suggest you create a new folder (I use "Trash Soon") on the desktop near the trash icon. Move all the stuff out of the Trash bin into the Trash Soon Folder. Then move the things you really want to eliminate to the Trash can. Empty Trash.
    DO NOT store anything you want to keep in the real Trash can. There are many activities that may cause "Empty Trash" a a side-effect.
    If you have multiple drives, The Trash is an illusion created for your convenience. The actual Items may be on several different drives, but all marked as "in Trash". Moving them to a folder on a different drive may cause unexpected copying.

  • Can you delete one song at a time on the ipod shuffle 4th generation?

    can you delete one song at a time from ipod shuffle 4th generation?

    Hi kaytlynn yeager,
    Thanks for the question. Based on what you stated, it seems like you want to manage what songs are on teh iPod shuffle. I would recommend that you read this article, it may be able to help you isolate or resolve the issue.
    Manage content manually on your iPhone, iPad, and iPod - Apple Support
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • How do you delete one call at a time?

    how do delete one call at a time rather than the entire list?

    At the present, you can't. It's all or nothing.

  • How to delete one record at a time

    hi all,
    Please tell me how i do delete only one record at a time.After deleting the record the jsp page should show only the remining items to be deleted.

    Where do u want to delete the record - database?
    If so use the rpimary Screen identifying each record and use that to delet that record

  • Can only delete one URL at a time from History, why not more?

    In prior versions you could select a rabge and delete them all at one time.

    When you open the History sidebar (Ctrl-H), you can only right-click an entry, Delete This Page, but if you open the History Library (Ctrl-Shift-H), multiple entries can be selected as above and then press the Delete key.

  • Mac Book Pro only lets me type one letter at a time and delete one letter at a time without the quick speed..

    When I hole o e ketter down it will frezze at that one letter.  I can't hold a character down and have it repeat.
    The same with the delete button.  I have to manually delete each letter, one at a time.  I can't have it in "speed mode" where you hole it don and it just keeps going.

    Have you checked the settings for repeat rate and delay in System Preferences > Keyboard > keyboard tab?

  • How do i delete multiple pictures stored in iphone without having to delete one picture at a time?

    Also, how do i sort the pictures stored in my iphone to categories e.g. food, friends, events or even sort by dates?

    You should be importing pics taken with the iphone to your computer regularly as you would from any digital camera. You can delete them all from iphone when you import them.
    Once on your computer, you can sort them however you like, and sync whatever you like to your iphone.
    Pics synced to iphone from your computer, are deleted the same way you got the there, the sync process.

  • Is there a way to delete more than one message at a time

    on my iPhone 6 I can hit the edit link in messages and easily and quickly delete lots of messages at a time.  on my iMac it seems you have to delete one message at a time, which takes a lot more time........isn't there a way to delete messages in bulk in Yosemite messages?

    Hi,
    A single Bubble is a single Message or iMessages depending on the account it is with.
    A single bubble can be highlighted then the Backspace/Delete key used.  (the greys in this pic hardly differ to tell though)
    A whole chat/Conversation (Apple calls iMessages connections "conversations" and other connection have always been "Chats" since iChat 1) can be deleted by mousing over the chat in the list and using the x icon that appears without having to bring that one to the "front" or top.
    7:43 pm      Wednesday; March 18, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • I can only delete one old bookmark at a time. How can I delete mutiple old bookmarks at once?

    ''dupe of https://support.mozilla.org/en-US/questions/911712''
    I can only delete one bookmark at a time? How Can I delete mutiple old bookmarks?

    Did this answer your question or do you still have a question about deleting Bookmarks --> https://support.mozilla.org/en-US/questions/911712
    Deleting multiple Bookmarks is covered in the article referenced in my reply to the above post.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Is it a fact that with iOS 7 I can't delete albums from music, but have to do one song at a time?

    So many updates...  Used to be able to delete an album by swiping to the right.  Now I only seem to be able to delete one song at a time by swiping left.  What's up?  I really can't detele whole albums anymore?

    Photos transferred from your computer via the iTunes sync process are removed from the iPhone the same way. To remove all photos transferred from your computer, deselect Sync Photos under the Photos tab for your iPhone sync preferences with iTunes followed by a sync.
    If you want to remove an album only and you manually manage photo storage on your computer, move the folder of photos outside of the folder on your computer that is selected under the Photos tab for your iPhone sync preferences with iTunes to be transferred to your iPhone followed by a sync.
    To remove select photos, move the photos outside of the folder of photos on your computer that is selected to be transferred to your iPhone followed by a sync.
    An album you created on your iPhone can be deleted direct from your iPhone.

  • TS1368 I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.

    I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.
    Can you help please?

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

  • How do you delete more than one photo at a time on Iphone 3gs camera roll?

    How do you delete more than one photo at a time on the Iphone 3gs camera roll?

    You can't.

  • How do I delete more than one email at a time on Mavericks?  I can only do one at a time.

    How do I delete groups of emails with Mavericks?  I can only delete one at a time.

    Select the first one then click on the last one with the shight key depressed to select then all then delete.
    Allan

Maybe you are looking for

  • Hyper-V Testbed

    I am in the process of learning Microsoft's server technologies and want to create a testbed using Hyper-V to get some hands-on experience.  I would like to create virtual servers of Server 2008, Server 2008 R2, Server 2012, along with virtual client

  • Different sales document for cash sale & credit sale

    Dear SAP GURUS, I have range of finish goods. I am selling that on cash and also on credit. I want different sales order type for the cash sale & for credit sale even though the FG is same and the customer is also same. How can I resolve this issue.

  • Errors on page after applying Java plugin1.3.1_02

    Hi, I need assistance on how to troubleshoot my console, with the following errors: java.lang.VerifyError: (class: Solar, methode: DeleteServer signature: ()V) Illegal use of nonvirtual function call. Another machine has the error: load: class Solar.

  • Lost TV sound from system preferences

    I have a mac mini which is hooked up to my flat screen by HMDI cable and has been working fine for online movies.  But just today there is no longer a TV sound selection in the sound output file in system preferences.  Only selection is now internal

  • Photo Sort in iPhone/iPad albums?

    Hi, I'm about to lose my mind... how do I get my photo's to come up as newest first, in all of my albums?  One would think that there should be a "sort" button on either device, right?  I'm running Windows 7, on my pc and own a iphone 5s and ipad min