Using applescript to run a whois from an ip address

I need to be able to automatically look up IP addresses to get their location and registration information. I notice the network Utilities, which performs the function well manually, has no dictionary for apple script. Can anyone tell me if and how this could be done by apple script
Thanks

Thanks yes I have that bit but where does the answer go lol
Like any AppleScript command, the output of the last command is stored in the variable result. In this case the output of the shell command is the result of the do shell script command.
This makes it trivial to assign to any variable for later use, e.g.:
do shell script "whois 1.2.3.4" -- result of command implicitly stored in the result
set myVariableName to the result -- store the result for later use
or, more succinctly:
set myVariableName to (do shell script "whois 1.2.3.4")
(parentheses are optional, but added for clarity)
in the latter example, the command is executed and the result assigned to myVariableName.
The same techniques can be used for any AppleScript command that returns a value.

Similar Messages

  • Applescript for running specific action from action wizard...

    Hi Forum,
    using this applescript I m running my "INDEGN" action from action wizard...
    the first step is activated through the applescript.. (ie. INDEGN action is correctly picked)
    but how to "click next button" to proceed to next steps..
    tell application "System Events"
        tell application process "Acrobat"
            tell application "Adobe Acrobat Pro" to activate
            click the menu item "INDEGN" of menu 1 of menu item "Action Wizard" of the menu "File" of menu bar 1  ## here it is not cliking next button.....
            click button "Next" of window "Action: INDEGN"
    click button "Close" of window "Action: INDEGN"
        end tell
    end tell
    many thanks for the support..

    HI DAVE,
    thanks for the reply,,
    Is there any other way to run "my action" from action wizard. using script....
    Would be  a great help if advised....
    Many thanks...

  • Use Applescript to create folder structure from Numbers document

    Hello All,
    I know this is possible and I am feeling close - I just couldn't find a post that addressed the issue I am having exactly. Essentially I have a client list with 211 business names in it. I am trying to create a script that will scan the first column of my Numbers document and create a folder structure from that list. I found a post on another website that gave me a rough template and this is where I am at:
    set destinationFolder to "MacHD:/Users//Documents/Work/Customers/:to:folder:"
    tell application "Numbers.app"
              set theCells to value of range "A1:A211" of active sheet
    end tell
    repeat with oneCell in theCells
              tell application "Finder" to make new folder at folder destinationFolder with properties {name:item 1 of oneCell}
    end repeat
    When I run this I get "Expected end of line but found class name." and in the result window it display "
    error "Can’t get value of range." number -1728 from «class NMCv» of «class NmCR»"
    I am completely new to this and don't really know how to debug. Any help would be appreciated! Thank you so much!
    Adam

    Here is an enhanced version which no longer use a loop to extract the selected values.
    --{code}
    set destinationFolder to "MacHD:/Users//Documents/Work/Customers/:to:folder:"
    tell application "Numbers.app"
              set theCells to value of range "A1:A211" of active sheet
    end tell
    repeat with oneCell in theCells
              tell application "Finder" to make new folder at folder destinationFolder with properties {name:item 1 of oneCell}
    end repeat
    set destinationFolder to "" & (path to desktop) & "  dossier"
    Select the range of source cells then run the script *)
    Grab parameters describing the selected cells *)
    set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    Extract the names from the selected cells *)
              tell column colNum1
                        set theNames to value of cells rowNum1 thru rowNum2
              end tell -- column
    end tell -- Numbers
    I always do my best to use System Events which is faster than the Finder *)
    tell application "System Events"
              repeat with aName in theNames
                        try
      make new folder at end of folder destinationFolder with properties {name:aName as text}
                        end try
              end repeat
    end tell
    --=====
    set { dName, sName, tName,  rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    on get_SelParams()
              local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
              tell application "Numbers" to tell document 1
                        set d_Name to its name
                        set s_Name to ""
                        repeat with i from 1 to the count of sheets
                                  tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
                                  if maybe is not 0 then
                                            set s_Name to name of sheet i
                                            exit repeat
                                  end if -- maybe is not 0
                        end repeat
                        if s_Name is "" then
                                  if my parleAnglais() then
                                            error "No sheet has a selected table embedding at least one selected cell !"
                                  else
                                            error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
                                  end if
                        end if
                        tell sheet s_Name to tell (first table where selection range is not missing value)
                                  tell selection range
                                            set {top_left, bottom_right} to {name of first cell, name of last cell}
                                  end tell
                                  set t_Name to its name
                                  tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
                                  if top_left is bottom_right then
                                            set {row_Num2, col_Num2} to {row_Num1, col_Num1}
                                  else
                                            tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
                                  end if
                        end tell -- sheet…
                        return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
              end tell -- Numbers
    end get_SelParams
    --=====
    on parle_anglais()
              return (do shell script "defaults read 'Apple Global Domain' AppleLocale") does not start with "fr_"
    end parle_anglais
    --=====
    --{code}
    Here is an alternate version of the piece of code extracting the values :
    --{code}
    Grab parameters describing the selected cells *)
    set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    Extract the names from the selected cells *)
              set cell1 to name of cell rowNum1 of column colNum1
              set cell2 to name of cell rowNum2 of column colNum1
              set theNames to value of cells of range (cell1 & ":" & cell2)
    end tell -- Numbers
    --{code}
    Yvan KOENIG (VALLAURIS, France) mercredi 25 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • HT5621 Steps to change the primary email address for Apple ID, want to use alternative email (even after removed from lisetd mail addresses it will not allow me. current Apple ID mail address does no longer exist therefore changing required

    apple ID does not allow me to change primary listed email address, this address does no longer exist and now need to get a secendary listed email address to become primery.

    I had a similar problem, which prevented me changing my personal data on iCloud/apple etc. I found the answer on the apple web-site, "appleid.apple.com".
    This site lets you change your primary country, and so lets you use the app store.

  • Importing XML using AppleScript in CS5.

    Hi, totally new to inDesign but do programming and database work.  I am looking to import an XML file created from our database.  I can do a basic import manually after creating document and importing xml to load tags then creating text box element and tagging it and placeholder text.  Now trying to automate using AppleScript.  Found some samples from inDesign but not sure how to tie all the pieces together.  Does anyone have a simple example that takes a small XML file and loads a few records automatcally into indesign.  Maybe, create new document, create textbox element and create text placeholders and tags then import xml file?
    Thanks,
    Joe

    I don't work in applescript, but:
    Does anyone have a simple example that takes a small XML file and loads a few records automatcally into indesign.  Maybe, create new document, create textbox element and create text placeholders and tags then import xml file?
    Err, when you say "records," you have me slightly concerned.
    Because it is quite difficult to get Data Merge -like functoinality with XML.
    Have you tested (and validated!) this workflow withoutscripting?

  • School macbook stuck-frozen after using applescript

    HELP!!! i was using applescript on my mac book from school using a autoclicker but when i used it i froze the whole computer so i i turned it off (forcing it) but when i restart it is still frozen and cant access anything. I tried pressing : option + command + esc but it wont let me click the programs to force quit them or anything please help i have school tomorrow!

    after a while i slowly managed to force quick apple script and from there i worked my way out of the problem

  • Green frames when using AppleScript to export from QT

    Not sure if this is a QuickTime issue, h.264 issue, or an AppleScript issue, but i thought I'd start here since I know the least about AppleScript and have some clues to the problem.
    I'm creating an Automator workflow that requires a run AppleScript action. My plan is to use applescript to have QuickTime Pro 7.6.6 export an image sequence from a QuickTime movie in h.264, using a QuickTime settings file I've already exported. The script points to the settings file and and exports the sequence to the output folder I've specified. Im looking to export one frame per second. Running the script works well and I'm almost getting the result I want, except that each frame that is exported is entirely green.
    Interestingly, when I run the exact same process manually, using the exact same settings, the export works fine, and the frames are correct. Additionally, exporting via AppleScript brings up a different status bar than when exporting manually, which leads me to believe that AppleScript is the culprit. Perhaps it's running some sort of outdated process? The AppleScript status bar comes down from the top middle of the video frame, while exporting manually, brings up a floating status bar. They look decidedly different.
    Has anyone run into this problem? Can possibly shed light on it? Possible AppleScript work around?  This only seems to effect h.264 videos. If I run the same AppleScript on a prores file, the images export correctly.

    Including the applescript in question could be helpful!
    tell application "QuickTime Player 7"
              export front document as image sequence using settings "Macintosh HD:Users:grato:Documents:SYNC:Sync Assets:settings:Sync_QTexport_setting.qtes" to "Macintosh HD:Users:grato:Documents:SYNC:Sync Assets:Assets:temp:Sync-"
    end tell

  • AppleScript code runs slower as an application than running from the editor

    I discovered today that AppleScrip runs much faster when I run the code from the run button in Applescript Editor 2.3 than when I save the source code as an application and then run the application. I really expected the opposite. I would prefer not having to open Applescript Editor 2.3 each time I run a program, but the time difference is significant (see below). What causes this? Am I doing something wrong? I save the source code by going to File -> Save As -> File format: Application. I then run the application.
    Examples (both programs manipulate data in lots of Excel spread sheet files):
    Program 1- run time is 5 min, 40 sec when selecting run in Applescript Editor 2.3, and 23m, 25s when running as an application.
    Program 2- run time is 7m, 12s when selecting run in Applescript Editor 2.3, and 12m, 54s when running as an application.

    I tried the code "Hiroto came up with as solution that was essentially 100% effective" provided in the link. My run time went from 5m 30s when run from source code to 5m 50s when run as an application (differences in seconds could easily be my crude method of measuring time). Previously, it took 23m 25s when run as an application. Thanks, this is the solution I was looking for.
    However, in searching this issue, I found similar code in a discussion topic titled "Applet speed -- Hiroto's solution followed by issues" posted Jul 27, 2008. That code would randomly end with "The variable o is not defined". I hope the new code solves this problem. The new code certainly worked great the first time I used it.

  • I have a late 2011 model MacBook Pro running Mountain Lion.  I love the AirPlay mirroring feature with Apple TV...BUT, how do I mirror with TVs that don't have Apple TV?  I used to run a cable from my mini display port to the HDMI input of a TV.

    I have a late 2011 model MacBook Pro running Mountain Lion.  I love the AirPlay mirroring feature with Apple TV...BUT, how do I mirror with TVs that don't have Apple TV?  I used to run a cable from my mini display port to the HDMI input of a TV.  This feature seems to be lost in the Mountain Lion upgrade.  Did Apple feel that once Mountain Lion came out that EVERYONE would have Apple TV?  There are no settings in System Preferences/Display like there used to be...only for AirPlay Mirroring.

    Running a cable to the HDMI port is still supported. (and still works on mine).
    If the Arrangement tab in System Preferences > Displays isn't present then it doesn't recognize the physical connection.  Double check all cables.  If that doesn't work try a PRAM reset:
    http://support.apple.com/kb/ht1379

  • How to Run a Report from Desktop in Oracle 10g without using Web

    Hi Friends,
    I want to run a report from desktop (report which is developed in oracle report developer 10g), for that i have created shortcut. But when i double click on that shortcut it gives me followig error
    "Report name, database connection, and reports server name (unless using local runtime, i.e. reports server call is local) properties must be specified for successful report run"
    the path which is defined in the shortcut of report is as follow
    D:\DevSuiteHome_1\BIN\rwsxu.exe rcptreg_dt userid/password@ORC
    pls help me to sort out the problem.
    Thanks & Regards.

    Hello,
    You can use rwrun. Since 9.0.2 , it is no more possible to DISPLAY the output on the screen , but you can generate a file (HTML , PDF , RTF , ..) and then open the file generated.
    EX: rwrun report=c:\temp\myrep.rdf destype=file desname=c:\temp\myrep.pdf desformat=pdf userid=scott/tiger@mydb P_1=param1_value ...
    Regards

  • HT201177 i'm trying to run a DVD from my mac book pro to a projector.  I can't get a picture and am using the AV cables for mac.  Ideas?

    I'm trying to run a DVD from my macbook pro to a projector.  I am using apple AV connectors and still get no picture.  Ideas?

    What are you getting on the projector?  Does it say 'no input detected'?  Are you getting the spiral galaxy wallpaper?

  • Anyone know which render format I should use, my film will be used on a video wall (12 screens) and I need super quality. My footage format is 1080p HD resolution 1920x1080. I will be running the project from a mac with a direct line to video wall. Thanks

    Anyone know which render format I should use, my film will be used on a video wall (12 screens) and I need super quality. My footage format is 1080p HD resolution 1920x1080. I will be running the project from a mac with a direct line to video wall. Thanks in advance.

    I do some VJ-type work, involving playback of QuickTime files from the computer to projections, and I get good results using ProRes 422. That's convenient, because ProRes 422 is such a great editing codec, too.
    Traditionally, VJs use PhotoJPEG codec, which also works well, but it's a bad editing codec. So you would have to export an edited master, then convert.
    If you want it to look as good as possible, definitely schedule some time to test the footage on the wall. You may want to change the color correction of your footage to match the projectors. And if you feed the video wall some flat gray, you can see if any of the projectors need to be  adjusted.
    I'm not sure what application you're using for playback, but QuickTime Player 7 works well. It has an option to play fullscreen on an external monitor (View > Present Movie…).

  • To run a report from command line, when using jdbc-odbc bridge

    Hi,
    How to run a report from command line, when using jdbc-odbc bridge?
    Usually with tns, we do by "rwrun module=<> userid=<user>/<passwd>@tns".
    with odbc, we do by "rwrun module=<> userid=<user>/<passwd>@odbc:DSN"
    Please specify, what is command line arguments for jdbc-odbc bridge driver?
    Environment : Oracle 9i Report Builder on WinNT
    Database : Sybase
    Regards,
    Ramanan

    Hello Ramanan,
    Report Builder : connect JDBC Query in Report Builder is to through Connection Dialog in JDBC Query Editor. User can use a Sign on parameter (can use, default : P_JDBCPDS or can create new) to connect to JDBC Data Source. Connection once made will be mentioned and will be reused through out Reports Builder.
    JDBC PDS allows user to connect one or more same or different kind of databases.
    While running report through runtime or Server, user can pass the sign on parameter(connection string) value, like any other user parameter.
    Syntax for connection string : <username>/<password>@databaseURL . The syntax of database part of connection string depend on the type of JDBC Driver used to connect to Data Source while designing the JDBC Query. databaseURL refer to the location of the database and its format depend on the JDBCPDS river selected in design time while creating the JDBC Query.
    rwrun eg :
    rwrun report=jdbc_odbc.rdf destype=file desname=output.html desformat=html P_JDBCPDS=scott/tiger@database
    Server eg :
    http://server.com:8888/servlet/RWServlet?server=MyReportServer+report=jdbc_odbc.rdf+destype=cache+desformat=html+P_JDBCPDS=scott/tiger@database
    http :
    Please see ORACLE_HOME/reports/conf/jdbcpds.conf for more information.
    With Regards
    Reports Team

  • HT5945 Java has updated again today, i use a jave plug in to run my virtual software to access my work from home, today i have an error message saying security will not allow access to my website that i use to log in to work from, this is a JREdetection e

    Java has updated again today,
    i use a java plug in to run my virtual software to access my work from home,
    today i have an error message saying that security will not allow access to my website
    i use to log in to work from, this is a JREdetection error,
    my system runs off java and citrix, i tried chrome,firefox and safari - same issue, if my system cannot detect java it wont run, it runs on plug ins.
    How to i change my sec settings to allow access to this website, as i can only see that i can add apps not web addresses?

    If you get an error that says can't backup, try moving the existing backup file to a safe location and thry again. again. You can find the location of the backup file here:
    iPhone and iPod touch: About backups

  • Firefox won't insall into my applications folder. Says can't install because libsmime3.dylib is in use. I am running Mac Os 10.6.7 on a Macbook Pro. I can run firefox okay from the disk image but just won't install into the apps folder.

    My system is a Macbook Pro running Mac Os 10.6.7 with a 2.8 GHz Intel Core 2 duo processor with 4 GB 1067 MHz DDR3 ram. The upgrade downloads fine, but when I try to drag the firefox image onto my appication folder, I get a dialogue box that says...Cannot install application because "libsmime3.dylib" is in use. I can run Firefox fine from the disk image.

    Nope---didn't work. I've owned Macs for about 12 years so although I am brain dead on some things, I do have a working knowledge on most things. I only say that to say this--I did try holding down the mouse and choosing empty trash. It asks if I want to permanently delete what's in there. I say yes--and then I get the same identical message again-----'The operation can't be completed because the item "Firefox 8.0.1.dmg" is in use I can then click stop, or continue.' So apparently that complains the same way it does if I click it up on the menu :)))
    As for item owned by---that's not an issue and isn't coming up. User is not a problem either as I am the only user on this system. There is only ONE file in my trash at the moment at that is this dmg file. Nothing Mac. Nothing owned by anyone other than Firefox. The problem seems to be that the dmg file and the original 4.0 FF file are working in tandem with each other--even though I have already drug the new 8.0 globe into the Apps folder and it updated the FF app with the new stuff. If I could force the dmg file to go away, I would do so, but at every turn the system is telling me it can't be done because it seems to think that dmg file is in use---even though everything is shut down and/or ejected. Hey--I'm getting ready to head out and won't be back till evening. I'll check back in this evening. Thank you again for your help.

Maybe you are looking for

  • How do I change the JPEG image size in PSE-12 when opening from RAW

    Switching from PSE-9 to PSE-12. When a JPEG image is opened RAW in PSE-12 the size is 18.72" Wide x 12.48" high 300 DPI. The same image in PSE-9 is 23.4" wide x 15.6" High 240 DPI. How do I get PSE-12 to open the image as in PSE-9?

  • Transferring RAW photos to Iphoto

    I know this has been asked a lot before, but there's an ocean of variations of answers out there.  I can't make any sense out of it so I'm hoping somebody can give me a fundamental answer without overwhelming me with hi-tech stuff. I have a Canon EOS

  • Geodetic spatial queries - sdo_relate

    Hello, The following script populates a spatial table with points on a query boundary and then queries that table using the query boundary. When using a srid of 8307 not all of the points are returned using sdo_relate. If the srid is NULL then all po

  • Recover datafile in standy database

    Hi All, I have few queries in standby database.I need your help. 1)If a datafile is corrupted(ex sysaux) in standby.How to recover that file in standby.Need steps. 2)If a datafile is corrupted in primary.we will recover the datafile in primary.Will i

  • Tables without any entries in it.

    Hello experts, I am new to ABAP development environment. The following tables do not have any valid data in client 001.  The tables are :  MARA, BKPF, BSEG,EKKO,EKPO,VBAK,VBAP But i don't have the access to any other client...so can you please tell m