OS X Technologies :: Accessing Cells In Numbers With Apple-script?
Mar 1, 2012
HiThe usual tale of an Applescript beginner getting lost but, I want to be able to search for a selected membership number within a Numbers spreadsheet, extract that member’s email address and send a message. I have managed to create a script that creates and sends the email but after several attempts I cannot work out how to start searching cells for a particular value and how to extract data from cells in the selected row.
I just want to know if there is any way (formula) to count the numbers all the cells which are not empty in a column or row disregarding the content of the cell.
It may contain date, text or even number. I don't want to have the sum of those numbers, rather how many cells, have something in them.
I'm new to iworks and have trying to figure this one out for a while. I used a template to set up financial info and calculate how much was spent on items. This was the preset formula: =SUMIF(Transactions :: $Category,A2,Transactions :: Amount)
However, I only want the sum from a particular range of dates (e.g. 9/1/09 to 9/30/09, as in cells B2:B10) so I can budget accordingly. In excel, you just grab the highlighted corner and drag it to where you want- here I can't do that and it won't let me add any more "conditions". Any idea how to remedy this? It's driving me nuts. On a side note, I am NOT a programmer so programming language will unfortunately not help unless you get VERY specific about how to do it (which you probably don't want to do).
In Numbers '08, is it possible to link cells/columns between sheets; so that in the below spreadsheet selecting an item from Column A in "Hub Dimensions" sheet in the drop down box of the "Spoke Calculator" sheet would fill out the cells in Column D of the "Spoke Calculator" sheet with data from the related cells in the "Hub Dimensions" sheet?
Every time I change the cell format in numbers, it keeps going back to 12/30/11 when I want 2/1/12. It is quite frustrating because I did what it said to do.
My only problem with this setup is that the line numbers are missing. I can pass in the -c flag, or --line-numbers, it doesn't matter: I never get line numbers. And I tried installing enscript on my linux box too and it also leaves out the line numbers. Does anyone have any ideas, or at least know the last working version of enscript?
Info:MacBook Pro (15-inch Mid 2009), Mac OS X (10.7.3), 3GHz, 8Gb RAM, 40GB SSD + 750GB HDD
Is there any way to get a list of all inode numbers on a volume? I have a "find -x /Volumes/thedisk/* -exec stat {} ;" going but requires lots of CPU time. Seems like I should be able to look directly at the file allocation table...oh wait, that is DOS. This is on an HFS disk: /dev/disk0s2 on / (hfs, local, journaled)
I'm creating a Service in Automator, and would like incorporate an Apple script that will "cut" the first word in any Numbers cell that I select, and "paste" it into the cell directly to the left of the the cell I've selected. Let's assume the column I'm selecting from is Column C. As a very rough start, here is what I have (with some of things I'm trying to accomplish in brackets):on run {input, parameters}tryset MyText to input as stringset FirstWord to first word of MyText set [remove the first word and a single space from what I've selected]tell application "Numbers"tell table 1 of sheet 1 of document 1set theRow to [the row of the cell I've selected] set value of cell 3 of theRow to FirstWord end tellend tellend try return inputend run.
I just cant get numbers form app store. Every time I want to get it, it shows "There was an error in the App Store. Please try again later. (100)". And no matter how i try, it is just not downloading...
In order to get more run time out of door, the better way is using high capacity battery. Some ask me if we can use 12 cells Mac Pro battery to replace 6 cells battery.
I feel like this should be a simple question, but I cannot seem to get it to work. i have a 31 page, Pages document that I made from scratch. i want to number all the pages somehow.
I am currently trying to generate a report using the headers from Apple Mail. The script I have works, but I would like to be able to pull out messages that are sent to a specific recipient ( a certain distribution group in this case...).
this is my second script im trying to create. What i would like this script to do is have the user input and ip and ping that address my problem lies in getting ip address from the dialouge box into the "do shell script", this is my script so far set Ip_address to ""set Dialog_1 to display dialog "Enter Ip Address" default answer "" with title "Ping"set the Ip_adress to the text returned of Dialog_1set ping to (do shell script "ping -c 2 & Ip_address & ")if ping contains "64 bytes" then display dialog "Connection Secessful"
And also how do i make a variable so if it comes back i unresponsive i can have a dialog box say "Connection Unsecessful" (I know i can do this maunally but i would like to create a script so its easier for the end user)
I manage a small deployment of different macintosh products and I currently have to run 5 different images so that the background images look right on all the various resolutions. I have been working on a piece of applescript to prompt the user on first startup to select their hardware type to apply the proper background image but I am running into a few issues. Firstly the method I am using limits me to three options and I cant seem to find any documentation on how the list function works..Second, I keep getting errors saying the files can't be found. [code]
I am just starting out with applescript and could do with a pointer please. I have written a script which saves two pdf files from an active Illustrator document in the source folder of that document. The issue I am have now is that I cannot get the two files to combine into a single PDF file. The whole script is quite long and is works apart from the combine PDF part?
tell application "Finder" try open (every document file of container of file_path whose name contains ".pdf") on error display dialog "no PDF file located"
[code]....
Both PDF documents open and are set as the variables docRefA and docRefb, but the acrobat command 'bring to front' and 'insert page' do not seem to be working. I get an error come up in an illustrator dialog box saying "Adobe Acrobat Pro got an error: document "84056_R1.pdf" doesn't understand the bring to front message".
I've been ripping my hair out trying to find the answer to this.
In Numbers for Mac, I need to fill a column automatically with a series of integers (1 - 50) and then the next column with a function that interacts with the first column.
For example:
Column A - 1 - 5
Column B - (value in Column A * 5)
I can't figure out how to do it in Numbers When I try to fill column a with 1 - 50 all it does is fill all 1's and I cant find an option how to make that change so it automatically numbers when I highlight them.
The best I can describe is how in Excel you can type 1 in the first cell, then highlight a bunch of cells and the little box appears that lets you click "Fill Series"
See above title. i get that there's the "degree(cell)" function, but there has to be an easier way to change the settings so you can just input in degrees rather than radians.
like how calculators have a degrees and radians mode, i find it so hard to believe that there isn't one in numbers. if there really isn't, this is an incredibly flawed program.
I am trying to make a script that allows me to call a number in Address Book in my Avaya Softphone app. Everything works great except that all numbers need to have "9-1" or "91" before the phone number. This is needed to access the outside line and all calling requires the country code. how to add the 91 to the script so that all phone numbers in the script have this added.
I'm just now upgrading from 10.6 to 10.7, and I'm having trouble with a script that I wrote that worked fine under 10.6. In part, it executes the following command: osascript -e "tell application "Finder" to set destop picture to POSIX file "<path>"" to change the desktop background image to one of two different files based on other conditions. In 10.7, this command completes with no error code, but it only changes the background of one of my four desktops. Is there a way to programmatically change the background image of all of my desktops simultaneously? Failing that, is there a way to a) find out how many desktops I have and b) loop through them, setting each of their backgrounds in turn? osascript -e "tell application "System Events" to set picture of every desktop to "<path>"" Unfortunately, that also changes only the current desktop's picture. The larger script is in Perl, so I'd prefer a technology that works well with that language, but if I have to change to a different scripting language, that's not the end of the world.
I'm using the following script below using an external libarary to query mysql database on external server. works. gives results. How do I save them to do something with the. when I run it, the results of the call to the library show up in the results window. that makes sense. ie {rows:1, cols:1, record_data:{{"85016 "}}} I want to assign the results to a variable to use it later, particularly the 85016. I try "set testVariable to tell db_link to do_select(theDBCommand)" no good. Not sure how to do this.Script follows: -- links to the mysql tools -[URL]set library_path to "js_aux_scripts:mysql_objects.scptd" set app_support to (path to application support folder) as stringset DB_Library to (load script file (app_support & library_path)) set db_link to new_link("lala.yadayada.com", "user", "pass", "db") of DB_Library -- collect the job number you want to run-- Get the Numberset displayString to "Enter Job Number"set the theIcon to 1set theJobNumber to ""repeat display dialog displayString default answer theJobNumber with icon
I’ve found this script that copies the names of multiple selected files in the Finder to clipboard: try set theNames to {} tell application "Finder" repeat with i in (get selection) set end of theNames to name of i end repeat end tell set {TID, text item delimiters} to {text item delimiters, return} set the clipboard to theNames as text set text item delimiters to TIDend try I need to prepend to each result a string like [URL] where “folder” is the parent folder relative to the files.
im looking for a more elegant way to list of folders in a popup for users to select at the beginning of my script and use as a path variable.the path i need to filter through to make the list is similar to the following: /Volumes/Network Drive/A/Client Name(s) starting with A//Volumes/Network Drive/B/Client Name(s) starting with B/ other folders will be created in the folder they select. The complications: All the folders i want to list are divided into folders labelled with each letter of the alphabet.Also there could potentially be hundreds of these folders once consolidated to a list The current script lists the entire file path in the popup. I want the entire path to be set as the variable but just the folder name to be listed in the popup These are the scrips i have started with but would love a better way to combine and clean up.
(*set mainList to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "XYZ"}choose from list mainList with prompt "Choose Client"set listchoice to result as text*)set the_folder to (path to desktop) as stringset with_subfolders to trueset inc_folders to true set the_files to get_folder_list(the_folder, with_subfolders, inc_folders)return the_files on get_folder_list(the_folder, with_subfolders, inc_folders) set the_files to {}
I'm looking for an applescript to detect if a cd is inside my mac, if cd inside (possible to detect if empty?) do one thing.Otherwise do another thing.