Problems copying a row and pasting it in the following row
Hi all,
In a Numbers table I have 400 rows with data separated each one by a blank row
row 2 has data
row 3 is blank
row 4 has data
row 5 is blank ... and so on.
I have prepared a small script to copy row 2 into row 3, row 4 into row 5,... as follows:
set dName to "Conta"
set sName to "Movis"
set tName to "Pruebas"
set row_ini to 2
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set selection range to row row_ini
repeat
if value of first cell of selection range = 0 then
exit repeat
else
tell application "System Events"
keystroke "c" using {command down}
keystroke return
keystroke "v" using {command down}
end tell
tell first cell of the selection range to set rowNum to address of its row
set selection range to row (rowNum + 1)
end if
end repeat
end tell
The idea is:
1 select the initial row (in this case row 2)
2 check if the value of first cell of the row is cero, then exit the repeat loop
3 else
4 copy the entire row, move down a row and paste.
5 move to the next row
6 repeat
The first time I run the script it worked until the row 124 and stopped. I tried again changing the inicial row and it worked only for 7 rows. The third time it erased all the cells with data. I've tried closing both the table and the script but the problems persists: in this case it stops after replacing 5 rows.
Where am I wrong?
Thank you in advance
Ratz
KOENIG Yvan wrote:
There is not such a book.
There is just on short chapter dedicated to iWork in :
Hanaan Rosenthal & Hamish Sanderson, Learn AppleScript: The Comprehensive
Guide to Scripting and Automation on Mac OS X, Third Edition, Apress (2010);
ISBN 978-1-4302-2361-0
You may find useful infos in my idisk :
<http://public.me.com/koenigyvan>
Scan the contents of the folder :
For_iWork:iWork '09:for_Numbers09.
I guess the problem is for using the tell application block without telling the process Numbers.
No, I had to change a lot of things.
the name of the document was wrong (at least on my machine on which I always use the name extension.
set selection range … was wrong.
Yvan KOENIG (VALLAURIS, France) dimanche 20 février 2011 23:02:35
Thank you.
Visiting your idisk I realise how much work I must do to become a decent scripter!
The book you mention looks interesting. I'm going to include it in my bookcase (and read it, of course).
Ratz
Similar Messages
-
I have the MacBook OS X 10.5.8, 2.4 GHz, 2 GB. I have been backing up my photos to an external hard drive since I purchased it. I usually choose the photos, copy and paste them to the EHD. It has started saying "an item named "unnamed.jpg" already exists in this location. Do you want to replace it with the one you're moving? Don't replace/Stop/Replace". I don't know what to do.
Thanks Jim, I kind of thought that was the answer, but was hoping against hope that I was just missing something. Like I said, it's not a big problem. One work around I've found is to name a folder on the external hard drive the same as the name I give the folder to import to and then choose this folder to back up to. I still get a subfolder inside that folder named Imported on...... but at least it's in the folder with my chosen name.
Thanks again,
Jack -
Before, when reading PDF files, I was able to copy and paste part of the book. Now it is not possible. I can copy but when pasting gets nothing.
Antes, quando lia arquivos PDF, eu conseguia copiar e colar parte do livro. Agora isso não é possível. Eu consigo copiar, mas quando vou colar o texto, não cola nada.Caro Fabiano,
Obrigado por ter contactado as Comunidades de Suporte Apple.
Na origem do seu problema podem estar várias causas. Nomeadamente:
O ficheiro (arquivo) que está a ler pode não ser texto, ou seja, pode ser texto transformado em imagem e exportado como PDF.
A aplicação de destino (onde está a tentar colar o texto copiado) pode não aceitar a colagem de texto formatado.
A aplicação que está a utilizar para abrir os ficheiros PDF pode não ser indicada para certo tipo de documentos. Experimente o iBooks, o Dropbox ou até mesmo o seu e-mail.
No caso de nenhuma destas causas estar na origem do seu problema, forneça, por favor, mais informações sobre a origem do ficheiro (descarga pelo Safari, Mail ou outro) bem como o destino (documento Pages, Keynote ou Numbers ou outra aplicação que não o iWork).
Atentamente,
Gonçalo Matos
Estou aqui para ajudar. Clique no botão "Reply" no caso de ter outra questão ou necessitar de outro esclarecimento para que eu possa ajudar da melhor forma que conseguir. -
Why can't you copy and paste text from the Dictionary widget?
I use this dictionary often, but I wish that I was able to copy and paste the text from it.
Just use the Dictionary application in the Applications folder. You will have no problem copying and pasting text from the full application. I just tried it and it works fine.
-
iOS 7 multitasking why do the app windows refresh, I can't copy and paste. If the associated app window keeps refreshing
Try. Going to
Settings
General
Background App refresh and turn off the ones giving you problem. -
Why when I copy a cell and paste into another it pastes into the middle of three cells?
Why when I copy a cell and paste into another it pastes into the middle of three cells? I was very fond of using numbers as it was straightforward and much better than Excel. But I made the mistake of installing Mavericks and Numbers 3.0. Now it is worse than Word at doing what it thinks it wants to do rather than what you want to do. I can no longer copy a cell and paste it into another. For some reason on pasting, instead of pasting into just one other cell it pastes into the middle of three cells - what the ****?
Thanks Badunit for your quick response
I have found the answer - it is a incompatabilty between CopyPaste Pro and Numbers: -
Thanks dbg1596 - solved my problem with which I wasted a good couple of hours getting more and more frustrated with numbers 3.0
I had the same problem - copy a cell - paste into another cell and it created three vertical cells with the pasted data in the middle
Definitely a problem between CopyPaste Pro - one of the most useful aps on my Mac for the last many years
Once I quit CopyPaste Pro - no problem with pasting in Numbers 3.0
But I use CopyPaste Pro all the time
Have the folks responded to your query?
But I use CopyPaste Pro all the time - hope that it can be sorted sooner rather than later -
i want to create an external video widget with iAd to use in an iBook. I followed the steps and copied the Url and paste it in the Video pop-up menu in the Properties section of the inspector. When i select 'preview' the video doesn't play and the Url that i pasted is gone.
hope someone can help!May have something to do with whether or not the URL can be reached while building your widget. I've got a video on the web. When I enter the URL into the field for the video object and click to another field, the URL is replaced with some text indicating that it is accessing the video then updates itself to displaying just the name of the video file.
It shows just fine in preview and I can see the full path to the video when I export the widget so it should work for you.
Is the video accessible from your Mac while you're laying out your widget?
-Mark -
I used to be able to copy and paste images from the internet into keynote slides and pages. Now when I copy and paste all I get is an empty box. My iskysoft iTube studio has also stopped downloading videos. Is there an extension I need to enable? Any ideas
Try dragging the image to the desktop, then drag the image to the slide you want it on
-
Why can't I copy and paste portions of the Word document that I just had converted from a PDF file on your site?
Hi,
I am moving your posting to Adobe CreatePDF forum.
Hisami -
How can I copy and paste events in the calendar?
Does anyone know how to cut and paste or copy and past events in the calendar? The events happen at different times and on different days so I can't just "repeat". Thanks in advance!
Ignore MJG196 post.
In Calendar, tap the event, tap Edit, then change the Starts date you want the event to move to. -
I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?
How to know character's encoding is ASCII?
-
In iphoto 11 the copy and past buttons to the adjustment tab are gone
In iphoto 11 the copy and past buttons to the adjustment tab are gone. I thought this was a cool feature. They still work when you click alt-c or alt-v. Did anyone notice this?
I've noticed too and I don't like it! I tried to alt-c like you said and when I do that, it just takes me to the crop. It won't allow me to copy the adjustments! Is there any way around this??
-
Is there a way to store a wi-fi password on an ipad and then copy and paste it into the proper space when you want to connect to your password proctected newwor? (the password is 31 random characters)
Yes, if both the Mac and iPad are setup using the same iCloud account, then any notes you enter on the Mac will be synced across to the iPad almost instantly.
Same occurs with the 1Password app I mentioned. If you have both the Mac and iPad versions of it, and setup either iCloud or Dropbox syncing, any passwords entered on the Mac will be synced to the app running on the iPad ready for copying and pasting. This would be the most secure method, but not the cheapest. -
I am trying to make duplicate documents with minor adjustments to each and when I try to copy the artwork from one document and paste it into the new document I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area." Both documents are exactly the same size, res, color format etc. I even tried to drag and drop and get the same error message. Anyone know what I can do to resolve this issue?
Try scaling the view size down to 6% or so and then do a Select All. See if there are objects off the artboard which may be causing this error. Most often you will see this if there were guides dragged from a ruler which were selected by dragging the white arrow and then deleted. This leaves the anchor points at the edge of the work area.
-
I have created two related Blurb books in Lightroom 5 (Volumes 1 and 2) but my balance of page numbers is off. So I'd like to take some pages out of one book (complete with images) and paste them into the other. Is this possible?
Can you zip up a few of your GoPro images, upload them to dropbox.com and post a share link, here, so others can experiment with them, or do you mean this issue is global to all camera models?
Maybe you are looking for
-
Infinity Order Delay - Worried
Hi folks, Hoping someone can advise me on what to do here, because I am starting to stress out a little bit over my current situation. Firstly, my back story. I'm currently a BT Broadband customer, but I am moving to a new home where BT Infinity is
-
Sale value update (SAUFT) field
Hi, I have a problem with sale vaule update in transaction FD33, this is field is getting improperly (SAUFT) updated and not matching with values in SO and open deliveries. I am scheduling the job RVKRED77 (S066 and S067) to update this field and st
-
How to load bookmark tree in initial view setting by pdfmark reference
how to load bookmark tree in initial view setting by pdfmark reference
-
I lost complete power on mynmac pro. Dead. Can you help?
-
Hi there, after playing a while with LR 4 settings i've discovered a pattern with horizontal lines, when pushing the highlights and clarity sliders highlights -100 clarity +100 same thing happens in CS6 Adobe Camera RAW its definatly a bug and i'd li