Problem with the path of the current script and applescript

Work in cs3 here

Here's what I'm trying to achieve. I wrote a script in javascript, but I need the support of shell for some features. I can only run applescript shell so I'm able to run the shell script quite easily to applescript, as long as I have hard the path of the code in the applescript.

It stops working when I get the activeScript path and then try and pass it in applescript.

Here's what works

< code >

"myScript = 'do shell script \"/users/my_username/myScript.sh\' &------"------" & point 1 of arguments and return. "

myParams = ['param1'];

var result is doScript (myScript, ScriptLanguage.applescriptLanguage, myParams);.

< code >

It works fine, however I would like to have the shell script live in the same folder as the scripts Panel, so it is easier for others to install

So here's what I tried to do

< code >

myScript = app.activeScript var;

var thisPath = myScript.path + "/ myShellScript.sh";

"' myScript =" do shell script------"" + thisPath + "------" &------"------" & point 1 arguments and return. "

myParams = ['param1'];

var result is doScript (myScript, ScriptLanguage.applescriptLanguage, myParams);.

< code >

It produced an error that says: Indesign can't find the file.

So I tried to escape all spaces with a replacement of the chain, as follows:

< code >

scriptPath var = "\" "+ thisPath.replace(/%20/g,"%5C%5C%20") +" "-" '; "

< code >

It still does not work. I also tried to make an object file

< code >

scriptPath var = File (thisPath);

< code >

Couple other things I've tried include POSIX path in applescript, removing the additional quotes, enveloping the path in quotes.

It did not work also. Any help would be greatly appreciated that I do not understand what I am doing wrong.

UPDATE:

Just after posting, I have corrected this problem. For anyone who wants to know, that's what I did

scriptPath var = ""' + thisPath.replace(/%20/g,"\\\") "+ '" '; "

Tags: InDesign

Similar Questions

  • There was a problem with the current system. Please try again later. If the problem persists, contact customer service.

    There was a problem with the current system. Please try again later. If the problem persists, contact customer service.

    Why?

    Please tell us what Adobe application you are trying to download. Please try creative cloud install app - https://helpx.adobe.com/creative-cloud/help/install-apps.html

  • Equium L10: Problem with the main battery and battery RTC

    Hello

    I have the Toshiba Equium L10 and it is about 14 months old and I have problems with the battery and how much time it takes after a full charge. I also have problems with the RTC battery and an ERROR 0271: check date and time settings message when I turn on the laptop.

    Regarding the battery, I can fully charge it upward in about 3 hours, but when I start to use it, apparently in the last few hours around one and a half or so and then it needs to be recharged. I can have down for about 40 minutes and then turn it off and come back later or in a day or two. How long should I expect from a fully charged battery?

    About the batttery RTC, it really becomes a pain and I only started to get the message of the ERROR 0271 start-up, in recent weeks. I can charge the battery pack and then leave for a few days, but when I turn it on, I get the message ERROR 0271 on the date and time incorrect. Surely after a full charge, the RTC battery should last longer than a few days?

    The manual says that if the RTC battery is exhausted or becomes weak, you must charge the battery of the CCF for 24 hours, in a different part of this manual indicates between 24 and 48 hours, but how can load you for long when the sections concerning the charging battery pack status after charging the battery you unplug the power adapter because leaving connected will shorten the life expectancy of the Battery Pack. So, how we can charge the battery of the CCF for 24 to 48 hours if we shouldn't leave the AC adapter plugged in once the battery is charged - which is nearly three hours. Suggestions about these problems would be appreciated.

    Besides we all know that it is easy to change the CMOS/RTC battery in your desktop base unit, but is it easy to change in a Toshiba Equium L10?

    Concerning

    Brave0

    Hi Brave0,

    The normal recommendation for the CMOS (RTC) battery is to leave the laptop connected to the power supply at least 12 hours when the main battery is fully charged. The charging circuit is going to hijack the current to the load automatically RTC battery and no current will be forwarded to your main battery.

    Recommendation do not leave the power adapter is plugged in the main battery is fully charged is really only applicable to older laptops that used no batteries Li - ion and therefore they had to be completely discharged before recharging to avoid any effect 'memory' of the battery.

    With modern Li-ion batteries, it is quite safe to leave the battery when fully charged and still power the laptop from the AC adapter. The charging circuit will pass all the battery charge if it is fully charged.

    Kind regards

  • problem with the Finder - files and folders displaying incorrectly

    After acquiring a new iMac, I noticed a problem with the Finder - files and folders are displayed wrong (see table).

    This is what happens always after the files have been transferred from one folder to another. I was reminded of my days of using Mac OS in the 1980s when automatic setting of files was not so "automatic." I use Mac OS for decades and I don't remember the last time I had to think about GUI problems like that.

    Other problems in the graphical display of files and folders were introduced, such as when you have hundreds of files in a single folder, you end up deleting about 30 to 40 of them say in a particular section, and you end up with gaps of the ChartSpace where files used to be, that is the remaining files automatically rearrange themselves (fill in these gaps) - never. A week later, you open the folder, and the gap of GUI is still there.

    I decided to do a clean install of the operating system but nothing works.

    Is there some setting in Prefs I'm missing?

    Hi there highland99,

    Looks like your folder icons are not accommodating themselves automatically you plan to do. To me, this indicates that you have organize by the None value in the view menu. You can change the way files and folders are prepared automatically by clicking on view > reorganize by and selecting how you would like that fixed.

    Thank you for using communities of Apple Support.

  • I started having problems with the wireless mouse and the carpet of my laptop - Lenovo ThinkPad T420 mouse.

    Original title: right click on the mouse itself activating

    I borrowed a USB to a person at work and I started having problems with the wireless mouse and the carpet of my laptop - Lenovo ThinkPad T420 mouse. The left click of two devices works normally, however, sometimes she does not respond to clicks and it takes a few seconds to work. The left button was constantly starts to turn on, as if he was stuck. After that I hit Alt + Tab and modify windows it stops for a few moments and starts at a later date. I havo not found a specific condition or a combination of keys that may trigger the fault.

    I read a few posts on discussion forums, but all say that it could be a hardware problem, which I think is not, because both devices have the same problem and I'm sure it all started with the insertion of the borrowed memory stick. I scanned the readers to help Symantec's EndPoint Protection and installed Microsoft Security Essentials and performed a full scan, but found nothing. I even restored the system, but the problem remains.

    Should I get a different antivirus? How can I find the cause so I can find a better targeted solution?

    Try to install the drivers from this link and check.

    http://support.Lenovo.com/en_US/research/hints-or-tips/detail.page?&LegacyDocID=MIGR-77167

  • I get the message: Photoshop has encountered a problem with the display driver and has temporarily disabled GPU enhancements. Visit the Web site of the manufacturer of the video card for the latest version of the software.

    Photoshop has been giving me the warning:

    Photoshop has encountered a problem with the display driver and has temporarily disabled GPU enhancements. Visit the Web site of the manufacturer of the video card for the latest version of the software.

    Also other programs are affected.  I suspect a recent download of Adobe.  Can anyone HELP.

    No, it has nothing to do with updates of Adobe. There is a problem with your video card driver.

    Go directly to the Web site of the manufacturer of the GPU for updates (not Microsoft, not a System Builder).

  • How to solve the problem with the wacom tablet and the polygonal lasso tool. It does not work with a pen.

    How to solve the problem with the wacom tablet and the polygonal lasso tool. It does not work with a pen. I have install windows 10 and fresh, new drivers for wacom bamboo, could he makes problems or there is a problem of photoshop?

    It should do.  You use one of the buttons of pen maybe?  Just touching wheels with the pen with no buttons or modifier keys.  Press ENTER to close the selection.

    Personally I never use the lasso, Polygonal, but rather just the Lasso tool by using the ALT (Opt) to operate the Polygonal tool.  I also use the mouse instead of the Tablet for the selection of cutting edge.  It is a little too uncertain where the point will go when hovering the stylus above the image.

  • Problems with the radial tool and the gradient filter tool.

    I have suddenly problems with the radial tool and the tool filter degraded.  They are turning to my red while selection that the assets and not with the results of the any adjustments.  It is a new issue and out now where

    Does that help? Note that the tool must be active to see the check box.

    In addition, another reason, that you do not see it could be that the toolbar is not displayed. The toolbar display switch is to press the letter T.

  • Problem with the clone stamp and Healing brush, as soon as I use them I get a second image duplicated on top that move with the tool

    Problem with the clone stamp and Healing brush, as soon as I use them I get a second image duplicated on top that move with the tool

    You're apparently talking about Photoshop, so I'll pass this on Photoshop beginners forum.

  • Problem with the Update Script

    I'm trying to update a column in the database with the following script, but still get errors on the ORA-00904: "CUSTOMER_CONTACT_NRD." "" "" ACTIVE ": identifier not valid, even thought it must be fair.
    In the end, I want to update the table like that, but first test it on a single customer.
    Are the media may not play directly, or am I missing something else?

    Update v_contact v1
    set
    (v1.inactive_contact) = - 1
    where (v1.cust_id =
    customer_contact_nrd.customer_id and v1.contact_no =
    customer_contact_nrd.contact_no and customer_contact_nrd.active = n
    and v1.cust_id = 106586)

    Thank you for your help.

    Published by: mcramer on October 26, 2009 12:38

    Try something like this...

    Update v_contract v1
    Set v1.inactive_contact = - 1
    where v1.cust_id in
    (by selecting v1.cust_id in customer_contact_nrd v3
    where v1.cust_id = v3.customer_id
    and v1.contact_no = v3.contact_no
    and v3.active = ' n and v1.cust_id = 106586)

    or read this...
    http://www.jlcomp.demon.co.UK/FAQ/lost_update.html

  • Problem with the Login user and scroll form

    Hi all, I have a problem with the form for the user to login to my page.

    There is a connection user transaction and the cursor automatically appears in the tefxfield of connection, which causes the page to scroll automatically, so the banner is completely displayed.

    I tried with the blur() and javascript function, but it simply doesn't. Anyone know a solution to this problem?

    Just came across the following in the file 'includes/tng/scripts/FormValidation.js ': code snippet

    if (typeof KT_FVO['kt_login_user']!='undefined') {
                   var user_name_ctrl = document.getElementById("kt_login_user");
                   if (user_name_ctrl) {
                        user_name_ctrl.focus();
                   }
              }
         }
    

    If I understand correctly, here´s where ADDT´s "kt_login_user" of field entry will focus on loading the page, so I think basic is enough to disable the line...

    user_name_ctrl. Focus();

    .. .to add a first comment in javascript:

    user_name_ctrl. Focus();

    See you soon,.

    Günter

  • I had a few problems with the search engines and history

    My default search warning back to Yahoo after a reset on my computer. Close Firefox keep one to change but by restarting the computer, it takes.

    I can't open the sidebar history. The option "view the history of your" opens its tab fine (the drop-down menu that says 'Show History Sidebar', 'clear recent history... ("ect.). But, when you click on the "Show History Sidebar", nothing comes. Can I use the "Show history" option, but the sidebar does not open for some reason any.

    I just finished with a complete analysis of the Microsoft Safety Scanner and it said not that there is anything wrong. I have not reset the computer again to see if something has changed although after the factory reset (see the 2nd paragraph) it seems returned to Yahoo (search engine he kept going to happen).

    I open the history tab in the menu of the toolbar, and everything seems fine here. I also had him always use private off all first browsing mode. After activating the option clear history when Firefox closes, I ended up having to reset to factory settings (things he saves were saved isn't really a problem) that doesn't seem to fix the problem with the sidebar of history not to come.

  • Hello there is a problem with the iphone 6 and you do not want to connect to the Apple Store

    Hello there is a problem with the iphone 6 in more you won't connect to the Apple Store.

    Buenas tardes,

    Try a forced reboot. Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. Ignore the "Slide to power off" text if it rises. You won't lose anything.

    Then sign out of the iTunes Store and reconnect.

  • problems with the internet connectivity and card # 2 microsoft tun miniport

    Hi, I have problems to connect to the internet and my laptop tells me them a problem with the modem / router. However, another laptop computer connected to the modem/router even works very well. in the Device Manager was an exclamation mark beside "teredo tunneling pseudo interface 10. then it disappeared and I found myself with an error with «#2 microsoft Tun miniport map» now his party in error teredo. I still only have a local internet connection i.e. no internet. not really have a lot of knowledge when it comes to computers. any help would be really appreciated.

    Hello

    You can try the steps in the similar thread to the next with a possible fix:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/Teredo-tunneling-pseudo-interface-this-device/757db042-c91e-464c-B963-c1f442fdf925?page=1

  • Problems with the Precision M4400 and the graphic card Nvidia quadro 770M

    I have a problem with my Precision M4400 and Nvidia Quadro 770 M. After I installed Windows 7 64 bit, I have problems with the graphics card. I get a blue screen or graphic errors. I tried several versions of the driver. In the Nvidia forum had this problem even more. Here, they told me that only a BIOS update for the graphics card to solve the problem. Update the BIOS, but I should refer by DELL. So my question is this problem with Dell is also known, and there is already an update of the BIOS to the Quadro 770 M?

    Hi all

    I have the solution by chance. I was looking for the latest drivers GeForce for Windows 7 x 64 and I read the accompanying note: http://fr.download.nvidia.com/Windows/337.88/337.88-win8-win7-notebook-release-notes.pdf
    On page 17, you can read the following note to fix: "[GeForce FX 770 M] [portable]: blocking of the blue screen occurs after Windows starts."

    Of course, GeForce FX 770 M does not exist (and never was), and it should be Quadro FX 770 M. I can bet that nVidia has corrected this famous BSOD problem in the wrong driver because always there is nothing about any "Quadro FX 770 M - fix" in the note accompanying the latest Quadro (340.52) driver.

    You try the GeForce driver above, but to install it, you may need to download an INF file modified with the addition of the ID of Quadro FX 770 M (= "NVIDIA_DEV.065C ="NVIDIA Quadro FX 770 M"). Try without the first modified INF file because the Quadro FX 770 M is listed as a compatible chip in the version of the driver GeForce 337.88 note...

    I'll try that, even though I am completely sastified with the latest driver for Quadro (feasible) (285.62) without disable Powermizer. I did not try the latest Quadro drivers again (to be honest).

    Late me know please.

Maybe you are looking for

  • Isolate Itunes free music downloads

    Home PC, Acer, Windows 7, Intel Core 650 processor, 1 TB, How to insulate the downloads of free music files provided by itunes... from my account/playlists itunes? So I don't accidentally delete it from my collection.

  • Sell on eBay - my pages have been condensed to the screen. How can I make it back in full screen?

    My ebay pages have been condensed - they are about 1/2 the normal size and they are too small to read. This has happened Each time Firefox opened is about 3 weeks.

  • Menu of time performing - table close round

    Hi all I have a small question on the menus of the run-time behavior: I have a configuration of structure of event to detect the Panel close? event to handle some stop code before my application closes. I wonder who the selections of run menu trigger

  • LaserJet 6L: Laser Jet 6L and Windows 10

    Trying to solve a problem for a friend, that the printer was working well on Windows 7 until the upgrade of Windows 10. Despite all the standard approaches by train the printer still does not seem to recognize the PC. Suspect it may need drivers for

  • I want to download photoshop "CS".

    I want to download photoshop 'CS' for my mac legally is it possible? I got it before the original cd, but he has since taken a beating and is no longer on my possession or a mac. I have my soap operas because I sign up. can anyone help?