Need a stop block in my script
Hi Forum,
I have been very useful to learn the vamitul and Jarek previous thread helps...
but still I'm late here and my mind blocked...
my script now to the content of the previous paragraph to find last character ': "if so, it will change all the paragraphs of balls first letter to ceilings...
It is what happens, convert all letters to paragraph ball caps...
So now the stop block is necessary to check, & stop change first bullet uppercase letter if the previous paragraphs end character is not equal to ":
var oDoc = app.activeDocument;
arr = [];
var myNextPara = oDoc.textFrames.everyItem () .getElements ();
for (k = 0; k < myNextPara.length; k ++) {}
myReturn = myNextPara [k].parentStory.paragraphs.firstItem (myNextPara [k] .paragraphs [0])
{if (myReturn.IsValid)}
If (myReturn.bulletsAndNumberingListType! == ListType.BULLET_LIST & &)
myReturn.lines.lastItem (). words.lastItem (). characters.lastItem (.silence) == ":" & & "."
myReturn.paragraphs.nextItem(myNextPara[k].paragraphs[0]).bulletsAndNumberingListType == ListType.BULLET_LIST)
{
changeCase();
}
If {myReturn.lines.lastItem (). words.lastItem (). characters.lastItem (.silence)! == ': ') {}
output
} } }
function changeCase() {}
app.findGrepPreferences.bulletsAndNumberingListType = ListType.BULLET_LIST;
app.findGrepPreferences.findWhat = "^ (\\l);
find = app.documents [0] .findGrep ();
for (i = 0; i < finds.length; i ++) {}
finds [i] = [i] finds .silence .silence [0] .toUpperCase ();
}}
Hello
so, lets include a paraStepper() function:
app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = ":\\s*\r."; // to match 2 paras - end & start var myDoc = app.activeDocument, mFound = myDoc.findGrep(), len = mFound.length, currPara; while (len--) { currPara = mFound[len].paragraphs[0]; if (currPara.bulletsAndNumberingListType != ListType.BULLET_LIST){ currPara = paraStepper(currPara); while (currPara) { currPara.words[0].characters[0].changecase(ChangecaseMode.UPPERCASE); currPara = paraStepper(currPara); } } } function paraStepper (para){ var mRes = false, story = para.parentStory, next = story.paragraphs.nextItem(para); if (next.isValid && next.bulletsAndNumberingListType == ListType.BULLET_LIST) mRes = next; return mRes; } app.findGrepPreferences = app.changeGrepPreferences = null;
Jarek
Tags: InDesign
Similar Questions
-
need help with first vsphere powercli script
Greetings,
Asked me to write a script to iterate over all the virtual machines in a given folder and to stop. The name of the folder is blue (and is deep in several files).
So far, I have:
$svr = Connect-VIServer-Server svr-protocol https-user--password...
$fldr = get-file-server $svr - blue name
I don't know what to do next. I would like to somehow get a picture of the VMS in the Blue folder, and then run:
{foreach ($vm to $vmlist)
Get - VM $vm | Stop-VMGuest
}
How can I do this? Ideally, it should be wrapped in a function that I could pass the name of the file, because I really need to stop the virtual machines in the blue folder and a few others, too.
Any help would be greatly appreciated.
Thank you
-John
You can specify the file on the location of the Get-VM cmdlet parameter.
Something like that
foreach( $vm in (Get-Vm -Location (Get-Folder Blue)) { $vm | Shutdown-VMGuest }
In PowerShell and PowerCLI, there is of course more then a way to get there.
It should work as well
Get-Folder Blue | Get-VM | %{ Shutdown-VMGuest -VM $_ }
____________
Blog: LucD notes
Twitter: lucd22
-
Given that Microsoft does not support WinXP, will be the browser and Mail quit wotking in a future update?
You need not stop the updates. He can't stop posting the same question more than once.
-
Once again! When I play scrabble I want to be able to go to the dictionary and two letters of words when I play the game - these are blocked much to my aggravation! How to stop blocking?
Hmm, this site is this game on?
Is the part of the dictionary of the same page, or a separate page/add on in Firefox, or a completely separate program?
-
I need to stop a download of the query, that I thought a stand-alone application but turns require a higher level (FCPX) as a 'parent' and I do not have that, or I want to buy it.
Motion IS a stand-alone application. It is mainly designed to make effects for Final Cut Pro X, but it is not necessary to have with FCPX nor is it necessary to have FCPX to create projects for other purposes. When you open the query, simply select project of work outside the FCPX motion. You can save regular projects of Motion anywhere on your system.
-
RT vi no need to stop feature?
Just kind of a general question about target RT applications. As I see that we don't need a stop feature programmed on the side of the RT. Appropriate management of errors. But I don't see no matter what scenario why we would stop RT apps? If we change the soft, we can deploy a new. If the system is in need of a judgment, it can be done physically. Since I'm just at the beginning of my learning for LV RT, I asked current practices... Thank you!
My RT screws usually have a stop button on the front panel, so I can't stop them when running in the development environment, and I have not seen a reason to leave the stop button, when I create an application. I don't include any way to stop it without the front panel, however.
-
I get this error several times when I use Lightroom. "Lightroom encountered and error while reading its preview cache and needs to stop smoking" tells me to remove the preview folder.
I have LIghtroom 3 catalog Previews.Irdata; should I remove all three files?
LAR
Simply remove the Previews.LRDATA folder that bears the name in the catalog file, you are trying to open.
-
I was told that Premiere Pro is not compatible with Windows 10. Is this true and if so, I need to stop my subscription NOW. If I think it's the shit please keep my subscription but please send me an email of confirmation that it is compatible with windows 10. I had a hard time with some people emptying my pockets trying to sell me different windows on different hard drives in the same computer, which until now has completely messed up my (both high-end) computer.
Please help me as much as you can, but especially with programs that were in the windows all the time until recently Windows 10.
A craving for believer,
JOe @.
-
"Lightroom encountered and error while reading its preview cache and needs to stop smoking.
Earlier today when you import a session the computer froze. After manually shut down and restart I get this error every time I open LR, "Lightroom encountered and error during playback of sound preview cache and need to stop smoking" and the application does not open. He said LR would try and correct this error the next time I opened it, but the error remains. Help please!
Rename the folder "Lightroom 5 catalog Previews.lrdata" to "Lightroom 5 catalog Previews.lrdata.old"
Thank you
~ Mohit
-
I get a message saying Lightroom met an erorr when reading the preview cache and need to stop smoking. Then told that Lightroom will try to solve the problem the next time it starts. Never tried to uninstall and reinstall but no good.
Sound familiar to anyone?
Hello
Please go to the save location of the Lightroom Catalog and here please delete the Lightroom Catalog Previews.lrdata folder.
Now please open Lightroom and check if it works.
Please let us know if it helps.
Kind regards
Tanuj Sandal
-
I get this error every time I open LR, "Lightroom encountered and error during playback of sound preview cache and need to stop smoking" and the application does not open. He said LR would try and correct this error the next time I opened it, but the error remains. I tried uninstalled and installed the application and the error remains. I use Windows 8.
Manually delete the cache of the preview of your user folder.
Mylenium
-
Lightroom starts but then I get "error reading the preview cache. LR needs to stop smoking. Will try next time it starts. I restart from scratch and the same thing happens. Help please!
In the same folder that your catalog file is stored in, there is a subfolder whose name ends with Previews.LRDATA. Delete this subfolder whose name ends with Previews.LRDATA. Do not remove anything else.
-
Lightroom has encountered an error when reading the preview cache and needs to stop smoking.
What can I do to make this work?
Restart Lightroom
-
Hi all
My computer crashed with open lightroom since the restart, I get a msg "LR encounted an error while reading its preview cache and needs to stop smoking.
I would be grateful for any suggestion
Thank you very much
In the same folder that your catalog file is a subfolder whose name ends with Previews.LRDATA. Delete this subfolder. Do not remove your catalog file (whose name ends in. LRCAT)
-
LR has encountered an error when reading the preview cache and needs to stop smoking.
I have the trial version of Lightroom 30 days. I was able to use it for a week, but the last weeks of 1,5 to 2, it was locked up and that gives this error message. How to solve the problem? And how to reset the free 30 day trial? I wish I had the time using the product before deciding on the annual contract.
"LR has encountered an error when reading the preview cache and needs to stop smoking. Lightroom will attempt to solve this problem, the next time it starts. »
Thank you.
Delete the cache of the overview of the Lightroom folder in your pictures folder if you used the default location. It has the extension .lrdata.
You cannot reset the trial period.
Maybe you are looking for
-
Problem of Ram MacPro 1.1 a1186
I just upgraded my old mac pro with 16 GB of RAM FB 1.1 a1186 but only 8 GB are recognized. I tried different combinations in two editing maps, but the result is always the same 8 gb. Aries is a Hynix 8 GB (2x4gb) 240-pin DDR2-667 PC2-5300F ECC fully
-
Please help: billing is problem/unable to install free applications?
I bought two apps a few days ago and never received a receipt for those bought as I had received with others. I don't know if this is all connected or relevant for other information before but when I try to install any application, even if it's free,
-
Update cumulative security for IE 8 for windows vista (KB978207)
After you have installed the enemy of update cumulative security IE 8 for windows vista (KB978207) I found that my history of the internet, in the Favorites tab, for the past 2 weeks was erased someone ' one can confirm this has happened as a result
-
My computer with Vista goes into sleep mode and then restarts; How to stay asleep?
-
Recovery XP system with new hardware
Hello. I have problems with a virus on my HP Media Center m1070n and I think to do a system recovery to get rid of him. It has been really stubborn and nothing I've tried has been able to kill him. I would go ahead and do the system recovery, but