Path to application question

Hi,
I want a way to open a file with a certain app but I don't want to keep that app in my Applications folder.  I found this example:
set the_file to (choose file) --as alias
set useFinder to true
if useFinder then
          set the_application to path to application "TextEdit"
          tell application "Finder"
                    open the_file using the_application
          end tell
else
          tell application "TextEdit"
                    activate
                    open the_file
          end tell
end if
And this kinda works but using path to application still doesn't work if the app is not in /Applications and the 2nd option is slow (about 5 seconds vs 0.5 seconds doing it the first way).  What other options do I have?  Thanks,
rc

Well it's an app I'm developing so you wouldn't know it by name.  But I do have a bunch of test versions all over my computer so this probably messes things up?  I will make a few more trials and use an app like Preview or something for testing as well.  I'll post back thanks...
rc

Similar Messages

  • Function module to find the path of application server

    Hi can any one say me what is the function module to find the path of the application server

    Hi ,
    What i understand from ur question is that u need path for application server from the presentation layer i.e user screen.
    u can achive the path this way
    parameter: file type filename-fileintern.
    when user presses F4 here, it will show the directories and path in the AL11.
    I didnt find any FM which will get the path of Al11.
    revrt back if any issues,
    Regards,
    Naveen

  • Number of records in given path of application server

    How
    to find number of records in given path of
    application server

    I think that this almost works.
    report zrich_0001.
    data: begin of itab occurs 0,
          rec(1000) type c,
          end of itab.
    data: wa(1000) type c.
    data: number_of_files type i.
    data: number_of_records type i.
    data: tot_size type i.
    data: tot_number_of_records  type i.
    data: p_file type localfile.
    data: ifiles type table of  salfldir with header line.
    data: file type string.
    parameters: p_path type salfile-longname
                        default '/usr/sap/TST/DVEBMGS01/data/'.
    call function 'RZL_READ_DIR_LOCAL'
         exporting
              name           = p_path
         tables
              file_tbl       = ifiles
         exceptions
              argument_error = 1
              not_found      = 2
              others         = 3.
    loop at ifiles.
      clear itab. refresh itab.
      concatenate p_path ifiles-name into file.
      catch system-exceptions dataset_read_error  = 1.
        open dataset file for input in text mode.
        if sy-subrc = 0.
          do.
            read dataset file into itab.
            if sy-subrc <> 0.
              exit.
            endif.
            append itab.
          enddo.
        endif.
        close dataset file.
      endcatch.
      if sy-subrc = 0.
        number_of_files = number_of_files + 1.
        describe table itab lines number_of_records .
        tot_number_of_records
            = tot_number_of_records  + number_of_records .
        tot_size = tot_size + ifiles-size.
        write:/ ifiles-name, ifiles-size,  number_of_records.
      endif.
    endloop.
    Regards,
    Rich Heilman

  • Convert file path in application server as link

    How can we convert file path in application server as link to send email.
    Thanks
    Suresh

    Your app server folders have a mappable location on your network, e.g,
    server\path\filename.  Use an HTML anchor tag and build the link with code.  You'd be better off storing files on a file server (write to a mapped location from the app server) and link to there (same process).

  • Genymotion plugin, path to application

    Hi, I installed genymotion from aur, is working fine, I can add virtual devices and run it, I install the genymotion plugin in android studio, it need to set the path to the genymotion folder but nothing is working, I try genimotion location with "which genymotion", try the local folder at home directory, but nothing is working, anyone can tell me what folder I need set there?
    my android studio is the zip file downloaded from android developer website, not the one from the aur.
    http://i58.tinypic.com/2z7ic1l.png
    moderator edit [ewaller] Converted over sized image tags to url tags https://wiki.archlinux.org/index.php/Fo … s_and_Code
    Last edited by ewaller (2014-09-09 03:21:14)

    In addition to working out whether you're using the system application support directory, or the user one, you also need to look at the path itself.
    Assuming, for now, that 'path to application support as text' returns 'HD:System:Library:Application Support:", your code:
    set f_name to (path to application support as text) & "My_appname" & "my_filename.txt"
    will result in:
    "HD:System:Library:Application Support:Myappnamemyfilename.txt"
    Note how My_appname and my_filename.txt are merged - because you just appended the two strings. You need to separate these two items with a colon in order to specify another directory level:
    set f_name to (path to application support as text) & "My_appname:" & "my_filename.txt"
    Finally, the fact you 'get EOF errors' is a little wierd. If your path is wrong I would expect a 'file not found' error, not a EOF error. It may be that you are specifying the correct file but there's some other error in your script when you process it that is causing your problem.

  • Getting path to application associated with file type

    Hello,
    I'm looking for a platform-independent way to get path to application associated with given file type. Desktop API introduced in JSE 1.6 seems to do this, but it only lanuches the app.
    Any suggestions will be apprecieted

    Okay then, how can I open the file in it's associated
    application AND get the Process object of app's
    instance?If it doesn't bother you that the app will only work on windoze, then you can use the shell "start" command on the file.
    Process proc = Runtime.getRuntime().exec(new String[]{"cmd", "/C","start",filePath});However waitFor() will only wait for the process to be launched, not completed. Since your program doesn't know what Windoze will choose to launch, this makes sense.

  • How to find a path in Application server?

    Hi,
    I have a reqirement that i need to download the original document which is attached in the DIR links for each line item in the PO.
    Say for Eg. user is uploading the original document in CV03n.
    Through program i have to download it and save it in local desktop.
    But as per my concern when user uploads that document in CV03N,  it should get updated in application server.
    I wants to know how can i find that path through the document got updated in AL11.
    Please let me know if you have any idea on this.
    Also please let me know if my question is not clear.
    Regards,
    Prabu

    Hi Prabu,
    It depends on how DMS is implemented in your place.
    If DMS is implemented along with CONTENT SERVER, then the actual document uploaded is stored in CONTENT SERVER and only a link is saved in SAP DB and whenever you refer to this link the image is being retrieved and displayed.
    If you dont have content server then the uploaded documents are stored in your application server only. Generally the big companies which implement DMS do have a content server otherwise DB size will grow enormously in no time.
    Once you check out the basics of ur requirement, then search through FM's available related to DMS.
    Hope this answer helps.
    Regards,
    Lakshmi Narayana

  • WSUSSERVICE.EXE Path White Space Question

    Our security scanner is reporting that two services installed on our Server 2012 server is a potential security risk. The two services are:
    WSUSService.exe - Path: %ProfileFiles%\Update Services\Services\WsusService.exe
    WSusCertServer - Path: %ProfileFiles%\Update Services\Services\WSusCertServer.exe
    The following specific references are provided supporting this position:
    CVE-2013-1609

    CVE-2014-0759
    Is my scanner correct that these are vulnerabilities because the service paths are not quoted, or is this not really an issue for these specific services?
    The following additional information was provided by the scanner:
    Synopsis: The remote Windows host has at least one service installed that uses an unquoted service path.


    Description

    The remote Windows host has at least one service installed that uses an unquoted service path, which contains at least one whitespace. A local attacker could gain elevated privileges by inserting an executable file in the path of the affected service. 
Note
    that this is a generic test that will flag any application affected by the described vulnerability.


    Solution

    Ensure that any services that contain a space in the path enclose the path in quotes.

    Hi,
    Based on my research, we can solve this issue by adding quotation marks at each side of the services path in Registry.
    You can find the service in registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services, after that, you can expand the ImagePath then add quotation marks.
    More information for you:
    Security scanning - question about Windows service
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/0c5445fc-bd88-4fef-aab4-1f8d33723332/security-scanning-question-about-windows-service?forum=winserversecurity
    Unquoted Service Paths
    http://www.commonexploits.com/unquoted-service-paths/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Best Regards,
    Amy

  • Web Applications questions

              Hi,
              I read through the Web Application documentation and I could not find answers to some questions, so I thought that someone on these forums might be able to help.
              1) Can two or more web applications share code? Or, in other words, can a web application use classes that do not belong to it? If yes, where should these classes reside?
              I tried sharing the code to get a database connection and the Class.forName("weblogic.jdbc.pool.Driver") instruction fails with the error ClassNotFoundException: weblogic/jdbc/pool/Driver.
              2) Can two web applications cooperate? Or, in other words, can one web application use services provided by another web application (like servlets, .jsp pages, images, etc.)?
              I tried linking to a servlet in a web application from another web application and got the error NoClassDefFoundError: javax/servlet/http/HttpServletRequest.
              3) If two web applications can cooperate, can they still cooperate if they reside on two different machines? Or even two different clusters?
              Thanks,
              Vladimir
              

              Alexander Petrushko <[email protected]> wrote:
              >vladimir wrote:
              >
              >> Hi,
              >>
              >> I read through the Web Application documentation and I could not find answers to some questions, so I thought that someone on these forums might be able to help.
              >>
              >> 1) Can two or more web applications share code? Or, in other words, can a web application use classes that do not belong to it? If yes, where should these classes reside?
              >
              >> I tried sharing the code to get a database connection and the Class.forName("weblogic.jdbc.pool.Driver") instruction fails with the error ClassNotFoundException: weblogic/jdbc/pool/Driver.
              >
              >Set your weblogic.class.path correctly and it will work. Look at the shell/bat scripts supplied with the server distribution.
              >
              >> 2) Can two web applications cooperate? Or, in other words, can one web application use services provided by another web application (like servlets, .jsp pages, images, etc.)?
              >
              >Yes, use RequestDispatcher and the correct path.
              >
              >> I tried linking to a servlet in a web application from another web application and got the error NoClassDefFoundError: javax/servlet/http/HttpServletRequest.
              >
              >That's a CLASSPATH/weblogic.class.path issue.
              >
              >> 3) If two web applications can cooperate, can they still cooperate if they reside on two different machines? Or even two different clusters?
              >
              >If webapps A and B are on different machines (VMs), your webapp A can use sendRedirect() to have the client go to webapp B or read B's output stream and proxy it back to the client. Look at
              >java.net.HttpURLConnection if you want to use the latter method. Your webapp A would be no different from the browser or any other HTTP client when talking to webapp B.
              >
              if you go from webapp A to webappB, how do you maintain session state (without saving it in a database) ?
              >Cheers,
              >
              >Alex
              >
              

  • Simple java/mysql database application question about triggers

    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    thanks for your response

    lduren wrote:
    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    It doesn't have anything to do with java at that point.
    When you execute, for example, an insert statement, then the database executes that statement. The database (not java, not the driver) decides with that statement is complete. Control returns to java when the database decides that execution is complete.
    And except for tricks that one might do (or attempt to do) via SQL or triggers then when the statement execution finishes then everthing has completed running.

  • Wrong path and application in registry protocol\stdFileEditing\Server ?

    Hi
    How come there is a wrong path in registry is it a security issue, error or just values not in use anymore ?
    I check via regedit: HKEY_CLASSES_ROOT the key .pdf points to
    AcroExch.Document the key curver points to AcroExch.Document.7
    Under this i check
    HKEY_CLASSES_ROOT\AcroExch.Document.7\protocol\StdFileEditing\server
    the value is
    "C:\Program Files\Adobe\Reader 9.0\Acrobat\Acrobat.exe" (Acrobat catalog and the exe file is not existing)
    but in my filesystem the real path is
    C:\Program Files\Adobe\Reader 9.0\Reader
    and i think the program should be AcroRd32.exe instead
    When I have corrected the key an update would reverse it to the old not existing value
    So could anyone tell me why i se this behaviour ?
    Regards
    SEJ

    Hi Frank,
    How did you call the application in a war?
    Regards,
    Violeta

  • File path for application server file

    Hi All,
                 I have a file 'abc.doc' stored on the application sever.
                I want to crate a document using the BAPI_DOCUMENT_CREATE and store this file
                What is the file path that I need to pass into the bapi.
    Please help
    Warm Regards
    Sunil Kumar.

    Hello Sunil
    You are right. That's the file path you should specify. It looks like your application server is running on UNIX platform. You can use transaction AL11 to locate your file and specify the file path in normal unix format. If this doesnt work, you can try prefixing your file path with "file:// ".
    Cheers
    Anand

  • Wrong path to application

    Hello,
    i try to call a application in a war (which is in an ear); but the path the server take is the wrong one. he always take:
    D:\usr\sap\P64\JC00\j2ee\cluster\server0\apps\sap.com\com.sap.engine.docs.examples\servlet_jsp\_default\root\...
    Can i change this?
    Thanks,
    Frank

    Hi Frank,
    How did you call the application in a war?
    Regards,
    Violeta

  • Default file path on application server ?

    Can you tell me what is the file path of the file 'dataset' in the below code? I think it is stored in application server but not sure of the path. Is there any default path for such things?
    Thank you very much!
    report Z_test_BDC1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record,
    data element: KUN16
            KUNNR_001(016),
    data element: KTOKD
            KTOKD_002(004),
    data element: NAME1_GP
            NAME1_003(035),
    data element: SORTL
            SORTL_004(010),
    data element: ORT01_GP
            ORT01_005(035),
    data element: LAND1_GP
            LAND1_006(003),
    data element: SPRAS
            SPRAS_007(002),
    data element: PSTLZ
            PSTLZ_008(010),
    data element: LZONE
            LZONE_009(010),
          end of record.
    End generated data section ***
    start-of-selection.
    perform open_dataset using dataset.
    perform open_group.
    do.
    read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPMF02D' '0107'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02D-KTOKD'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02D-KUNNR'
                                  record-KUNNR_001.
    perform bdc_field       using 'RF02D-KTOKD'
                                  record-KTOKD_002.
    perform bdc_dynpro      using 'SAPMF02D' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KNA1-SORTL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'KNA1-NAME1'
                                  record-NAME1_003.
    perform bdc_field       using 'KNA1-SORTL'
                                  record-SORTL_004.
    perform bdc_field       using 'KNA1-ORT01'
                                  record-ORT01_005.
    perform bdc_field       using 'KNA1-LAND1'
                                  record-LAND1_006.
    perform bdc_field       using 'KNA1-SPRAS'
                                  record-SPRAS_007.
    perform bdc_field       using 'KNA1-PSTLZ'
                                  record-PSTLZ_008.
    perform bdc_dynpro      using 'SAPMF02D' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KNA1-LZONE'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'KNA1-LZONE'
                                  record-LZONE_009.
    perform bdc_transaction using 'VD01'.
    enddo.
    perform close_group.
    perform close_dataset using dataset.

    FORM OPEN_DATASET USING P_DATASET.
      OPEN DATASET P_DATASET
                   FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF SY-SUBRC <> 0.
        WRITE: / TEXT-E00, SY-SUBRC.
        STOP.
      ENDIF.
    ENDFORM.
    Thanks Ashish.

  • Report Path in Application Server

    Can we have multiple paths for .rfd files in Application server 9ias? Actually we have two separate applications. We wanted to keep .rdf files in separate folders on app server. Is there a way when we run one application, it should check rdf files from one folder and for second application, check from second folder.
    Thanks

    Hi,
    This is possible in Reports9i patch 1 onwards. You can use a feature called Dynamic Environment Switching. You can define 2 environments in the Reports Server Config file (each with a different REPORTS_PATH). At runtime, you have to specify the ID that identifies your environment. Pl see Patch 1 (or later) release notes:
    http://otn.oracle.com/documentation/reports.html
    Navneet.

Maybe you are looking for