changeGrep - problem with the change of properties

Hello world!

I'm trying to understand what is wrong with the mechanism of find/replace in this code example:

  1. variables containing the properties
  2. var strFindFormat = 'pointSize = 10;
  3. var strChangeFormat = 'pointSize = 15;
  4. Find/Replace window cleaning
  5. app.findGrepPreferences = app.changeGrepPreferences = null;
  6. app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
  7. Seting find/replace dialog box
  8. var findPref = "app.findGrepPreferences" + strFindFormat + ";". " » ;
  9. var changePref = "app.changeGrepPreferences" + strChangeFormat + ";". " » ;
  10. find/replace operation
  11. app.activeDocument.changeGrep ();
  12. Find/Replace window cleaning
  13. app.findGrepPreferences = app.changeGrepPreferences = null;
  14. app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

When I'm running script he yells to me that "error number: 1. error string: changeGrep.» Line 14 "etc.

If indsted the variables findPref and changePref, I do just "app.findGrepPreferences.pointSize = 10;" and "app.chageGrepPreferences.pointSize = 15;" -It works very well.

But I need those variables to pass the argument of the function, properties will be set in another passage.

No idea what is the problem? Where am I wrong?

You could get it to work like this, replace your lines 10 and 11 with this:

var findPref = eval("app.findGrepPreferences." + strFindFormat + ";");
var changePref = eval("app.changeGrepPreferences." + strChangeFormat + ";");

But maybe a better way is an approach like this:

var findProperties = {pointSize: 10};
. . .
. . .
app.findGrepPreferences.properties = findProperties;

Note that your lines 7 and 18 are unnecessary: they do the same thing that lines 6 and 17, respectively.

Peter

Tags: InDesign

Similar Questions

  • Problem with the change in value of listbox event

    Hello

    I have a problem with the help of Listbox value change event. The code that I have attached is a simplified version of the largest program, but the problem is the same. One of the loops of Nonna is responsible for handlig occurring events ant the other is responsible for the execution of the program. In the project of oryginal I use a listbox control to determine which plots graphic display of a waveform is visible (first position of the listbox-> only plot first visible etc.). In the attached vi, I just show the current value of the listbox control. The problem is the event runs only once and then the program crashes. I want to be able to change the value of the listbox work both at idle and in State of a program, but when I put the structure of the event in both States, he does not. I'd be very grateful if someone smarter than me could tell me where I made my mistake. I want my program to be able to manage the keys and listbox events in States (slow down and knit) program.

    You have two structures of event in two cases different from the structure of the case, and both are tuned to listbox events has changed. Because only once can be triggered at any time, the VI crashes (lock events the front panel (default) until the event can complement).

    You must use a unique event structure managing all events.

    The overall program architecture looks like inside-out for me.

    For the buttosn, you must use action lock (switch not release!) and use the value changed events.

  • Problem with the change of payment details

    Hello

    I tried many times to update my credit card payment information, but I can't change the 'old'.

    I still got the message "there is a problem with the information of card entered here. Please enter another card or contact your bank. »

    The card is newly issued and is on the name of my company. I paid her for other accounts online without a hitch, then there is no problem on my side.

    I use a Mac and Google Chrome.

    Is it possible for me to provide details by e-mail and make the change?

    I await your response and thank you in advance,

    Cristina

    This is an open forum, not Adobe support... Click below to contact Adobe staff for help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Problem with the change of location of the folder on the desktop (Windows 7)

    Hi all, I have windows 7 Home Premium and changed my location on the desktop of \desktop c:\users\ (user) on my drive d: since my c: drive was getting full (for that I click with the right button on the back of my office and I changed my location).  However, the system has simply dumped all my files and Office files in the root directory d:\, without creating a new folder on the desktop, which is what I thought was going to happen.

    To resolve this problem, I want to transfer all my files + folders office to a dedicated folder d:\desktop but found I can't since now there is now no desktop as folder! (catch-22).  I entered the \links c:\users\ (user) file and changed the objective of the Office in d:\desktop instead of d:\, but it has no effect! My office target is always the root directory. How can I change this?  I hope you can help!  David

    Go to libraries, do a right click on desktop, cut, and then paste it on the other drive. The wonders of windows 7 will automatically record anything he puts on the desktop for now :)

  • Problem with the change of a 'State' the substitution of one break of the chronology of the objects

    Here is my setup: I have a single slide for learning select 9 melodies 'text buttons' to view 9 different definitions.  To do this, I set myself to each buttons to change the "State" of the original image for the introduction of a 'legend of text' containing the definition of that label of buttons.  I also three navigation buttons (output, back and next; button_19 _20 & _21) with breaks built into the end of the timeline. coinciding with the end of the audio narration for this slide.

    Here's my problem: the calendar runs and stops as it should until the learner chooses one of the 'text' buttons after that the timeline is suspended; how it seems to send a command to "continue" and substitutes at the break, and brings the learner to the next slide.

    This has something to do with the function "States"?  I used to do exactly the same thing in Cap 7 with stocks advanced without any problem.

    Thanks in advance for the help.

    v/r

    Jay

    stateTimeline.JPG

    If it's 9 Captivate, locate the box continue a project of play in the Actions section and deselect buttons for each.

  • Problem with the change of font size in a legend

    With the help of Acrobot X Pro: when you use drawing annotations and add text in a caption box, how can I change the size of the font of the text in the caption box? Anyone know?

    Double-click inside the legend (so that you can select the text).

    Press CTRL + E (this will open the PROPERTIES bar).

    The PROPERTIES bar can be turned on in the menus by: VIEW-> SHOW / HIDE-> ITEMS-> PROPERTIES BAR TOOLBAR.

    Here, you can change ANY aspect of the fonts in the legends.

    I haven't figured out yet how to make my changes to the DEFAULT value for the outgoing call.  I'm still working on that!

  • Problems with the optical flares properties

    So I have a script that goes through various for loops and turns to special effects applied to a layer and gets access to the properties and their values (for example the Position XY & -10-9). My script does a loop on the number of properties of the effects to each of them and its value. However, in this case during the extraction of these data, the script stops when it gets to the placement Mode. My only guess is that it has something to do with him having no not a stopwatch? Is there a way to access and get its name and its value? Thank you!

    9832023fbf.png

    This property has no value, and if you try to access the value in any way, it will generate an error. You look at the section of the script on PropertyValueTypes. You will have to jump anything with a type of NO_VALUE or CUSTOM_VALUE and a few others need special treatment.

    Dan

  • Hello! I have a problem with the change of the method of payment. PMT_000008 error, when I'm trying to change the method of payment. Help, please!

    PMT_000008 error, when I'm trying to change the method of payment. Help, please! Cookies are cleaned, tried different browsers. It does not help.

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Problem with the change of deferred task

    Hello

    Each user IDM has a deferred task as shown below. The requirement is to change the value "Date" to set the time as 23:59:59.00Z.
    Currently, different users have different times set for them. All must be same as above. Please help me in this a faster way as there are has more than 5K users.

    < object name = "WF - contractor expire" >
    < attribute name = 'value' = 'true' / >
    < attribute name = ' date' >
    < date > 2011-04-14T 06: 00:00.000Z < / Date >
    < / attribute >
    < attribute name = "executeOnce" value = "true" / >
    < attribute name = "owner" value = "C670635" / >
    < attribute name = "subject" value = "ProxyAdmin" / >
    < attribute name = value 'task' = "WF - contractor expire" / >
    < / object >

    Thank you
    Santoshanand

    Hi Santosh,

    The setHoursMinutes rule comes with Identity Manager. Search the sample/baseline.xml file

  • Error: "Canoe Photo window Viewer save the changes to this picture because there is a problem with the property of photo file" when trying to upload photos from the iPhone to the Windows Photo Viewer.

    Original title: saving photos and videos, common sense?

    JW why I can't save a picture to the top of the right way in my windows photo viewer and Media Player (same for video too) so when I download my pictures frim my iphone on the computer a few photos have been taken vertically, and when I go to put the image a gardener would come saying ' canoe photo window Viewer save the changes to this picture because there is a problem with the file of. properties of photos? What can I do to fix this?

    JW why I can't save a picture to the top of the right way in my windows photo viewer and Media Player (same for video too) so when I download my pictures frim my iphone on the computer a few photos have been taken vertically, and when I go to put the image a gardener would come saying ' canoe photo window Viewer save the changes to this picture because there is a problem with the file of. properties of photos? What can I do to fix this?

    =============================================
    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • NO - problem with the service

    I am from INDIA.

    I bought an iPhone 6 s new mobile Hong Kong a licensed salesperson (mobile fortress).

    When I bring to the India and put on my country sim (vodafone) to my laptop, everything works, but the network does not connect.

    "In settings > about I see vodafone, but when I see the carrier" is not connected, I tried many solutions online.

    I tried:

    1. all parameters (network... so on) and the software is up to date.

    2 tried selecting the network, but to the carrier, it does not show the available network.

    3. I tried the complete reset of the phone 2-3 times.

    4. I tried to change the apple ID.

    I tried many things, my phone works, but could not solve the network. Cannot make calls or find networks in my I phone.

    Someone can help me. When I went to ask local sales assistance, that's the problem with the change in the country, and they said that it will be free of charge on 18000INR.

    Please someone help me.

    Thanks in advance.

    Hi a.a,.

    Welcome to the communities of Apple Support! I'm sorry to hear that you experience these symptoms with your new iPhone 6 s. I'm a bit ambiguous on your specific configuration or what you see, but you can check that the phone is not locked on the original support (if the phone was sold to any kind of discounts or subsidized rate, it is most likely locked carrier). You can find the information described in the following article useful:

    How to unlock your iPhone for use with another carrier - Apple Support

    You may also be aware that different iPhone models are sold in different regions and countries and can support only specific carriers in these regions, as shown here:

    iPhone - country view with LTE - Apple networks support

    Concerning

  • How to do this: Photoviewer, Windows cannot save changes to the image due to a problem with the properties of the file!

    Hi, I'm trying to post a photo, but whenever I have try rotation to the right, it says something like: can't save changes to the image due to a problem with the properties of the file. My laptop is MS, but the photos were taken on the Iphone. How to do this?

    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • Why can't I save a file changed due to problems with the properties?

    Vista Home Premium 64-bit

    I sent myself a JPG file, taken by a camera in the email.

    I backed up, & then tried to turn it using Windows Photo Gallery.

    He says: 'cannot save this image due to a problem with the properties of the file.'.

    Sometimes (once, so far), it then says 'Changes to the labels, legend, side, or date taken could not be saved in this file.'.

    When I try the same thing in Windows Explorer, it says "you cannot rotate this image.  The file may be used or open in another program or file or folder can be read-onlly. ».

    Properties file shows the file read-only.

    Unchecking that and apply or OK has no effect.

    Ditto for the folder.

    But looking around, I see that (sometimes (?)) other records are also marked read-only, but are not their files.

    When I produce-> properties-> details-> ' properties delete and personal information "->" create a copy with all deleted properties ", he says: 'an error occurred when writing the property 'Altitude' in the file <....>.'.

    I can't find another way to try to remove all the ((maybe) offend them) properties.

    Hello PMH232!

    Thanks for the return of the response.  Below, I have included a few steps to try.  When you fill out these test in Windows Explorer and see if you can rotate the images.

    1. click on the start menu.
    2. click on computer.
    3. right click on the drive that gives you trouble.
    4. Select Properties.
    5. click on the Security tab.
    6. click on the Edit button where it says "to change permissions, click on change."
    7. in the "group or user names", click on the user you want to change.

    8. in the area 'Permissions for the users', click the checkbox to allow full control.
    9. click on ok.

    Please let us know status.

  • I've had dramas with my photos because I got my new iphone 4s in saying that there is a problem with the properties and I can't change the format of images

    Hello

    I've had dramas with my photos because I got my new iphone 4s in saying that there is a problem with the properties and I can't change the format of images (ie the rotating EGTC)

    Now, I see the image preview and it disappears to the flower, so I did not see one of my photos

    Some would like TO help on this im so not good with this kind of thing.

    Appreciate it in advance

    Let

    Hello

    • When you change the format of images of?
    • What is Windows Explorer or Itunes?

    Try the TV activation

    Enabled and disable the Option 'show window previews (thumbnails) '.

    a. right click on the taskbar.

    b. Select Properties.

    c. check show window previews (thumbnails) "Option. .

  • My laptop is windows 7 and with most of DVD it says that there is a problem with the digital copy. I'm also having trouble changing the region

    the exact message is: "windows media player cannot play this DVD because there is a problem with the digital copy between your DVD drive decoder and video card protection. Try to install a driver available for your video card. When I click close it comes with this another message saying that my DVD system is set to the region one and I need to change it to region 2. I have change for the region, but he said: "Windows Media Player cannot play the DVD because the disc prohibits playback in your region of the world. You must obtain a disc that is intended for your geographic region. ». I don't know what to do.

    There is a chance that the free VLC Media Player
    would be to read your DVD without changing the region code.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    VLC Media Player
    http://www.filehippo.com/download_vlc/
    (works on XP/Vista/7)

Maybe you are looking for

  • Adware

    I recently got some adware with a download from cnet and did my best to uninstall (including an older version of FF, which was installed in the car). Subsequently, when you restart Firefox, the ads have disappeared, but I noticed a few icons that Fla

  • Bluescreens and satellite L670-12J slow start

    HelloI have a new laptop and the ends of the return policy 27 so I need quick help here.Got a new laptop from Amazon nearly a month ago.Toshiba Satellite L670-12J with 64-bit Windows. Processor i5, 4 GB memory and 500 GB hard drive. Since I got it, e

  • HP LaserJet MFP M127fn Pro: Erro scanner 13

    OLA pessoal! Tenho uma impressora HP LaserJet MFP M127fn Pro than esta com o artifacts of calibrando e nao dessa messagem, quando fui driver o Software dela, no message beyond again appear Erro scanner 13. Alguem pode me help please!

  • Cannot save with eFax on printer eStation C510a

    When I try to record with eFax on my eStation C510a printer, I get the message "unable to get a fax number.  HP support has not been able to find a solution to this problem. Does anyone else have this problem?  What is the solution?

  • keyboard on laptop settings problem

    I use an Hp laptop that has windows vista. The problem is when I try to type @ actually it shows 'and if I type' it shows just the opposite that is @. now, this problem is 2 years. I became use to it. but this time, when I go on some websites actuall