Search for a color in ordsys.ordimage

Hi,
Is it posible to make a search for a specific color in a column ordsys.ordimage. For example i ask i want all the pictures that contains RGB(255,0,0),
Thanks.

Hi,
This is one of the features we are considering for the next release.
Would you be able to share with us the specifics of the application -
the domain, what kind queries does the application have ? Do you only look for
colors or do you also look for specific shapes? Any information will be
really useful to us in preparing the functionality for this feature.
Also we would like to get a feeling for the range of applications that
would find this feature useful.
I look forward to hearing from you.
Melli

Similar Messages

  • How can i search for a color that is not in the color palette? (CS 5.5)

    I have a client, that has used a certain color in a series of textfields throughout the document.
    The color consists of all 4 CMYK colors and needs to be just Keycolor. However the color is not in the swatches menu, so marking it there and changing it won't work. I have downloaded a script that might have worked, but it could only find colors that were in the swatches palette. (Find / Change by Color / Overprint" version 1.2).
    Ofcourse, creating a similar color and adding it to the swatches doesn't work.
    Is there anyway that i can search for the color or does it really have to be done manually.
    Best regards

    You can only search for real, actually existing swatches. No sweat: use "Add Unnamed Colors" in the Swatch panel dropdown menu to get a list of all of the manually applied colors.
    Since you want to change all of them to the same color, you don't even have to use Search/Replace. Simply delete the new colors and select the one you need in the "Replace With" dialog that appears.

  • Searching for existing color palettes in "Color Themes" Illustrator

    Unable to seach existing themes in Color Themes panel Illustrator CC. Do I need to somehow save "All themes" from Adobe Color CC?

    Hi Diana
    Make sure that you are signed in to the CC profile thru the Illustrator preferences. Once you create the themes on the Adobe color site. You should see the themes load into the Theme palette.
    Try resetting the preferences to see if that helps. Also try signing out and sign back in to the profile to trigger the themes to sync
    http://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    Scott

  • How can I search for a particular color in an image?

    Hi,
       I am working on images of colored balls.
    I want to search for the particular color (of the ball) and select them .
    How can I do it?
    Your suggestions will be helpful.
    Thanks
    dsk

    Hi Dsk, 
                   you can apply color threshold and extract the required color in the image. Try color threshold in vision assistant.
                  see  here
    Thanks as kudos only

  • In Pages document, how do I search for word and view its frequency and page numbers in a sidebar?

    I have a long document and I want to be able to search for certain key words and phrases, and then see how many times they appear in the document and exactly where.  How do I conduct this sort of search and viewing?  In the past, in Pages and Word, I've been able to view my "finds" in a sidebar but I can't figure out how to activate that service anymore.
    Thanks!

    Here is a word frequency concordance Automator Service that works in both versions of Pages. It does not present a page number reference. It is by descending count, and alphabetically, within the repetitive counts as shown in the image here. In any document, you select the text to process, then Menu > Application Name > Services > Frequency. The Service will open TextEdit with the n-pages of scrollable results. It is 16 pt Helvetica Neue for legibility.
    Here is the code:
    on run {input, parameters}
         try
              set mySelection to input as text
              set formatted_result to concordance(mySelection)
              if formatted_result is not null then
                   set textHeading to "Word Frequency List"
                   tell application "TextEdit"
                   activate
                         set NewDoc to make new document with properties {name:"Concordance"}
                         make new paragraph at beginning of text of NewDoc with data textHeading & return
                         make new paragraph at end of text of NewDoc with data formatted_result
                         tell text of NewDoc
                               set font to "Helvetica Neue"
                               set size to 16
                               set color of paragraph 1 to {0, 0, 65535}
                         end tell
                        end tell
              else
                        display dialog with title ¬
                         "No input selected" with icon stop ¬
                          giving up after 15
              end if
         on error errmsg number errnum
                    display alert ¬
                               "AppleScript Error" message errmsg & "[" & errnum & "]" as critical ¬
                                  giving up after 30
         end try
         return input
    end run
    on concordance(mySelection)
    -- Use Ruby to count word frequency and alphabetically sort words
        set rb to ¬
        "selected = String.new\nfreqs = Hash.new(0)\nselected = ARGV.join('  ').gsub(/[,.]/, \"\")\n
         words = selected.split(/[^\\w-]+/)\nwords.each { |word| freqs[word] += 1 }\n
         freqs_sorted = freqs.sort do |a,b|\n\t
         a.last == b.last ? a.first <=> b.first : b.last <=> a.last\nend\n
         freqs_sorted.each { |k,v| printf \"[ %8s ]          %s\", v, k }"
        do shell script "/usr/bin/ruby -e " & rb's quoted form & space & mySelection's quoted form
    end concordance
    Launch /Applications/Automator and choose New Document, then click the Service icon, and then select the Choose button.
    On the left, you will have a list of Libraries from which to choose workflow items. Find Library > Utilities. In the adjacent column, locate the Run Applescript workflow. Click on it, then drag and drop it in the large workflow window to your right.
    At the top, you can select Service receives text in any application. Leave Output replaces selected text unchecked.
    In your Run AppleScript workflow window, you will see AppleScript boilerplate. Click on it and press command+A, then backspace to delete this content. Copy and paste the above code into this Run AppleScript workflow window. Press the Run button in Automator's upper right corner. If (and it should) a TextEdit window pops up, you are good, and you want to press File > Save. A dialog box will pop-up where you can name your Service. I called my Frequency, you may wish to call it something else. Once you have save it, you can exit Automator. Services are deposited in yourlogin directory/Library/Services.
    If you have a Pages document open with text, either select it, or command+a to select the entire document. Now, you select your Service via Pages > Services > Frequency. This will now pop-up a new TextEdit document with the results. If you want to save this new document, you must use option+File to Save as...

  • Display color problem - asking for a color solution

    So I have this serious problem with my Macbook Pro.
    Some months ago I suddenly saw green colors in black area's and pink line colors in white areas.
    Text on white background was extremely frustrating to read, since it was surrounded with small pink lines and flickering.
    Note this was only near max white and max black areas of the screen.
    I found out that it was due to a hardware failure, since slightly bending the laptop (!!) would remove the problem
    Attaching an external monitor doesn't show the defect, and booting in Windows 7 (bootcamp) still shows the same screen problem.
    Searching the web, it appears that it was a NVidia related heat problem, known to my model, but the offer to get it fixed for free by apple (since it was a known issue) had already run out december 2012 (!!). I think my laptop is about 3-4 years old, and the battery pretty much died on me the first year, probably due to heavy usage and the graphic card getting too hot. There are small sweat/corosion marks of where my hand are placed when typing, on the aluminium, due to how hot my laptop got. It sometimes got so hot I couldn't touch the aluminium on the top left corner near the 1-2-Q-W keys.
    Fixing my Macbook is too expensive. Just getting someone to look at it to diagnose it (without repairing it), costs a lot in my country, and we have no official apple store, only authorized resellers. I know it's probably the motherboard, because I tried to unscrew the backlid and gently touch certain area's on the motherboard with a pen, while the computer was still running, to find out where the short circuit was. I only started this kind of trying to "self service" it, because I knew how expensive replacing the motherboard would be (if that was even the issue?).
    I have multiple times tried to place something up against the sensitive area's on the motherboard, and then screw back the backlid, to put some pressure on it, which at first worked brilliantly and removed the color issue for some weeks, before it started reappearing. I think the heat from the laptop slowly makes the motherboard adapt, and the problem returns. Extremely frustrating indeed.
    I hope I can one day afford a Macbook Air, but until then, I don't want to throw more money after my poor macbook (which I pronbably can't sell anyway, like previous mac's I've owned, the day get a new. It's too worn out + battery got only 5min on a full charge).
    I think it's wisest to rather save the money for a Macbook Air, and try to survive until then. Therefor I was hoping someone could help me with a temporary solution.
    In Windows 7, using the Nvidia Control Panel to apply color management, I was able to adjust the individual color output values, and thereby remove the the screen issue! Maybe the colors are not as good anymore, but it sure beats not getting a headache after 10minutes trying to read an article.
    I tried the same thing on the mac, using Preferences>Displays>Color>Calibrate, but this guide is much harder to use to get a decent result (since only the last 2 options really makes a difference, but changes the colors completely, which I can't change by going back to the first color settings since then it just undos the last step I just did. I'm currently writing this with a very blue pale screen.
    I also tried to use ColorSync Utility, expecting to enter values manually, but contrary to the articles I read about using ColorSync, I cannot edit the values in the color profile I created (I can only change the ASCII text input fields). Trying to save the profile gives me the error 'The Document "screenbug.icc" could not be saved.'
    I tried to look for alternative color calibration software, but most of them required hardware, or expensive full version to unlock the settings I needed (like SuperCal).
    I hope some tech savy users out there that can help me, or at least make my life with my macbook less of a pain.
    All help is much appreciated!!
    PS: I've been a loyal Mac user since always. Few things I've learned is:
    1) Don't buy the first version of new hardware. Wait about a month for reviews, to check for issues. I had a problem with an expensive MacPro that had to be replaced, but luckily for free since it was Apple's mistake. Sometimes Apple products also get minor internal changes/fixes without announcements, to help solve reported issues from early buyers.
    3) Take care of you Mac, especially so because you can often sell your used Mac's for quite a value the day you want to upgrade. I've sold about 3 Mac's in my lifetime, for quite a gain, though I don't expect this macbook to do as well, if at all. But it's normally something to be cautious about.
    3) Don't order custom configurations from the Apple Store, if you can live without it (+ it's usually crazy overprices). I payed extra to get the NVidia GeForce 9600M, and was happy with it for the first couple of years, but is now causing me all the problems I have today + made my Macbook worthless.
    Stick with what the default configuration if possible, as other configurations might not have been tested carefully.

    Who exactly is your comment "I am asking you to fix this problem soon" directed at?
    Remember that you are posting on a user to user forum so nobody can really help you.  If you want to give feedback to Apple, then contact them directly at http://www.apple.com/feedback.
    Also, if you have an iPhone 3G and iOS 4.2.1 is the latest software that you can install on your phone, then there is absolutely nothing that anyone can do to fix the problem if you want to install Skype that requires iOS 4.3 - what do you think anyone can magically do?
    iPhone 3G is a very old phone now and if you want to install Skype on your phone, then you need to go out and buy a new iPhone - either a 4s or a 5.  Nothing more to it.  Buy a new phone.

  • How to build a report on a table containing ORDSYS.ORDIMAGE type?

    Hi
    I build a table with a column of type ORDSYS.ORDIMAGE then I
    build a form using wizard and populate the table by uploading
    intermedia type and I can make query on that form and see the
    image. But when I build a report using wizard, the report result
    shows image data as it is in text format.
    Am I doing something wrong or there is another way to make
    report on ORDSYS.ORDIMAGE column type.
    Thanks.
    bye

    This could be because, you might have the display type as text
    instead of html for this column.
    Could you pls verify this by selecting as html and try running
    the report. If it still not working then pls post your Portal
    Version so that we can verify it out here. Presently, it is
    working fine for me.
    Thanx,
    chetan.

  • How do I search for sticky notes in a PDF doc?

    Several people (at work) have commented on a 440-page document that I created, using sticky notes to write their comments in. When I first open the document, the sticky notes are all closed. The icon for a closed sticky note is pretty small and not brightly colored, so they're easy to miss when scrolling through hundreds of image-heavy pages. I am hoping that it's possible to search for each occurrence of a sticky note.
    If there is no way to search for the notes, is there a command I can use to open all the notes in the file (in one action) so that they are larger and easier to spot?
    Platform: Windows 8 PC
    Version: Acrobat 8
    If this is not a feature available in Acrobat 8, is it possible to do this in later versions?
    Apologies if this is not the right community for this question, but none of the ones listed seemed like the obvious choice, and there is no "miscellaneous" or "general" category. If there is a better community for the question, please let me know.
    Thanks,
    Joyce.

    Out the gate you've a problem.
    The Acrobat 8 product family passed into "End of Support" many years ago (well before the release of Windows 8).
    "End of Support" means -- well, just that eh.
    The Acrobat 8 product family is not compatible with Windows 8.1, 8 or 7.
    The Acrobat XI product family is compatible with Windows 8 / 8.1.
    Regarding Comment and Mark Up Annotations:
    With Acrobat 8 Pro use the "Comments List".
    Same wit Acrobat 9 Pro, X Pro and XI Pro.
    May be available with the various versions' "Standard" release.
    The contents of a Comments List can be exported to a PDF report.
    The filter an be used to display specific characteristics / attributes which then become the reports content when you output a report.
    Having "8" the Help PDF file got loaded with the install of "8".
    Use it to review the information provided on the Comments List.
    Be well...

  • Windows 8 driver solution for HP Color LaserJet 3550

    I have successfully installed on my "windows 8 32bit" Hp color laserjet 3550 printer with a USB cable.
    (the guides seemed possible only with win8 64bit)
    Follow these steps:
    1) in Hp website support driver, select drivers for windows XP
    2) download clj3550prnsyswin-us.exe (HP color LaserJet 3550 printing system 2.0 April 15, 2005 86.4 MB)
    3) run the setup you unzip the files in c: \ clj3550 printing systems
    4) Connect the USB printer
    5) in the control panel, printer management, add a new local printer
    6) aggingere drivers from disk, select driver in c: \ clj3550 printing systems
    7) At this point the printer is created (hp color laserjet 3550), but it does not work, does not print any page
    8) in device manager right click and update drivers automatically, he searches for the driver online, update them and concludes the setup
    9) now in the control panel, printer management, you will find another printer, hp color laserjet 3550 copy. This one print very well.
    I hope it is useful
    Best Regards Anubi

    Anubi80,
    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at http://h30499.www3.hp.com/hpeb/ .
    I hope this helps.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • How to populate a table with ORDSYS.ORDImage item by BLOB item?

    Hi, I have a table, that contain blob column and another table with ORDSYS.ORDImage column and I would like to populate ORDSYS.ORDImage item in table by BLOB item, in which I have store some images?

    You should be able to do something like (this is off the top of my head, so please excuse any compile errors...):
    define
    b blob;
    i ordsys.ordimage;
    begin
    INSERT INTO ordsysImgs VALUES (1,ORDSYS.ORDImage.init());
    select imgCol into i from ordsysImgs where ID = 1 for update;
    select blobcol into b from blobImgTable;
    i.source.localdata := b;
    i.setlocal();
    i.setproperties();
    update imgcol set imgCol = i where ID = 1;
    commit;
    end;

  • With Firefox 5.0.1, I can no longer have search terms highlighted when I search via cache. This makes searching for key concepts impossible now. Is there a plan to fix this issue?

    In the past, before Firefox 5.0.1, I would search for key terms via the cache mode; thus, the terms would be highlighted in various colors so that I could scroll down the page and find the exact terms.
    This is no longer functioning since I downloaded 5.0.1
    I use an iMac 3.06 Ghz Intel Core 2 Duo, 1o.6.8.

    The new tab page (about:newtab) wasn't introduced until a later version of Firefox (iirc, ''Firefox 10'') , which is why that pref can't be found.
    Sounds like your father picked up some Malware.
    Maybe this is what you're dealing with.
    http://www.shouldiremoveit.com/IMVU-Inc-Toolbar-34367-program.aspx
    Also, I see a number of Plugins listed to bee concerned about.
    Toolbar Plugin
    MindSpark Toolbar Platform Plugin Stub for 32-bit Windows
    WildTangent Games App V2 Presence Detector

  • I have a macbook pro 15 inch mid 2012 and I want to change the hard drive, what specifications do I need to search for?

    I have a macbook pro 15 inch mid 2012 and I want to change the hard drive, what specifications do I need to search for?

    Does a Seagate - 1TB Internal Serial ATA III/Serial ATA II Solid State Hybrid Drive for Laptops - Multi with the following specifications may work??
    Height
    4 inches
    Width
    2.75 inches
    Weight
    3.5 ounces
    Color Category
    Multi
    Minimum System Requirements
    PC: Windows XP, Vista, 7 or 8; MacBook®, MacBook Pro or Mac Mini: Intel®
    processor; OS X; Linux; internal Serial ATA III or Serial ATA II support

  • A plug-in for Adobe Color in the app or to allow the download file to be accessed by Muse

    I think it would be awesome to have the functionality of adobe color CC. so that we can search for colors in the app or allow us to download the file drop it into the app for use, so we won't have to screenshot the color and color pick them.

    Acrobat does not have this built in. Normally, the table of contents is prepared at the same time as the document, perhaps in Word, which will use heading styles to do it automatically. Then this is converted to PDF. It is very unusual to do this work late with a PDF, I guess this is why it is not a core Acrobat feature.

  • How to search for a badi

    how to search for a badi
    srinivas.

    Hi Srinivas,
    Good
    Check this link
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Run this program
    *& Report ZNEGI16 *
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    Solution 2
    1.Get the Package of the program name of the transaction.
    2.Go to Transaction SE18.
    3.Press F4 on the badi definition name.
    4.Click the information systems button.
    5.Give the Package name and press enter.
    6.Select the BADI that is relevant to the application.
    Good Luck and thanks
    AK

  • Search for text and font

    I have an 800 page pdf document to index and so far I have a script that will search for a list of keywords. But the text has large sections of code in a different font, and I think we would like to generate an index of just code examples. Is there a way to search for text of a given font in applescript? Something like
    set theSel to find text theText
    if the font of theSel is "Times"
    write to file, etc.

    Please do send a page, I might be able to spot where the font problem is coming from - but no guarantee Address is in my profile.
    You asked about the script formatter. red_menace of this forum wrote the script I use. To use it, you copy the script that you want to format to the clipboard and run the formatter. This then places the marked-up text in the clipboard so that you can paste it into the forum page.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    script formatter - formats the clipboard text for forum posting
    last reviewed January 19, 2009   red_menace[at]mac[dot]com
    Input: text read from the clipboard
    Output: formatted text copied to the clipboard
    set AppleScript's text item delimiters to " "
    -- some constants and switches
    property TextColor : "#000000" -- black  (see http://www.w3schools.com/tags/ref&#95;colornames.asp)
    property BackgroundColor : "#FFDDFF" -- a light plum/purple
    property BorderColor : "#000000" -- black
    property TheWidth : "width: 720px; " -- a width attribute  (deprecated in HTML 4.01)
    property UseWidth : true -- use the width attribute?
    property LineCount : 25 -- the number of lines before including the height attribute
    property TheHeight : "height: " & ((LineCount * 13.6) as integer) & "px; " -- a maximum height for the <pre> box
    property Emphasize : false -- emphasise (bold) the script text?
    property UseURL : false -- include a Script Editor message link?
    property AltURL : false -- use an alternate URL encoding?
    property ToolTips : {¬
    "this text can be pasted into the Script Editor", ¬
    "this text can be pasted into an Automator 'Run AppleScript' action", ¬
    "this text can be pasted into an Automator 'Run Shell Script' action", ¬
    "this text can be pasted into a HTML editor", ¬
    "this text can be pasted into a text editor", ¬
    "- none -"}
    property TooltipDefault : {item 1 of ToolTips} -- keep track of the last tooltip used
    property TempFile : "Script_Formatter_TempFile" -- a temporary work file
    try
    -- write the clipboard to the temporary file
    set TheClipboard to (the clipboard) as text
    if TheClipboard is in {"", space, tab, return} then return -- clipboard is (basically) empty
    set MyOpenFile to open for access ("/tmp/" & TempFile & ".txt" as POSIX file) with write permission
    set eof of MyOpenFile to 0 -- empty any previous temp file
    write TheClipboard to MyOpenFile
    close access MyOpenFile
    if UseURL then
    -- encode URL  (see http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/pydoc.1. html)
    do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of TheClipboard
    -- add a link wrapper
    set URLtext to "applescript://com.apple.scripteditor?action=new&script=" & the result
    if AltURL then -- use an alternate URL encoding
    set URLtext to "Click here to [url=" & URLtext & "]open this script in the Script Editor[/url]:<br />"
    else -- use HTML anchor tag
    set URLtext to "Click here to <a href=\"" & URLtext & "\">open this script in the Script Editor</a>:<br />"
    end if
    set PromptText to ((count URLtext) as text) & " URL and "
    else
    set {URLtext, PromptText} to {"", ""}
    end if -- UseURL
    -- convert to HTML  (see http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/textutil .1.html)
    do shell script "cd /tmp/; /usr/bin/textutil -convert html -excludedelements '(html, head, title, body, p, span, font)' -encoding US-ASCII " & TempFile & ".txt"
    -- fix up some formatting and add a pre wrapper  (see http://www.w3schools.com/tags/default.asp)
    set HTMLtext to rest of paragraphs of (read ("/tmp/" & TempFile & ".html" as POSIX file))
    if (count HTMLtext) is less than LineCount then -- skip the height attribute
    set Height to ""
    else
    set Height to TheHeight
    end if
    set HTMLtext to FixCharacters from (HTMLtext as text) -- additional character encodings
    if UseWidth then
    set Width to TheWidth
    else
    set Width to ""
    end if
    if Emphasize then set HTMLtext to "<strong>" & HTMLtext & "</strong>"
    set HTMLtext to "<pre style=\"
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid " & BorderColor & ";
    " & Width & Height & "
    color: " & TextColor & ";
    background-color: " & BackgroundColor & ";
    overflow: auto;\"
    title=\"\">
    " & HTMLtext & "</pre>
    -- assemble everything on the clipboard
    set TheResult to choose from list ToolTips ¬
    with title "Script Formatted" with prompt PromptText & ((count HTMLtext) as text) & " HTML characters will be placed on the clipboard (plus the following ToolTip):" default items TooltipDefault OK button name "OK" cancel button name "Cancel" with empty selection allowed without multiple selections allowed
    if TheResult is false then -- cancel button
    error number -128
    else -- add the selected title attribute (tooltip), if any
    set TooltipDefault to TheResult as text
    set Here to (offset of " title=" in HTMLtext) - 1
    set There to (offset of ">" in HTMLtext) - 1
    if TheResult is in {{}, "- none -"} then -- no tooltip
    set the clipboard to URLtext & (text 1 thru (Here - 1) of HTMLtext) & (text (There + 1) thru -1 of HTMLtext)
    else
    set the clipboard to URLtext & (text 1 thru (Here + 9) of HTMLtext) & TheResult & (text There thru -1 of HTMLtext)
    end if
    end if -- TheResult is false
    on error ErrorMessage number ErrorNumber
    log space & (ErrorNumber as text) & ":" & tab & ErrorMessage
    try
    close access MyOpenFile
    end try
    if (ErrorNumber is -128) or (ErrorNumber is -1711) then -- nothing (user cancelled)
    else
    activate me
    display alert "Error " & (ErrorNumber as text) message ErrorMessage as warning buttons {"OK"} default button "OK"
    end if
    end try
    to FixCharacters from TheText
    fixes (converts) formatting characters used in some message forums  (see http://www.asciitable.com/)
    parameters - TheText [text]: the text to fix
    returns [text]: the fixed text
    -- this list of lists contains the characters to encode - item 1 is the character, item 2 is the HTML encoding
    set TheCharacters to {¬
    {"!", "&#33;"}, ¬
    {"*", "&#42;"}, ¬
    {"+", "&#43;"}, ¬
    {"-", "&#45;"}, ¬
    {"[", "&#91;"}, ¬
    {"\\", "&#92;"}, ¬
    {"]", "&#93;"}, ¬
    {"^", "&#94;"}, ¬
    {"_", "&#95;"}, ¬
    {"~", "&#126;"}}
    set TempTID to AppleScript's text item delimiters
    repeat with SomeCharacter in TheCharacters
    if item 1 of SomeCharacter is in TheText then -- replace
    set AppleScript's text item delimiters to item 1 of SomeCharacter
    set the ItemList to text items of TheText
    set AppleScript's text item delimiters to item 2 of SomeCharacter
    set TheText to the ItemList as text
    end if
    end repeat
    set AppleScript's text item delimiters to TempTID
    return TheText
    end FixCharacters
    </pre>

Maybe you are looking for

  • BAPI customer

    Hi, I want to upload data to create a customer for XD01 transaction, and for that I've created a bapi. Now I want two fields (Acct.group and comp.code). I did not find those fields in standard Bapi structures/tables. Can anyone help me to find those

  • Find time when DB went down (nothing in alert log).

    hello all, is there any way to tell when the DB went down. Yesterday we had some outage in our datacenter and it took down one of our servers. And this morning i started the DB and they went up fine with no problem. But is there any way to find out w

  • "Insufficient Memory" error message

    I got "Insufficient Memory" error messages in working on the job needed large files ( > 100MB) with AI 5.5 in office with below #1 PC spec. Error message starts to happen after working 15min to 1 hour depends on the file. I need to restart computer i

  • Search tips for this forum

    How do I search for "Account accountProxy" in this forum and have only messages returned with this exact phrase. Currently, doing a search on "Account accountProxy" returns records with these two words not next to each other.

  • Raising Customer Messages with SAP OSS on BCS issues

    Hi guys, I'd be keen to know everyone's opinion on raising customer messages with SAP OSS, in particular on BCS. Often I find that my colleagues are hesitant to raise a note with SAP because they think it either takes too long or they don't get a sat