Script for Numbers

Hi,
Struggling with Numbers.  I believe the solution lies in an applescript.  Unfortunately I'm not really familiar with applescript.  So, for me, it's like inventing the wheel.
What I would like is this : a table in which I enter a row of data (dates, names, codes, text, etc).  Then via a button or (preferably) a code I want this row to be copied, in another (secured) table an additional row opened and to be filled with this data.  Would be nice if the data in the first table could be cleared after that.  Not essential.  Is this possible with applescript?  If so, can someone give me something to get me started?
Thanks
Marcel

Hello
Here's the requested script.
Specify the destination folder's POSIX path in variable dst in _main(). Currently it is set to ~/Desktop/test. Note that ~ (tilde) notation for home directory is NOT supported in AppleScript. The pdf name is obtained from sheet 6's table 1's cell "C5". Note that : (colon) cannot be used in HFS file name and so it is replaced with . (period) here.
Tested with Numbers v2.0.5 under OSX 10.6.8.
Hope this may help,
H
PS. If you're using 10.9, it appears very complicated to enbale GUI scripting for applets or services due to its demanding kindergarten requirements.
cf.
http://macosxautomation.com/mavericks/guiscripting/index.html
_main()
on _main()
    set dst to (path to home folder)'s POSIX path & "Desktop/test" -- # POSIX path of destination directory (predefined)
    --set dst to (choose folder with prompt "Choose destination folder")'s POSIX path -- # or choose destination directory at run-time
    set p2d to (path to desktop)'s POSIX path -- POSIX path of desktop
    -- (1) save table as pdf on desktop
    tell application "Numbers"
        tell document 1
            tell sheet 6
                tell table 1
                    --set pdfname to (cell "C5"'s value as Unicode text) & ".pdf" -- [1]
                    set pdfname to my copy_as_text(cell "C5") & ".pdf" -- to get displayed value; # see [1]
                    set pdfname to my _gsub(pdfname, ":", ".") -- [2]
                    my select_table(it)
                    set pdfname_used to my save_selection_as_pdf(pdfname, {_replace:true})
                end tell
            end tell
        end tell
    end tell
    -- (2) move saved pdf to destination directory (replacing existing file)
    set pdfname_used_posix to _gsub(pdfname_used, "/", ":") -- [3]
    do shell script "mv -f " & (p2d & pdfname_used_posix)'s quoted form & " " & dst's quoted form
        [1] (cell's value) property can be different than displayed value and there's no (cell's displayed value) property;
            thus the only way to get cell's displayed value is to select the cell, perform copy, and get value from clipboard.
        [2] : (colon) is reserved in HFS path; here it is replaced with . (period).
        [3] / (solidus) is reserved in POSIX path; / in HFS path is to be represented by : (colon) in POSIX path.
end _main
on save_selection_as_pdf(pdfname, {_replace:_replace})
        string pdfname : output pdf file name (pdfname = "" denotes default name, e.g., "Untitled.pdf")
        boolean _replace : true to replace existing pdfname, false otherwise
        return string or boolean : pdf name actually saved in if operation is not canceled, false otherwise
        * pdf file is saved in ~/Desktop
        * pdf name actually saved in may be different than the given pdfname, e.g., : is replaced with - by Preview.app
        * return value is false iff _replace = false and pdfname already exists
    script o
        property _canceled : false
        property _preview_was_running : application "Preview" is running
        -- (1) copy current selection
        tell application "Numbers"
            my _keystroke(it, "c", {command down}, 0.2) -- copy current selection
        end tell
        -- (2) make new pdf document from clipboard in Preview.app
        tell application "Preview"
            my _keystroke(it, "n", {command down}, 0.2) -- new pdf document from clipboard
            my _keystroke(it, "s", {command down}, 0.2) -- save
        end tell
        -- (3) save front pdf document in Preview.app
        tell application "System Events"
            tell process "Preview"
                keystroke "d" using {command down} -- desktop
                tell (window 1 whose subrole = "AXStandardWindow")
                    tell sheet 1 -- save sheet
                        if pdfname ≠ "" then set text field 1's value to pdfname
                        set pdfname_used to text field 1's value
                        click button 1 -- Save
                        delay 0.1
                        repeat while exists
                            delay 0.2
                            tell sheet 1 -- alert sheet (already exists)
                                if exists then
                                    if _replace then
                                        click button 1 -- Replace
                                    else
                                        click button 2 -- Cancel
                                        set _canceled to true
                                    end if
                                end if
                            end tell
                            if _canceled then click button 2 -- Cancel
                        end repeat
                    end tell
                end tell
            end tell
        end tell
        -- (4) close or quit Preview.app
        tell application "Preview"
            if _preview_was_running then
                my _keystroke(it, "w", {command down}, 0.2) -- close
            else
                my _keystroke(it, "q", {command down}, 0.2) -- quit
            end if
            if _canceled then my _keystroke(it, space, {}, 0.2) -- don't save changes; # see [1]
        end tell
        -- (5) activate Numbers.app
        tell application "Numbers" to activate
        if not _canceled then
            return pdfname_used
        else
            return false
        end if
    end script
    tell o to run
        [1] this may not work as expected or even fail under 10.7 or later due to its auto-save behaviour.
end save_selection_as_pdf
on copy_as_text(_range)
        reference _range : target range
        return string : copied value of the range
        * this handler destroys the current contents of clipboard
        * this handler will change the current selection range to _range
    tell application "Numbers"
        set _table to (_range as record)'s every reference's item 1
        set _sheet to (_table as record)'s every reference's item 1
        my select_sheet(_sheet) -- [1]
        tell _table
            set selection range to _range
        end tell
        my _keystroke(it, "c", {command down}, 0.2)
    end tell
    the clipboard as Unicode text
        [1] this is required to swtich current sheet
end copy_as_text
on select_table(_table)
        reference _table : table object of Numbers
    tell application "Numbers"
        set _sheet to (_table as record)'s every reference's item 1
        my select_sheet(_sheet) -- [1]
        tell _table
            set selection range to cell 1
        end tell
        my _keystroke(it, return, {command down, control down}, 0.2)
    end tell
        [1] this is required to swtich current sheet
end select_table
on select_sheet(_sheet)
        reference _sheet : sheet object of Numbers
    set _name to _sheet's name
    tell application "System Events"
        tell process "Numbers"
            set frontmost to true
            tell (window 1 whose subrole = "AXStandardWindow")
                tell splitter group 1
                    tell splitter group 1
                        tell scroll area 1
                            tell outline 1
                                tell (row 1 whose group 1's static text 1's value = _name)
                                    set selected to true
                                end tell
                            end tell
                        end tell
                    end tell
                end tell
            end tell
        end tell
    end tell
end select_sheet
on _keystroke(_app, _key, _modifiers, _delay)
        reference _app : application reference
        string _key : character(s) to be keystroked [1]
        list _modifiers : list of modifier key to be pressed; enumerations are
                command down
                option down
                shift down
                control down
        number _delay : post-delay amount [sec]
        [1] Character must be present on the current keyboard layout. Otherwise, it is replaced by 'a'.
    tell _app to activate
    tell application "System Events"
        tell (process 1 whose bundle identifier = (_app's id))
            keystroke _key using _modifiers
        end tell
    end tell
    if _delay > 0 then delay _delay
end _keystroke
on _gsub(t, s, r)
        string t, s, r : source string, search string, replace string
        return string : every occurence of s being replaced by r in t
    return _join(r, _split(s, t))
end _gsub
on _split(d, t)
        string or list d : separator(s)
        string t : source string
        return list : t splitted by d
    local astid0, tt
    try
        set {astid0, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {} & d}
        set tt to t's text items
        set AppleScript's text item delimiters to astid0
    on error errs number errn
        set AppleScript's text item delimiters to astid0
        error errs number errn
    end try
    return tt
end _split
on _join(d, tt)
        string d : separator
        list tt : source list
        return string : tt joined with d
    local astid0, t
    try
        set {astid0, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {} & d}
        set t to "" & tt
        set AppleScript's text item delimiters to astid0
    on error errs number errn
        set AppleScript's text item delimiters to astid0
        error errs number errn
    end try
    return t
end _join

Similar Messages

  • Problem with applescript for Numbers

    I am new to Applescript and am haveng problems with what seems to be a pretty simple task.  I want to check the value of each cell to test for a certain condition and then based on the results increment another cell.  I keep getting the following error:
    error "Numbers got an error: Can’t make {4, 5} into type integer." number -1700 from {4, 5} to integer
    Here is my script:
    tell application "Numbers" to tell document 1 to tell sheet "Sheet 1" to tell table "Table 1"
              set fNineStart to 4
              set fNineEnd to 12
              set bNineStart to 14
              set bNineEnd to 22
              repeat with irow from 8 to 40
                        set skinscount to 0
                        repeat with jcol from fNineStart to fNineEnd
                                  set minscore to value of cell (jcol & 5)
                                  if value of cell (jcol & irow) is equal to minscore and the value of cell (jcol & 6) is equal to 1 then
                                            set skinscount to skinscount + 1
                                  end if
                        end repeat
                        set the value of cell (27 & irow) to skinscount
              end repeat
    end tell
    Here is the spreadsheet:
    Name
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Front
    Nine
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Back
    Nine
    Total
    Net
    ESC
    score
    Skins
    Par
    4
    4
    4
    5
    3
    4
    5
    3
    4
    36
    4
    5
    3
    4
    5
    3
    4
    4
    4
    36
    birdie
    3
    3
    3
    4
    2
    3
    4
    2
    3
    27
    3
    4
    2
    3
    4
    2
    3
    3
    3
    27
    eagle
    2
    2
    2
    3
    1
    2
    3
    1
    2
    18
    2
    3
    1
    2
    3
    1
    2
    2
    2
    18
    low score
    3
    4
    4
    3
    3
    4
    5
    3
    4
    4
    4
    3
    4
    5
    3
    4
    4
    4
    # of people with min.
    1
    3
    1
    1
    1
    2
    4
    1
    2
    16
    2
    1
    2
    3
    3
    2
    1
    4
    2
    Skins
    HCP
    Joe
    y
    3
    3
    4
    5
    5
    3
    4
    5
    4
    5
    38
    5
    5
    4
    4
    5
    3
    4
    4
    5
    39
    77
    74
    Bill
    y
    7
    5
    4
    5
    5
    4
    4
    5
    4
    4

    Hi fairchild.bill,
    Real experts will I hope chime in, but I think one problem is the way you are referring cells:
    Instead of:
    value of cell (jcol & irow)
    I think you need to use something like:
    value of cell irow of column jcol
    And
    value of cell jcol of row irow
    Studying examples of scripts for Numbers 3 at macosxautomation.com may give you some ideas on this.
    SG

  • Scripting for different numbers of table rows in cs3

    As always thank you for the help.
    My question: is there a simple newbie way to script for stroke placements when the numbers of rows in the category between the stroke will vary. I have not even attempted to script this style, as frankly I don't know where to start, but here is an explanation of what I need:
    The table foodstuff contains:
    animal, vegetable, fruit
    Under animal there is:
    beef, lamb, pork, poultry
    Under vegetable there is:
    potato, pepper, onion
    Under fruit there is:
    orange
    If wanted a line under each category, ie after poultry, after onion, and after orange how would I go about it.
    Thank you to all who have helped me so far, either by reading answers to other people's queries, or by responding directly to my own

    Interesting ... I don't think there is a newbie-level answer to this challenge. It comes down to finding the first (left-to-right) cell that contains text, and adding a line on top of it all the way to the last cell in that row.
    Here's a first attempt:
    table = app.selection[0];
    if (table.hasOwnProperty("baseline"))
    table = table.parent;
    if (table instanceof Cell)
    table = table.parent;
    if (table instanceof Column)
    table = table.parent;
    if (table instanceof Row)
    table = table.parent;
    if (table instanceof Table)
    table.cells.everyItem().properties = {topEdgeStrokeWeight:0, bottomEdgeStrokeWeight:0, leftEdgeStrokeWeight:0, rightEdgeStrokeWeight:0};
    table.rows.lastItem().bottomEdgeStrokeWeight = 1;
    for (r=0; r<table.rows.length; r++)
      for (c=0; c<table.rows[r].cells.length; c++)
       if (table.rows[r].cells[c].contents)
        for (; c<table.rows[r].cells.length; c++)
         table.rows[r].cells[c].topEdgeStrokeWeight = 1;
        break;
    } else
    alert ("You were supposed to be somewhere inside a Table");

  • There us to be a "script" for ticket numbering. What happened to it?

    In InDesign, there use to be an available "script" for ticket numbering. (Multi tickets on a page and several pages, that I could arrange to be cut in stacks and retain their order.) I use to use it in CS5 and CS6... but when I went to CC the script is gone. I think it was a third party "script". Please help. I need it soooooooo badly.

    Hi Peter,
    What you say is what you want !
    So, make a master page as :
    And launch this clever [JS] written by Jared Katz. Define your settings and "OK".
    Done! 
    page 1…
    … to last page!

  • Best / most popular software or scripts for adding search function to website?

    I'm trying to find a good piece of software or script for implementing a site search function into our website.  I am relatively knowledgeable in Dreamweaver and can write CSS and XHTML at the fairly intermediate to advanced level, as well as work with JavaScript and js files, but I don't really know much ASP or "by hand" Java coding.  Their are so many scripts and software out there for adding a site search that it's hard to sort through and narrow down.  I was hoping to find reviews of the popular ones or "top 10 lists" of some sort that would help me pinpoint a good one, but can't find anything like that.  These are the primary needs of the website:
    --Has under 50 searchable pages that won't change much and probably won't exceed 50. There are product part numbers and descriptions for some 250-300 part numbers, spread across only 24 of those pages.  The remaining pages are important but no part numbers-- About Us, News, Where to Buy, History, Featured Products, etc.  The product pages are very much like an online store but we don't sell directly on the site (only thru distributors/reps).
    --We are trying to keep the price under about $50, or use a free solution
    --The pages are all static XHTML+CSS pages, but our server can run ASP (we have another website for one of our other product line divisions, on the same server, with many more products beyond 1000, which was programmed completely in ASP by an outside company about 4 years ago).  We self-host both sites.
    --Our server can't run PHP
    --The search capabilities need only be rather basic-- a keyword search with a results page that uses the same design template as the rest of the site.  It would be nice, but not mandatory, to have a search filter and/or a drop down menu to enable selectively searching only certain parts of the site, or only product/part number search vs. general search, etc. (but again, not mandatory).
    --I do have a sitemap page already on it, if that matters or helps
    Some of the ones I've found so far that looked the most promising include:  Zoom Search Engine (http://www.wrensoft.com/zoom/), Site Search Pro (http://www.site-search-pro.com/), and FX Site Search which is a DW Extension I found in the exchange (http://www.felixone.it/extensions/prod/mxssen.asp)-- (that one looks possibly technically challenging or requiring more ASP skill, though)
    Forgive me if there is a better area to post this, if so let me know.

    For a static site, your options are:
    Google ~  http://www.google.com/sitesearch/
    Freefind ~ http://www.freefind.com/
    Zoom from Wrensoft ~ http://www.wrensoft.com/zoom/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Script for validating Text fields or numeric fields

    I'm looking for a simple script that will check the entered data in a specific field.If i enter numbers in the name/last name field i should get a pop up message that entering numbers in this field are not allowed.
    (And vice versa regarding numeric fields).
    What is the script for that ?

    Hi,
    try this:
    //var reg = /^\d+$/;    // checks whether input contains ONLY digits
    var reg = /\d+/;    // checks whether input contains digits AND letters
    var check = reg.exec(xfa.resolveNode("#subform[0].#field[0]").rawValue);
    if (check == null)
        app.alert("Everything's fine!");
    else
        app.alert("Entering digits is not allowed!");
    You may want to replace
    #subform[0] with the name of the subform the field to check is located in and
    #field[0] with the name of the field to check for digits.
    Also, you may want to select any of the regular expressions, which fits best your needs. See comment in the above code-fragement for further information.
    Regards,
    Steve

  • Script for combining multiple documents?

    hi there,
    well I think there's been a lot of discussion going towards this topic. My concerns aren't quite lining up with the topics. We using a script for placing images, and instead of going document to document...I would like to combine all the indd documents...there's usually at least 24...and to import NOT as pdf's, just as individual pages within the one document...insert my images using the other script...and then later choosing to re-export the pages as individuals. With ascending order of page numbers in the correct sequence they were brought in as.
    thanks for the help.

    -Printing by folder only helps when I need to run one copy of the files, typically I need to print multiple copies or save them for future printing.  Also I have had errors printing via that method before because it will sometimes overload the printer queue.
    -It would be great if clients always provided print ready documents, but that is usually not the case and I have to correct it which is why I am here asking how to do this.
    And if you can not do that then you need to insert a blank page into the files with an odd number of pages.
    Right.  That is what I am looking for; something to automate inserting a blank page into files that have an odd number of pages WITHOUT knowing the documents page counts before hand and WITHOUT having to manually insert blank pages.

  • Script for InDesign CS6 - create multiple, prenamed layers

    I created a script for Illustrator CS6, in ExtendScript Toolkit, that will create multiple, prenamed layers...see below...
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = ":: GRADIENT";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: STRIPES";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LEGAL";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: BLK BAR";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: FLAME";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOGO/TYPE";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: TRIM,ETC";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOEC INFO";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")
    I tried to use this exact code to replicate the same scenario in InDesign but it doesn't work.
    Can anybody help me out!?
    Thanks in advance

    Marijan Tompa's scripts are very nice and useful, however, for this simple task you can try create your own wiht this code:
    app.activeDocument.layers.add ({name: "GRADIENT", layerColor: UIColors.red});
    app.activeDocument.layers.add ({name: "STRIPES", layerColor: UIColors.lightBlue});
    app.activeDocument.layers.add ({name: "LEGAL", layerColor: UIColors.gray});
    //merge existing document layer to bottom layer (in this case original layer will be merged to 'GRADIENT')
    var myDocument = app.documents.item(0);
    var myLayerA = myDocument.layers.item(2);
              var myLayerB = myDocument.layers.item(3);
              myLayerA.merge(myLayerB);
    alert("Layers created!");
    assume, your document has one layer.
    Script creates three new layers, they appear in Scripts palette in this order:
    LEGAL
    STRIPES
    GRADIENT
    and merges 'old' layer to bottom layer of newly created set (GRADIENT).
    sure, you can add as much layers as you need, just don't forget modify LayerA and LayerB numbers accordingly.
    Or disable second part of the script at all, if you don't want anything to be merged.

  • How to validate an text field item using javascript for numbers only.

    hi,
    how to validate an text field item using javascript for numbers only.please help me on this urgent
    please mail me solun if posible on [email protected]

    Hi,
    Page HTML header
    <script>
    function onlyNum(evt) {
      // Usage: onKeyPress="return onlyNum(event)"
      evt = (evt) ? evt : window.event;
      var charCode = (evt.which) ? evt.which : evt.keyCode;
      if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        var status = 'This field accepts numbers only!';
        alert(status);
        return false;
      var status = '';
      return true;
    </script>Item HTML Form Element Attributes
    onKeyPress="return onlyNum(event)"Br,Jari

  • Super-scripted Ref Numbers with generated Ref Table (A Glossary?)

    Good Morning All!
    I have been trying to create a paragraph style that will be applied manually, but when applied Italicizes and adds a sequential super-scripted "reference number". These reference numbers will then be used to produce a table which will sort rows numerically and produce info based on each reference. I will also need this to delete duplicates. I have a remove duplicates script for my ToC and may be able to retrofit it to this, but we'll get to that later. I can single out words with GREP, but without creating my own "parts dictionary" it would be a pain to add a thousand or so part names* to a GREP. I figured the easiest way to do this would be to manually apply a paragraph or character style per instance and then use a script to remove duplicates. If there is a better way to do this I'm open to suggestions.
    *Sadly part names aren't always consistent either due to different writers writing styles.
    To keep it simple for now I'm wanting it to just produce: Example Row in Table - [Ref # / Blank cell for part number / Part Name (Text that Ref style was applied to) / Blank cell for description]
    Example:
    I'm running into a problem that my super script numbers wont sit right if its done through a paragraph style as it reads the entire paragraph. I need the style to apply to a word or group of words. I tried creating a numbering system like a ToC, but once again that works off of paragraph styles. I can manually apply a character style but it doesn't have any sequential numbering options. For right now I'm fine manually applying the style for each instance and then copy/pasting part number and description. I'm just looking for something to generate reference numbers and the name that coincides into a row of a target table. In the future it would be amazing to have it access the component dictionary (excell doc) I'm painstakingly building to grab the part number(s) and descriptions so I don't have to copy/paste.
    I have been tasked with making multiple writers write the same thing. It feels impossible btw. So I have been creating an indesign template that does a lot of the work for you so that the largest inconsistencies are now handled by Indesign and leave no room for user error. This will not only help my older writers be consistent but will lessen the learning curve on newbies. Let me know if there is something differently I could be doing or if anything has worked well for you. I am open to any and all help/suggestions, I look forward to hearing back!

    Thanks for the quick response Pete. They would need to be created as well. 
    I was hoping that they would continue on through pages, but not documents (for booked instances). That they would be numbered on the fly so that if you moved pages around they would renumber themselves and then you could run a script to fix the order in the table. I have the sequential numbering scheme down for automatic figure box numbering. I just cant figure out the in-text mid-paragraph numbering. What do you have for me MVP?

  • Small script for PDF fillable form

    I need to create a script for a fillable form that will leave a dash after four numbers. It has to look like e.g. "1234-567. The dash needs to fill that spot without the user keying it in.
    Thanks!

    How can we help you create it? Do you need education in the techniques, a pointer to the documentation, a hint on where to add the script, something else?

  • Update SQL script for lower SQL version

    Hi, I am copying same records 9 times and this query is working fine in SQL-2008 or newer version but getting the following error in Lower SQL version. How I can run this script for lower SQL version.
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All 
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.* 
    From #temp t
    Cross Join Numbers;
    Error: Line 2: Incorrect syntax near ';'.

    Why are you using CTE in SQl server 2000. They were introduced from 2005. of course you need to confirm version of SQL Server
    Plus use code like below
    If object_ID('tempdb..#Temp') IS NOT NULL
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.*
    From #temp t
    Cross Join Numbers;
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Need antispam script for my website guestbook entries... recommendations?

    My guestbook on my website got so slammed by spambots that i had to take it offline. I would like to get one of those scripts where the person has to fill in what they see in a box (letters, numbers, etc) in order to make an entry into my guestbook. My web designers says that i need to find a script for this. Any recommendations? I don't even know what these scripts are called, making them hard to look for!
    He does the website work in Dreamweaver in Tiger, if that makes any difference. This is a guestbook that forwards entries to me as emails (they are not diplayed on the site)

    Unless I'm misunderstanding what you're trying to do, you don't need a preloaded for embed movies.  The page will load without any delay.  It's not until the user chooses to play a movie will it begin downloading / streaming it from the server.  Even if the video is a large file, internet users are use to this type of scenario where they choose to play a movie, ala youtube and others, that if their connections are slow there may be delays in video playback.  With all that said, I have seen and used page loaders where visitors will be expecting to wait a while for a result to happen, I just don't think this scenario warrants it.

  • Need Script for Videopodcast.

    Looking for Script  for iTunes, to extract audio segment from Vide podcast  and save it for iPod Nano. can' find it in dougscripts.com/iTunes. Used to have that script but lost due to update my OS 10 to 10.9.4 Thank you! Igor.

    Hasvi,
    You can use the method "convertBulletsAndNumberingToText ()"
    e.g. app.activeDocument.stories.everyItem().convertBulletsAndNumberingToText();
    It converts the bullets and numbering to text present in all the active document stories (Footnotes and Tables will be done separately).
    ~Green4ever

Maybe you are looking for