How can I use Automator or AppleScript to get text from a web page and paste it in execl?

I don't know how to make scripts or complexed automator workflows... that's why I'm asking.
I'm trying to make a simple app or script to ask me what text to extract from a web page, like name, address and phone number of a web page and paste each one of these data in the righ cell of excel.
I was thinking to promt a request from automator or an applescript to ask me which text to extract from the page or to look throught the HTML of the page to search for specific html tags, from which extracting text and then importing it, or paste it to the specified execl cell. Name in the name cell, address in the address cell and so on.
Can somebody help me to make this script?
If you know an alternative, like a software that already do this or another language to use, please tell.

Try holding down the alt key as you mark the text to be copied. You can then copy columns to table text.

Similar Messages

  • How can I use Automator to extract specific Data from a text file?

    I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
    How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
    Example of File Contents:
    Link Time =
    DD/MMM/YYYY
    Random
    Text
    161 179
    bytes of CODE    memory (+                68 range fill )
    16 789
    bytes of DATA    memory (+    59 absolute )
    1 875
    bytes of XDATA   memory (+ 1 855 absolute )
    90 783
    bytes of FARCODE memory
    What I would like to have as a final file:
    EXCEL COLUMN1
    Column 2
    Column3
    Column4
    Column5
    Column6
    MM/DD/YYYY
    filename1
    161179
    16789
    1875
    90783
    MM/DD/YYYY
    filename2
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    MM/DD/YYYY
    filename3
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?

    How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?
    I do not use command line and tried to use ZapResourceForksAMAub_1.2 which I downloadedand instaled the Zap Resource Forks.action. Next I tried to use their sample copy-zap-rsrc.workflow in Snow Leopardon my Mac Pro. The 3 different steps are displayed in Automator but there is no place to put in which folder (on my deskto) to copy, and remove the resource forks from the graphic files.
    Can sombody please step me through this please please.
                                                                                          W.W.

    Unfortunately, Back to My Mac only works across computers using the same iCloud account.

  • How do I use AirPort Extreme to be able print from my MacBook Pro AND a PC. If I connect printer into AirPort, I can only print on laptop. If printer is connected to PC hard drive, I can only print on desk top. How do I configure this to make both print?

    How do I use AirPort Extreme to be able print from my MacBook Pro AND a PC. If I connect printer into AirPort, I can only print on laptop. If printer is connected to PC hard drive, I can only print on desk top. How do I configure this to make both print?

    If you have not already done so, your chances will really improve if you....
    1) Connect the printer to the USB port on the AirPort Extreme
    2) Download and install Bonjour Print Services for Windows on the PC

  • How can I use my product code to get the serial code to active my dreamweaver?

    My product contain 22 letters and numbers, it can't feet inside any code thing that I found, and I had already sent a email to let them send back the serial code to me, but it didn't. So I want to ask how can I use my product code to get the serial code so that I can active my dreamweaver?

    I already in downloaded the thing, but I just have a product code, how can I install the product?

  • How can I use my iTunes card to get games on my iPod

    How can I use my iTunes card to get games in my ipod

    Hi there Domenikafischetti,
    You may find the information in the article below helpful.
    Redeeming iTunes Gift Cards and content codes
    http://support.apple.com/kb/ht1574
    -Griff W.

  • How to read text from a web page

    I want to read text from a web page. Can any body tell me how to do it.

    Ok i tell you detail. visit the site " http://seriouswheels.com/" you will a index from A to Z which are basically car name index i want to read each page get car name and its model and store it in data base. I you can provide me the code i will be very thankful.

  • I am just about giving up!  I have upgraded Pages to 0.9 4.3.  Now when i copy text from an incoming email and paste it it pastes in as an Object and I can't work on it.

    I am just about giving up!  I have upgraded Pages to 0.9 (4.3).  Now when I copy text from an incoming email and paste it into Pages it pastes in as an Object and I can't work on it.  It has a border round it and corner markers.  I have never had this problem before.  I have looked at every conceivable thing but cannot find how to get rid of this Object and just paste in the wanted text.  If I fiddle and fiddle within this text I can eventually get a cursor and work on the text - but how on earth can I get rid of the surrounding box?  
    I don't know if this is at all clear but I can't think of any other way to describe this - but it looks like this in Pages with corner and top, bottom and side markers.
    Monthly summary for .................March, 2013
    Four more elephant Rescues during the month - first a yearling female named “.......................................
    Lecia

    Peter hello - I have been copying and pasting for as long as I can remember and it has NEVER done this before - so why now!? Anyway, Jerry has told me about Paste and Match Style --- yet another new thing! 
    I have also discovered that I don''t need to hold down Option when I go to Save to get Save As -  I can hold down 4 keys (shift, option, command and S) and it will bring up Save As!! 
    Thanks for your response.
    Lecia

  • How can I use automator to import a .csv file into a an excel file

    I would still like all the import settings that I get if I am using excel to do the process, i.e. going in with the text format instead of the general format. That way my dates don't change

    You'll need to use Applescript in Automator.
    Note:  File extension cannot be CSV (Excel will assume that the file is comma separated), so add an action to copy or rename with extension TXT.
    (You can rename back at end of Workflow is needed)
    The Applescript Action is:
    on run {input, parameters}
         repeat with f in input
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
              end tell
          end repeat
          eturn input
    end run
    NOTE: This is formating the 1st col to text
    If you need to format the second, then you need to:
      open text file filename (f as string) data type delimited field info {{1, general format}, {2, text format}} other char "|" with use other
    (You'll need to list the 1st col, 2nd col, etc until you get to the col to format as text).  Formats are (from the Applescript Excel Library):
    [field info list] : A list contain parse information for the individual columns of data.
    Formats are general format, text format, MDY format, DMY format, YMD format, MYD format, DYM format, YDM format, skip column.
    Or you can skip using Automator and just use an Applescript App (this is a droplet, just drop the files on the icon, or click to choose files):
    on run
         set fs to choose file with prompt "Select one or more files to open:" default location alias (the path to desktop folder as text) with multiple selections allowed
         proceed(fs)
    end run
    on open fs
         proceed(fs)
    end open
    on proceed(fs)
         repeat with f in fs
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
               end tell
          end repeat
    end proceed

  • How can i use a song as a ring tone from a cd i have loaded on the 4s

    How can i use a song as a ringtone from  a cd i have loaded on my iphone 4s

    The weird thing is, when u make your own ringtones, they sound terrible when set as a ringtone (really tiny and generally awful), but when u set them as a text tone or any other alert they sound great (like they do when u play them through the music app).
    Is this just a bug with iOS5 or have previous models also done this?

  • Can you use a flex application as part of a whole web page?

    Hello all,
    Have a quick question. I am coming over from a flash developing background, and I commonly used smaller flash files as 'part' of a entire web page.  For example, a small flash video player section with a combo box to select the video to play; this swf file would be sized at about 600px wide by 400px high. Then I would just put that in a div tag and add it to my web page.  I am trying to do this with flex, but I am running into issues. It seems that the actual published swf wants to run at 100% of the browser window size. I tried adjusting these dimensions; first trying within flex in the <application> height and width props, but that didnt do the trick; then tried to just use the published .swf file in the web page, and set its <object> properties to my required height and width, which 'almost' works but still falls apart when the video player's full screen button is pressed.
    So, is it possible to use a flex 'app' as part of a web page, or was flex intended to run on its own and 'not' as part of a web page? Thanks in advance!

    You definitely can. I typically drop the Flash/Flex app into a "mainContent" div within my larger page structure, so my page would look something like this:
    <html>
    <style type="text/css">
         #mainContent {height: 600px; width: 900px;}
    </style>
    <body>
    <div id="topNav">BLAH</div>
    <div id="sideNav">BLAH</div>
    <div id="mainContent">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                id="MyFlashApp" width="100%" height="768"
                codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                <param name="movie" value="MyFlashApp.swf" />
                <param name="quality" value="high" />
                <param name="bgcolor" value="#FFFFFF" />
                <param name="allowScriptAccess" value="sameDomain" />
                <embed src="MyFlashApp.swf" quality="high" bgcolor="#FFFFFF
                    width="100%" height="100%" name="MyFlashApp" align="middle"
                    play="true"
                    loop="false"
                    quality="high"
                    allowScriptAccess="sameDomain"
                    type="application/x-shockwave-flash"
                    pluginspage="http://www.adobe.com/go/getflashplayer">
                </embed>
        </object>
    </div><!-- close mainContent -->
    </body>
    </html>
    Note that I'm only using the HTML approach, but the Javascript should work just as well. With the flash set to width=100% and height=100%, it will fill the enclosing div, but that's it. So, if you wanted to make this expand vertically but not horizontally, just set your CSS style to height: 100% and leave width a px or em value. Note that the enclosing divs (i.e. if you had a wrapper div around the navs and mainContent) would also have to expand/contract.
    I don't know about the effects of going full screen, though.

  • How do I copy text from a web page in Safari?

    I've searched up and down and can't find the answer to this simple question.
    There is a UI element that I want to copy to the clipboard and then paste into Excel. The UI element is:
    static text of group 104 of UI element 1 of scroll area 1 of group 4 of window "Account Summary"
    The contents of this static text on the web page is "$1,000.00"
    How can I copy this to the clipboard?
    I've tried:
    select static text of group 104 of UI element 1 of scroll area 1 of group 4 of window "Account Summary"
    keystroke "c" using command down
    keystroke "l" using command down
    keystroke "v" using command down
    but it doesn't work. "Select" doesn't actually seem to select anything. However, when I run this from within Script Editor, in the Results Window I get:
    {static text "$1000.00" of group 104 of UI element 1 of scroll area 1 of group 4 of window "Account Summary" of application process "Safari" of application "System Events"}
    ... I'm confused as to what this is telling me. All I want is to copy this value to the clipboard. Any suggestions???
    Thanks,
    Jeff

    Try this:
    set the clipboard to item 1 of (get name of (static text of group 104 of UI element 1 of scroll area 1 of group 4 of window "Account Summary" of application process "Safari"))
    (10906)

  • How get data from another web page?

    I have my own interface..after i key In a keyword and click search, method post will post the data to server and server will response.write a HTML page that display the result based on the keyword i Key In. The problem is i want the result display on my own page. So how can i read the search result from the HTML page and display on my own design page? I use JSP to built my page. thanks

    I dont know the following solution would solve ur problem, atleast u will get basic idea.
    1st method
    Create an inline frame (IE-IFrame etc), On pressing submit button, Post the data to required page (it might be some page on another server)and specify post target is ur inline frame.
    if u want filter the result data and want to display in ur own way then send ur POST request to ur own JSP and use Http classes to read resend those data to other page (another server) and capture the results implement ur own logic to get desired data and resend to the requested browser
    I hope it would solve ur problem
    Cheers
    Rajendra Bandi

  • How can I use automator to open terminal change directory run a python script?

    Hi all,
    I dont really ever use automator - which may be my big problem - and I am trying to make an apllication that seems fairly simple in theroy. I want something that will lunch terminal, cd to the place where my python script lives and then run it. I have tried a number of suggested ways and can get the terminal to open and the directory to change but cant figure out how to run the script. This is my workflow if i did it manually each time
    - open terminal
    - type cd "the place where my file lives"
    - type python uploadr.py -d
    I can get terminal to open then cd to the right place but cant get the "python uploadr.py -d" to run without an error.
    any help would be very appricated
    thanks!!!
    J

    this is the script I got closest with - I know its something to do with breaking those two commands up but i just dont know how to do it
    on run {input, parameters}
              tell application "Terminal"
      activate
                        if (the (count of the window) = 0) or ¬
                                  (the busy of window 1 = true) then
                                  tell application "System Events"
      keystroke "n" using command down
                                  end tell
                        end if
                        do script "cd /Users/behole/Desktop/FlickrUpload/" & "python uploadr.py -d" in window 1
              end tell
              return input
    end run
    this is the error I get in terminal after I run it
    Last login: Mon Jul 23 15:37:17 on ttys000
    be-holes-MacBook-Pro:~ behole$ cd /Users/behole/Desktop/FlickrUpload/python uploadr.py -d
    -bash: cd: /Users/behole/Desktop/FlickrUpload/python: No such file or directory
    be-holes-MacBook-Pro:~ behole$

  • How can I use automator to copy and paste excel content to a new empty document?

    Hi,
    I would like to copy and paste the content from an excel file to another empty new document using automator, which I created a workflow like below
    get specific finder item
    open excel workbook
    select cell from excel workbook (all content)
    obtain selected content from workbook
    copy to pasteboard the content of excel workbook
    close the excel workbook
    create new excel workbook
    paste copyboard content to excel workbook
    can anyone kindly suggest what's wrong with this workflow?
    Thank you so much
    Eddy
    (i know this is a number place but I couldn't find any excel seciton sorry guys...)

    now it only does one file at a time, whereas I would like to do multiple files simultaneously.
    If you try a search for "loop Automator" and also "folder actions" you may find some usable pointers on how to do that.  The first example on this page looks promising.
    SG

Maybe you are looking for