Custom index.html

Custom index.html

3
NewbieNewbie
3

    18:48 - 13 days ago#1

    How (if it's possible) can I set up the Tool Configuration to use Firefox to navigate to a local custom index.html file where a JavaScript script can re-format the active document that is showing in UltraEdit?

    In other words, "C:\Program Files\Mozilla Firefox\firefox.exe" "C:\Users\XXXXXX\Documents\My Projects\MyTest2\index.html" is my entry in the Tool Configurator but how/where does the active document come into play?

    I've tried "C:\Program Files\Mozilla Firefox\firefox.exe" "C:\Users\XXXXXX\Documents\My Projects\MyTest2\index.html" "%f" but the trailing %f argument seems to be ignored as I assume the Command line is limited to only a single argument?

    I've also tried running a bat file (Firefox.bat) which consists of the executable and the html file: "C:\Program Files\Mozilla Firefox\firefox.exe" "C:\Users\lakej\Documents\My Projects\MyTest2\index.html" and then adding the "%f1" as the argument but, again, am not sure how to bring the active document into play.

    Thanks for any help!

    jimclake

    6,633551
    Grand MasterGrand Master
    6,633551

      20:14 - 13 days ago#2

      Mozilla Firefox interprets both arguments as urls of files to open in Firefox. It is possible to append to the file name of the local file the fully qualified file name of the active file which a JavaScript inside the local HTML file reads from the url. The character ? is usually used in a url to append arguments to interpret on server side which means in your case by your PC which is the server in this case. But the JavaScript is run by Firefox in a sandbox. It does not allow accessing local files for reading or writing them by the script code.

      There can be coded an UltraEdit script which can be run on the active file from within UltraEdit. Another possibility is installing Node.js and run with a user tool node.exe with a local JavaScript file with the file name of active file as argument for this local JavaScript file. Node.js makes it possible that the interpreted JavaScript file with the Node.js extension access local files for reading or writing data from/to the file.

      Please read the XY problem. I think it would be better when you explain what you want to do with the active file opened in UltraEdit. What should be done with that file?
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        21:30 - 12 days ago#3

        Thanks, Mofi.

        What I'm trying to do is manipulate/format the active file that is opened in UE with a web app (JavaScript) that will be included/embedded in the index.html file.

        6,633551
        Grand MasterGrand Master
        6,633551

          11:38 - 12 days ago#4

          The task description and your environment is still not clear enough for me to be able to help you.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            17:19 - 12 days ago#5

            No problem, Mofi - you already did help!

            I looked in other forum questions and answers and found an interesting one where you came up with a BAT file (CopyFileOrFileList.bat) that takes the active document (%f1) and copies it to another location where it can be used in other apps - close enough to what I need that I know have a specific location and file name that I can use pretty much anywhere I need to use it.

            Thanks!