How to get the name and the path of the font used in photoshop (not textItem.font)

I'm trying to get the real name of the font and the path, is there a "easy" way to do it ?
i need to get the font file (*.ttf or *.otf) and copy to the same directory as the psd file, that's why textItem.font doen't work for me.
thanks in advance

You could try this as it looks as if you are using Windows.
Run the VBS script to create a fontlist file on the desktop.
Then run the javaScript on the PSD document.
It should copy the fonts to the same folder as the document, it will also create a text file with a list of fonts.
It didn't find all the fonts in my test psd maybe because it wasn't in the windows/font folder?
VBS.
Set wshShell = WScript.CreateObject("WScript.Shell")
Set wshSysEnv = wshShell.Environment("PROCESS")
sMyFile = "c:" & wshSysEnv("HOMEPATH") & "\Desktop\Fontlist.txt"
Dim objFileSystem, objOutputFile
Dim strOutputFile
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(sMyFile, TRUE)
Dim str
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
objReg.EnumValues HKEY_LOCAL_MACHINE, _
strKeyPath,arrEntryNames,arrEntryZZZ
For Each entry in arrEntryNames
str = wshshell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts\" & entry)
       objOutputFile.WriteLine(entry & "," & str)
Next
objOutputFile.Close
javaScript.
#target photoshop;
app.bringToFront();
main();
function main(){
if(!documents.length) return;
try{
var Path = activeDocument.path;
}catch(e){
    alert("This document needs to be saved before running this script!");
    return;
var FontFile = File(Folder.desktop + "/FontList.txt");
if(!FontFile.exists){
    alert("You need to run the vbs script first to create the FontList file!");
    return;
var FontList = new Array();
    FontFile.open('r') ;
while(!FontFile.eof){  
   strInputLine =FontFile.readln();
   if (strInputLine.length > 3) inputArray  = strInputLine.split(",");
   if(inputArray.length == 2) FontList.push([[inputArray[0]],[inputArray[1]]]);
FontFile.close();
var PSDtextLayers = getNamesPlusIDs();
PSDtextLayers = UniqueSortedList(PSDtextLayers);
for(var a in PSDtextLayers){
    for(var f in FontList){
         var rex = new RegExp;
         rex = PSDtextLayers[a].toString();
        if(FontList[f][1].toString().match(rex,"i")){
            var From = new File("/c/windows/fonts/" + FontList[f][1].toString());
            var To = new File(Path + "/"+  FontList[f][1].toString());
            From.copy(To);
            break;
var rFonts = new File(Path + "/required Fonts.txt");
rFonts.open('w');
rFonts.write(PSDtextLayers.join('\n'));
rFonts.close();
function UniqueSortedList(ArrayName){
var unduped = new Object;
for (var i = 0; i < ArrayName.length; i++) {  
unduped[ArrayName[i]] = ArrayName[i];
var uniques = new Array;for (var k in unduped) {
   uniques.push(unduped[k]);}
return uniques;
function getNamesPlusIDs(){
   var ref = new ActionReference();
   ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( 'NmbL' ));
   ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
   var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
   var Names=[];
try{
    activeDocument.backgroundLayer;
var i = 0; }catch(e){ var i = 1; };
   for(i;i<count;i++){
       if(i == 0) continue;
        ref = new ActionReference();
        ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
        var desc = executeActionGet(ref);
        var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
        var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
        if(layerName.match(/^<\/Layer group/) ) continue;
        if (desc.hasKey(stringIDToTypeID('textKey'))){
            desc = desc.getObjectValue(stringIDToTypeID('textKey'));
            desc = desc.getList(stringIDToTypeID('textStyleRange')).getObjectValue(0).getObjectValue(stringIDToTypeID('textStyle'));
            var postScriptName = desc.getString( stringIDToTypeID('fontPostScriptName'));     
Names.push(postScriptName);
return Names;

Similar Messages

  • The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    Hey there Luba_kalstad,
    It sounds like you are unable to join your network and cannot see it in the Wi-Fi list in Settings. I would try the troubleshooting outlined in this article named:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Be sure you're in range of your Wi-Fi router (access point).
    Tap Settings > Wi-Fi and turn Wi-Fi off and on. If your Wi-Fi setting is dimmed, follow these steps.
    Confirm that your Wi-Fi router and cable or DSL modem are connected to power, turned on, and connected to the Internet. If not, refer to your network administrator or Internet service provider (ISP) for assistance.
    Restart your iOS device.
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    Tap and Forget this Network.
    Try to connect to your desired Wi-Fi network.
    Note: You may need to enter your Wi-Fi password again if your network requires one.
    Turn your Wi-Fi router off and on2. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    Update your device to the latest version of software.
    Update your Wi-Fi router to the latest firmware2. For AirPort Base Stations, install updates using the AirPort Utility.
    And this section down toward the bottom if needed:
    Unable to locate a Wi-Fi network
    Verify that the network is available by tapping Settings > Wi-Fi and choosing from the available networks.Note: It may take a few seconds for the Wi-Fi network name to appear.
    Move closer to your wireless router (access point) and attempt to locate the Wi-Fi network.
    If you do not see the network you would like to join, you may be attempting to connect to a hidden network. Learn how to join a hidden network.
    Supported Wi-Fi configurations vary by iOS device model. Find out which standards your device supports3.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including:
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • How to pass tag name and value dynamically in the output of PCo notification?

    Hi,
    I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
    Thanks in advance.
    Regards,
    Suman

    Hi Suman/Jeedesh,
    As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
    For above issue, My suggestion
    1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
    2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
    3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
    4. And in the mean time, send those Tag details vie mail trigger or as per requirement
    Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
    Hope it might solve your problem
    Regards,
    Praveen Reddy

  • Query to get parameter name and value after ran the conccurent program

    Hi All,
    Query to get the parameter name and value for completed concurrent program using the request id. can any one help me in this regard.
    Thanks,
    Red.

    Red,
    I have tried the same query and it works properly here.
    I have submitted "Purge Signon Audit data" concurrent program with "Audit Date" parameter set to 01-06-2009, and here is the query output:
    SQL> select request_id, phase_code, status_code,
    argument_text, argument1
    from fnd_concurrent_requests
    where request_id = '739664';
    REQUEST_ID P S ARGUMENT_TEXT        ARGUMENT1
        739664 C C 2009/06/01 00:00:00  2009/06/01 00:00:00Regards,
    Hussein

  • WAD: How-to get query name and pass to URL

    Hi,
    The task: In a BI 7.0 web template - get the technical query name and use that to open a URL in the format http://<MYURL>&DOCUMENTATION=<QUERYNAME>. So:
    1) User clicks an icon
    2) Get technical name of query
    3) Open the documentation for that query using a URL
    How can this be done? Do I have to use the Custom Extension web item and implement a new class using the interface IF_BICS_CONS_WEBITEM_CUST_EXIT? If so, do you have an example of how this can be done? OR even better is there an easier way to accomplish this?
    Thanks in advance,
    Jacob

    Hi Daniel,
    you could get the query name in ABAP code, also. Here is a snippet from the execute method. The Query name should be in l_sx_view at the end.
    best regards
    Arne
    TYPE-POOLS: 
      rrx1.
    DATA:
      l_string TYPE string,
      l_xml TYPE string,
      l_xml_xstring TYPE xstring,
      l_sx_view TYPE rrx1_sx_view,
    * Line Feed, CR
      c_lf TYPE string,
      l_h_lf(2) TYPE x VALUE '0D0A',
      l_r_conv TYPE REF TO cl_abap_conv_in_ce.
    * Get the line feed and carriage return for unicode
      l_r_conv = cl_abap_conv_in_ce=>create( input = l_h_lf ).
      l_r_conv->read( IMPORTING data = c_lf ).
      DATA:
      l_t_data_providers TYPE cl_bics_cons_webitem_util=>tn_t_data_provider,
      l_s_data_providers TYPE cl_bics_cons_webitem_util=>tn_s_data_provider,
      l_r_variable_container TYPE REF TO if_ixml_node.
      CLEAR e_xml.
      TRY.
    *     All data passed to the webitem exit is hold in I_XML using XML.
    *     The XML is UTF-8 encoded. You can convert the UTF-8 xstring
    *     to a simple ABAP string by calling the following method:
    *     ==================================================================
          CALL METHOD cl_bics_cons_webitem_util=>utf8_xstring_2_string
            EXPORTING
              i_utf8_xstring = i_xml
            RECEIVING
              r_string       = l_xml.
    *     The XML includes sections about the used data provider and about the
    *     variable container. The following method parses the XML and
    *     provides the IF_IXML_NODE instances for data providers and for the
    *     variable container.
    *     ==================================================================
          CALL METHOD cl_bics_cons_webitem_util=>parse_xml
            EXPORTING
              i_xml                  = i_xml
            IMPORTING
              e_t_data_providers     = l_t_data_providers
              e_r_variable_container = l_r_variable_container.
    * 01 Get name of first Data Provider
          READ TABLE l_t_data_providers INDEX 1 INTO l_s_data_providers.
          CALL TRANSFORMATION bics_cons_webitem_filter_by_dp
          PARAMETERS dataprovider = l_s_data_providers-name
          SOURCE XML i_xml
          RESULT XML l_xml_xstring.
          CALL METHOD cl_bics_cons_state_converter=>convert_xml
            EXPORTING
              i_xml     = l_xml_xstring
            IMPORTING
              e_sx_view = l_sx_view.

  • How to get starting date and ending date of the given Fiscal Period

    Hi Friends,
    In my Selection screen parameter, I've Fiscal year and Period , I want to get the starting date and ending date with the Fiscal period.
    How to get and throught which FM.
    Pls advise.
    thanks&regards
    Sankar.

    Hello Sankar,
    Check the FM PERIOD_DAY_DETERMINE.
      DATA :
             l_periv     TYPE periv,
             l_blart     TYPE blart,
             l_fday     TYPE bkpf-budat,      "First day in period
             l_lday     TYPE bkpf-budat.      "Last day in period
    * Fetch the fiscal year variant from T001
      SELECT  SINGLE periv  INTO TABLE l_periv
      FROM t001
      WHERE bukrs EQ p_bukrs.
    * Get first day/last day
          CALL FUNCTION 'PERIOD_DAY_DETERMINE'
            EXPORTING
              i_gjahr              = p_gjahr
              i_monat              = p_monat
              i_periv              = l_periv
            IMPORTING
              e_fday               = l_fday
              e_lday               = l_lday
            EXCEPTIONS
              error_period         = 1
              error_period_version = 2
              firstday_not_defined = 3
              period_not_defined   = 4
              year_invalid         = 5
              OTHERS               = 6.
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Jan 9, 2009 2:08 PM

  • How to get file name and set it as static text in a dialog

    Hi,
    I m new to InDesign Programming.
    I have a menu that creates a dialog with different controls in it.
    The dialog will appear only if there is an open file. I need to display the name of the open file as a static text in the dialog. I know to get the name of the current file but don't know how to pass this each time the dialog is opened.
    Can someone help me in doing this?
    I m using InDesign CS3 in MAC OS.
    Thank You.

    those are the methods, but you can't use getCharacterEncoding(), actually, cuz it seems it's not necessarily filled in.. or at least that might be on some servers only, like Tomcat 4. As for encodings, you need to do a search for character encoding names and use the appropriate one.

  • How to get server name and port of OSB server in a proxy service ?

    I need to get the server name and port of the OSB server inside a proxy service. How can I get this?

    You may use java callout for this purpose -
    How to get ServerName and ApplicationName in OSB (ALSB) ?
    Regards,
    Anuj

  • Ho to get file name and full path of a local file

    I want to be able to get the file name and it's full path of
    a local file. I was thinking of using "FileReference" but
    FileReference doesn't permint accessing the local file path. Can
    anyone suggest a way of doing this.
    Thanks

    You will have to create 2 different versions.
    See this example we have created using JSystem
    http://jsystem.flashjester.com
    Download the example file provided.
    Hope this helps.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • How to get Server Name and port. Urgent.....

    Hi,
    Please let me know how can i get the server name and port without using request object.
    I am getting it :- request.getServerName();
    But, pl. let me know how can I get it without using this request object.
    Waiting for reply..

    I don't know of any way to trivially access that, but why do you need to do this? If you need access to that information in a method that can't see your HttpServletRequest, then perhaps your architecture has a flaw, and you'll be better off in the long run restructuring it.

  • How to get Host name and port inside UDF

    Hi,
    I want to access the Host and port in UDF to pass it to a link http://host:port/AdapterFramework/ChannelAdminServlet?party=&service=&channel=*&action=status dynamically.
    How can I acieve it?
    Manisha

    Hi
    With this code. I am getting error:
    try
    java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
    String host = addr.getCanonicalHostName();
    catch (UnknownHostException e){}
    if (ProcessMode.equals("P"))
    try{
    String xyz="/AdapterFramework/ChannelAdminServlet?party=&service=&channel="Name"&action=stop";
    URL server = new URL("http", host, 8XXX, xyz);
    tring userPassword =Userid + ":" + Password;
       String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
        URLConnection uc=server.openConnection();
        uc.setRequestProperty ("Authorization", "Basic " + encoding);
        BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
         while ((inputLine = br.readLine()) != null)
         output+=inputLine;
        br.close();
    catch (Exception e){}
    ERROR:
    cannot resolve symbol
    symbol : variable host location: class com.sap.xi.tf._MM_CommunicationChannel_Stop
    _ URL server = new URL("http", host, 8xxx, xyz);
    ^ 1 error
    Any other way to get host and port?
    Manisha

  • How to get sequence name and pass/fail status?

    HI,
    I need your assistance in order to achieve the following goal:
    I have about 10 sub-sequence steps in the main sequence.
    For those steps only, I'd like to print out in a window the name of the sequence and the resutl.
    I meet dificulties since i have the sub-seq result, only after it ends.  It means that i can print its status only in the following step.
    is there a way around it?
    I wish to be able to write all this information in the clean up of the sub-seq step.
    Thanks
    Rafi

    Hi Rafi,
    You will not be able to print the result of a subsequence call in the same step as the subsequence call, because both post-step substeps and post-expressions are run before the status is evaluated.  As you mentioned, you can do this in the following step, or you can use the SequenceFilePostStep callback to specify some customized behavior to follow your sequence call steps.  This callback will run after every step, so you would have to put some extra logic into this callback if you are using multiple step types.
    So, are you trying to print the result of each subsequence call separately?  How do you intend to display the status?  Let me know if you have any other questions about how to implement this.
    Regards,
    Marty H.
    National Instruments

  • How to get Vendor name and Material text in FAGLL03 transaction?

    Hello All,
    I am executing FAGLL03 report which display Vendor No and material No in item level but I want Vendor name and Material text to be display for every vendor no. and material no.
    Please let me know any approach to do this?
    Thanks in advance.
    Regards
    Steve

    Hi Raymod,
    Again I am getting the same error after executing all reports and FM.
    Internal error in ANALYZE_ACT_FIELDCAT
    Message no. MSITEM012
    Diagnosis
    An internal error has arisen in the form routine ANALYZE_ACT_FIELDCAT for program RFITEM_INC.
    This is due to inconsistencies between table T021S (special fields) and structure RFPOSEXT.
    System Response
    During the processing of special fields in the line item list, errors and even a program termination may occur.
    Procedure
    Recreate the special fields in Customizing. If the error occurs again, contact SAP.
    Can you pls check it out in your system if you can?
    It is not working here ..
    Thanks and Regards
    Steve

  • How to get vendor name and invoice reference details in asset register

    Hi Experts,
    My client requirement is he want to see Vendor name and invoice reference filed in asset register.
    Is there any standard reports relating this requirement.
    Kindly Provide valuable information relating to this issue.
    Regards
    Madhan

    Hi Madhan,
    Let me know the t.code which you are getting asset data.
    Thanks

  • How to get Cookie Name and Value Using HttpGetterCallback - CE 7.3

    Hi All,
    We are migrating from Netweaver 7.0 to 7.3. We are facing a issue when migrating the custom login module from 7.0 to 7.3.
    Since WebCallback is deprecated and not to be used in Netweaver 7.3, we are finding difficulties in getting the cookie name and value. Please find below our coding for getting the cookie value using HttpGetterCallback. We are not getting the cookie name and value, Kindly let us know if we are implementing the HttpGetterCallback correctly.
    HttpGetterCallback httpGetCookieCallback = new HttpGetterCallback();
    httpGetCookieCallback.setType(HttpCallback.COOKIE);
    Callback] callbks = new Callback[ { httpGetUrlCallback, httpGetCookieCallback };
    callbackHandler.handle(callbks);
    requestUrl = (String) httpGetUrlCallback.getValue();
    Cookie] cookies = (Cookie [) httpGetCookieCallback.getValue();
    if (cookies != null) {
    for (int i = 0; i < cookies.length; i++) {
    location.debugT("Cookies name " + cookies.getName()
    + " - value "
    + cookies.getValue());
    Thanks and Regards,
    Saravanan

    Try This-
            Cookie cookiesArray[] = request.getCookies();
         Cookie currentCookie = null;
         String currentCookieName = "";
         String cookieValue = "dummycookie";
         int cookieArrayLength = cookiesArray.length;
         for (int i = 0; i < cookieArrayLength; i++) {
              currentCookie = cookiesArray<i>;
              currentCookieName = currentCookie.getName();
              cookieValue = currentCookie.getValue();
    Regards,
    Atul

Maybe you are looking for

  • How do I get Iphoto to ask me before merging events?

    iphoto used to ask me if I was sure that I wanted events merged. One day, I checked the box that says "Don't ask me again". I shouldn't have done that!!! Now my kids can mix and merge all my events - easily!!! How do I get iphoto to ask me before mer

  • Using iMac (Intel) as second screen.

    Is it possible to easily use an older iMac as a second screen to a new MacBook Pro? This would obviously save the cost of purchasing a new monitor. Thanks for any advice/instructions/rulings.

  • Restoring an iweb site after erase & install.

    all of my site info is in the .mac iweb folder, but i can't see a way to load that information into iweb. i use the iweb for a photo gallery on a drum company website, and would rather not rebuild it from scratch. can anyone help? thanks candcdrumcom

  • Error 2096 - Reinstall

    I've tried to open my Itunes multiple times, and no matter what I do it still won't open and gives me the same error. It tells me to reinstall Itunes, and I've deleted both quicktime and itunes and still, it gives me the same error. What do I do?!

  • Interaction History / Service Transactions

    Hi All, We are having crm 2007 and we are implementing the service scenario. When we create a contrat 123 for a business Partner ABC. Normally the reference/Interaction history etc shall also be displayed in the Business Partner. i.e. all the relevan