JavaScript and Extendedscript - newbie help functions

I'm new to Photoshop scripting world and beginning by a basic script to collect the folder names and then remove the access path. When I use the code below ESTK throws an error that laboratories [i] .substring is not a function. I know this isn't... but this is valid javascript. Need an explanation please.

Thank you

#target photoshop

Tab sizes

Drop Lab

var labSets = file ('~ / Desktop/model Hub /');

var labSets = labSets.getFiles ();

Create a table containing the names of file names lab

laboratories of var = labSets;

for (i = 0; i < labs.length; i ++) {}

v var = labs[i].substring(labs[i].lastIndexOf("/")+1);

}

Labs [i] is an object file or folder. The strings have a substring method. You can convert the file/folder to a string, but I think it's best if you use a file/folder porperty. Something like that...

#target photoshop

//Sizes Tab

//Lab Drop-down menu

var labSets = Folder('~/Desktop/Template Hub/');

var labSets = labSets.getFiles();// this get all file and folders

//Create Array containing Lab names from folder names
var labs = [];

for (i=0; i 
         

Tags: Photoshop

Similar Questions

  • Help. Window opens on the Firefox browser that says Application JavaScript and according to what he says 101. There is an OK bitton. When I click on OK, place just the window again and again.

    Help. Window opens on the Firefox browser that says Application JavaScript and according to what he says 101. There is an OK bitton. When I click on OK, place back the window. Then once again hit OK and box disappears when I move my mouse the same Monte box again. I even called Apple support. They tried things; got me well maybe some ting setbold textin Firefox preferences. It started right after the installation of update of Mac at the close. Any help, please. My browser is completely blocked (obviously) in this loop! [email protected] jason

    Hello

    Please check if this happens in Safe Mode.

    Extensions of the issues

    Troubleshooting Extensions and themes

    Uninstalling the modules

    Uninstalling toolbars

    Safe mode disables the installed Extensionsand themes (appearance) in (Alt + T) Tools > Add-ons. Hardware acceleration is also temporarily disabled - manual setting is Tools > Options > Advanced > general > use hardware acceleration when available. Options > Advanced. All these parameters/additional custom modules can also be individually or collectively disabled/enabled/changed to normal mode of Firefox to check if an extension, theme or hardware acceleration is causing issues.

  • I was told that Web Developer had buttons that enabled me to disable JavaScript and CSS (Cascading Style Sheets), but I do not see these keys on Firefox version 10. How can I access these two functions? So how can I activate JavaScript later? Thank you.

    I need the way to points that allows to disable JavaScript (and then to turn it on) and allows to turn off CSS.

    These access points do not appear on the Web Developer (v.10)

    Thank you.

    Are you sure that whoever told you that was not referring to the add-on Web Developer?

    https://addons.Mozilla.org/en-us/Firefox/addon/Web-Developer/?src=SS

    It has features allowing disabling of Javascript and style sheets.

  • JavaScript, script working almost help returns something weird

    Hi scripters,.

    I work almost Javascript Variable to inDesign who kindly gave to me (see below) I know very very little JavaScript and I almost got this job I just need help.

    The script returns the size of the document and the unit of measurement to a variable, but my goal was to get the unit of measure to be abbreviated (IE; Mm mm)

    It works, but it also returns a weird thing in front of mm (NaN).

    Screen Shot 2016-01-04 at 12.54.43.png

    function toTitleCase(s) {  
        return s.toLowerCase().replace(/\b\w/g, function () {return arguments[0].toUpperCase()});
    
    function getPageDimentions(page){  
        var width, height, bounds, units, abbr, decPlaces;  
        // function presumes that normal pages  
        // i.e. same vertical and horizontal and no page shape transformations  
        decPlaces = 3;  
        units = toTitleCase(page.parent.parent.viewPreferences.horizontalMeasurementUnits.toString()); // If you forgot to include the toTitleCase function then remove the method  
        abbr = UnitValue(units);
        bounds = page.bounds;  
        height = bounds[2] - bounds[0];  
        height = myRound(height, decPlaces);  
        width = bounds[3] - bounds[1];  
        width = myRound(width, decPlaces);     
        return height + " x " + width + " " + abbr 
    

    Any help would be greatly appreciated!

    Scott

    Hi Scott,.

    you have not provided the script. And some closing hooks are missing as well.

    However, the point is, that you use:

    abbr = UnitValue(units);
    

    Instead of:

    abbr = UnitValue(units).type;
    

    like Marc suggested this other thread.

    Uwe

  • JavaScript exception: error calling the function switch: TypeError: undefined is not an object (evaluation "jQuery.browser.msie") - HOW I ME get RID OF THIS

    Screen Shot 2015-12-12 at 16.54.47.pngScreen Shot 2015-12-12 at 17.01.45.png

    Hello

    I get these errors a lot lately on my sites of muse - it happens when I rename pages or change the navigation menu - I tried several times and this isn't to do with external plugins - this is a bug of muse - appears when my loading sites and also when you select a page in the navigation bar - in the past for a single page websites - I just copy the contents in memory - remove the rebonding and page - everything and it works again - of course, I don't want to do that with Web sites with multiple pages - in the past, anyone in the forum mentioned deleting a file of muse on the server to reset something - any who want to add to it or guide me to solve these problems, so I know what to do when they arrive

    Jay

    Don't know if it's the same thing, but share this discussion JavaScript exception: error calling the function of selection: [object error] after the last update of the software Adobe Muse.  I export the html files and load them on my server.  I replaced all the files.  Only happens in IE11 just in case it helps.

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

  • JavaScript and EchoSign

    Hi all

    I'll set up some contracts to send to different suppliers that we can transport materials. I created the contract and added various features of Javascript to the document in order to have all of the required fields completed. Some of these javascript elements include:

    • Related text fields requiring initials users either in agreement or column disagree (they cannot choose both)
    • Make the agreement or disagreement above for an initial or other fields

    When I import the EchoSign document and send him outside, the fields are no longer have the features that have been entered in the Javascript. I found the EchoSign widget (EchoSign Widget|) Adobe EchoSign) but I want to see if this will allow the Javascrip code to transfer to the document Echosign.

    Thank you for your help,

    Ben

    Hello FatPeaches,

    After reviewing your question and do further research, I found that Javascript cannot be used in any document being sent for signature EchoSign. EchoSign Widget will convert any code in Javascript so that the widget will then be incorporated into a web site, but it does not extend to documents sent by e-mail sent to be signed. However, it is always possible to aid text markup or the fields of drag-and-drop with the functionality of calculated fields. For assistance in obtaining a result, you can contact the Adobe Support EchoSign directly with other questions focus on the function that you have as well as a copy of your document so that one of their representatives can advise you more on what functionality of calculated fields, you can use to get the desired effect.

    Thanks for your inquiry!

    Rob.

  • What the handles, threads, and processes means or function, they are performing?

    My son will ask me a question and I could not answer (it is perhaps a good thing because I think he will try to enter and change something he doesn't know) so I thought that I felt I'd better try to find out. He and I are eager to know what the handles, son and process average or functions, they do. They are in the performance tab in Windows Task Manager.


    Thank you

    Hello

    A process handle is an integer value that identifies a Windows process. The Win32 API call a HANDFUL.

    When you start a program, this program runs as a "process". It's something that runs in its own protected area, with its own memory. Other processes cannot touch this memory.

    A few times, the program needs to do several things at once in a way of multitasking, similar to how the multitasking process. For example, a spreadsheet can recalculate the cells you enter data. He * could * start another process, but they can't (easily) share the memory, he would need to if recalculate cells!

    Must be a different sort of process that is not quite as separated. It is a "thread".

    Process: the number of applications that are running at some point in the computer.

    Hope this information helps.

  • How to replace a bad IDE disk with a USB Flash drive system - and have all the functionality of XP Pro SP3

    How to replace a bad IDE disk with a USB Flash drive system - and have all the functionality of XP Pro SP3
    Given a PC without hard disk...
    How can you use a flash drive instead?
    So, indeed, the USB key works as an SSD...
    I saw online options that gives partial functionality of the system... and an option that is more than $100 (more than the system's worth)...
    None of these options are acceptable in the circumstances.
    It is an effort to create a machine for a particular use, built from a recycled pc for which hard drive was removed and destroyed by the original owner...
    The criterion is that it must work just like it was a mechanical drive running xp pro sp3 with all updates, etc...
    Thanks for any help.

    You can not install XP on a Flash as his unsupported drive. Your only two options are a traditional hard drive or Solid State Drive (SSD).

    J W Stuart: http://www.pagestart.com

  • Defective JavaScript and cannot be removed or reinstalled, get «fatal error during installation»

    As a result of an error indicating that javascript has not been installed (Internet options/security/scripting is set correctly) I tried to remove the Javascript (before a new installation) but which have resulted in a message: fatal error during installation (probably installshield). I'm so stuck without Javascript and cannot update or delete it.

    I have version 6 update 27 Javascript, Windows XP and Internet explorer 8

    Any help will be greatly appreciated

    Barry

    Hello

    You can run solve this link and try to uninstall java and check if the problem persists:

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

  • HP Touch Smart calendar and Notes cease to function and give me a notification so I end the program but it gives me immediately the notification even happening?

    HP Touch Smart calendar and Notes cease to function and give me a notification so I end the program but it gives me immediately the notification even happening?

    the notification said that the problem caused blocking the program works correctly.
    Windows will close the program and notify you if a solution is
    available.
    [Exit]
    I closed the program and this notification will appear back again.

    Hello

    I imagine the inconvenience that you are experiencing. I will certainly help the question of fixing.

    I would be grateful if you could answer the following questions:

    1. Since when are you facing the issue?

    2. you have any anti-virus installed on the computer program?

    3 are you aware of any changes made to the computer before the show?

    I would say you runa full scan using the Microsoft Safety Scanner and look for any infections.

    Note: there is a risk of data loss if all the files are infected and which can be removed in the cleaning process.

    If the problem persists, you can start the computer in safe mode and perform a clean boot. Clean boot helps eliminate any conflict of third party software.

    Note: when you are finished troubleshooting, follow step 3, mentioned in the article to start the computer to a normal startup.

    Hope this helps and let us know if you need more assistance. We will be happy to help you.

  • Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    Hi I do not know if I put in the correct title apologetic information if I don't.

    Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    I am not computer savvy and need help.

    The first has a red bar almost at the end of the box, the latter has a blue bar around to halfway along the area. Hope I gave enough information that someone explain it to me. Thank you.

    caz59

    Original title: hard drives

    The c: drive is where Windows is installed and is running from. The red bar indicates that the disk is full. You will need to do a cleaning to clean the computer and free urgent enough disk space. It may be more prudent to get some hands on assistance with this.

    WinRE is synonymous with the Windows recovery environment and contains an image of the computer, such as provided by the manufacturer. There will be a procedure to cross, which depends on the manufacturer as to what it is. The blue bar indicates there is little space left on the drive though use it to store files may stop the recovery process of work.

  • The FTP.EXE program included in Windows 7 and Server 2008 help the PASV Mode connection

    What is the FTP.EXE program included in Windows 7 and Server 2008 helps to connect in PASV Mode?

    I ask because I had a strange experience with her. First, I will mention that I did hours of research and found many articles stating that it does not work in XP/2000/Server 2003, but I found nothing for Windows 7 or Server 2008.

    I found some people who kept him at work and others who could not. I tried with Windows Firewall turned off and will be on and firewall rules created. Others said it is not supported and that I should use a third-party FTP client. I could make it work in Internet Explorer and Windows Explorer. I am well aware of the situation these options in Internet Explorer.

    Here are the best real, I could run from the command line on my PC Windows 7 (32 bit), but not on Server 2008 64 bit.

    Now, before someone comes and asks me to check the firewall, I want to mention that I tried more than five clients of third-party FTP Server 2008 and they all worked perfectly. In addition, from the same Server 2008 it worked fine in IE and explore.

    On Windows Server 2008:

    FTP client blocked on: 150 opening data of channel for the directory list.

    Windows 7:

    C:\Users\wxk1>Systeminfo | b/findstr/c: "Name of the OS" / c: "Version of the OS.
    Name of the operating system: Microsoft Windows 7 Enterprise
    OS version: 6.1.7601 Service Pack 1 Build 7601

    C:\Users\wxk1>FTP ftp.secureftp - test.com
    Connected to ftp.secureftp - test.com.
    220 - FileZilla Server version 0.9.39 beta
    220 - Written by Tim Kosse (* address email is removed from the privacy *)
    220, please visit http://sourceforge.net/projects/filezilla/
    User (ftp.secureftp - test.com:(none)): test)
    331 password required for test
    Password:
    230 logged on
    FTP > dir
    200 port command successful
    Data channel opening 150 to the directory list.
    -r - r - r - 1 ftp ftp bookstore.xml 1471 25 June 2007
    -r - r - r - 1 ftp ftp 279658 25 June 2007 hamlet.xml
    -r - r - r - 1 ftp ftp 80641 25 June 2007 hamlet.zip
    -r - r - r - 1 ftp ftp 2164 japanese.xml 25 June 2007
    -r - r - r - 1 ftp ftp 0 July 3, 2007 the new text Document .txt (2)
    -r - r - r - 1 ftp ftp 0 3 July 2007 new document texte.txt
    -r - r - r - 1 ftp ftp 4677 25 June 2007 nutrition.xml
    -r - r - r - 1 ftp ftp 8463 pigs.xml 25 June 2007
    -r - r - r - 1 ftp ftp 7581 25 June 2007 plants.xml
    drwxr-xr-x 1 ftp ftp 0 subdir1 June 25, 2007
    drwxr-xr-x 1 ftp ftp 0 subdir2 June 25, 2007
    226 transfer OK
    FTP: 697 bytes received in 0.01Seconds 46.47Kbytes / s.
    FTP >

    Also, I do not install a server FTP PASV will be IIS 7 or anthing like that, just try to connect to a server FTP PASV. Here is the test server that I used:

    http://www.SecureFTP-test.com/

    Type FileZilla
    Address FTP.SecureFTP - test.com
    Opening of session test
    Password test

    Details on using

    Chilkat provides this FTPS test account for all those wishing to test the secure FTP client functionality. You can connect to ftp.secureftp - test.com, connect as a 'test' with password 'test' and download that all files present on the server. The "test" account can also retrieve entries in the directory. There is, however, no downloading files on the server.

    Hello

    The question you posted would be better suited to the Technet community. Check out the link and ask the question.

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • plugin JavaScript and css file does not load in Apex 5.0 in certain circumstances

    Hello

    I have a strange problem. I've migrated a 4.2 application and its plugins to version 5.0.

    On my test server that everything works perfectly, plugins properly load css and javascript libraries.

    On the server to the client, even if the configuration is identical (Oracle 11 g, ADR 3.0, Glassfish), any plugin loading fails and triggers an error like:

    http://W2k3-Theos-t-AP/ords/i3std/r/2105/files/plugin/32865463423023705/v1/Select2.CSS

    Method: GET

    Status: 404 not found

    Currently the Plugin files (javascript and css) are stored in Oracle. Does it mean that I have muss stores as static files?

    Thanks for help

    Frédéric

    Kiran,

    Unlock APEX_LISTENER and APEX_REST_PUBLIC_USER and everything works perfectly.

    Thanks to Peter and Kiran, Apex is an excellent product thanks to its fantastic team

    Best regards

    Frédéric

  • Database update issue with JavaScript and local storage

    Hi all

    I come from a PHP background and a newbie with HTML5 and JavaScript, and local storage


    Currently I'm building a mobile web application that uses a remote database.

    I have a question about the update database.

    Currently, I set it up so that when the user logs on successfully - Local Storage fields are loaded from the remote database query using a jQuery.Get. This seems to work well.

    When it's time to update the data, I fill the form in local storage, allow the user edit fields, then:

    -a form post to send data to the remote php page that updates the database...

    Here is where I have a question: How can I make sure the edit went through good - what is better to do it now?

    -Can I set up a json response to say whether or not the update was successful

    or

    -Query the database once more and recover the fields to compare the edit results

    or

    -Another technique to do of course change it went through OK

    - then if successful, I can update the local storage

    Q: what is the best way to ensure that the database has been correctly updated (and also not lose time with Access database useless)?

    Is there a recommended for this?

    In addition, if possible this beginner can use a clear example...

    Why not to use jquery get () callback status where if the success is returned then to update local storage?

    best,

    Shocker

Maybe you are looking for

  • bookmarked site Web fireox yesterday began leading me to the web pages bad

    Years I have been on a daily basis without going through my connection opening page and goes directly to my e-mail and using bookmarks page to access some Web sites. All of a sudden yesterday I connect whenever I opened and a bookmark to ancestry/com

  • Stuck in recovery loop

    I need serious help! I have a HP Pavilion Slimline s3000y running Vista Basic with the last update of the service Ms. He was acting with blue screens once every two weeks. Then I ran McAfee security suite/antivirus every day and nothing was ever foun

  • How to make interface for sending email

    How to make the interface for sending electronic mail. Just send a simple message and attach a file only. The outgoing server and incoming ip and user name with password is known. Thank you

  • Fall of connection WiFi Envy23 TouchSmart

    My WiFi connection is down one or two times a day on my TouchSmart Envy23. The first time I'm reconnecting is always when I first connect to the computer in the morning so I thought it might be something with one of the power, sleep or hibernate mode

  • Suggestions from Yahoo IM

    It doesn't seem to be an official Yahoo messenger app for android, but there are several "all-in-one" apps on the market.  Anyone here have preferences/suggestions for a good?