Tapatalk

run project tool at project launch

run project tool at project launch

11
Basic UserBasic User
11

    Feb 18, 2010#1

    Hi
    is it posible to run a project tool automatic when the project is loaded?

    I want to run something similar to the ctags, when ever I open a project?

    rgds
    Cyrex

    6,685587
    Grand MasterGrand Master
    6,685587

      Feb 18, 2010#2

      It is not possible to automatically execute a user or project tool on project load. But you could use not really good workaround.

      It is possible to execute a macro on file open. You could write a macro which executes a user tool when a file with a fixed name is opened. I have never tried it, but I think it is not possible to run the macro on opening of the project file itself. But when you specify in the macro to execute the user tool on opening a file with a fixed name and this file is always automatically opened on project load because it was open on last project close you could get what you want. The macro executed on every file open should have a code like this

      IfNameIs "NameOfFileWithoutExtension"
      RunTool "Case sensitive name of tool"
      EndIf

      I have also another idea - not tested. It is possible to execute ctags on every project open as you already know. But I suppose that UltraEdit does not check if really ctags.exe is executed. At Project - Ctag Options you can specify the full name of ctags.exe, but you can specify also any other EXE or perhaps even a batch file. And UltraEdit surely does not check the "ctags" parameters passed to "ctags.exe". So you can specify in the general ctags option or in the project ctags options also a different parameter string useful for what your tool needs.
      Best regards from an UC/UE/UES for Windows user from Austria

      11
      Basic UserBasic User
      11

        Feb 18, 2010#3

        Hi mofi

        thank you for the answer. What I have made is a Ctags file generator for Languages not supported by Ctags.

        So I sometimes want to run the "real Ctags" and sometimes my home-brew

        Maybe running an intelligent script instead of Ctags, that could derive what it should call the real Ctags, or my Ctags. Can UE pass project name as a parameter to Ctags? Then If I named My projects with hints about the language used in the project?

        Regarding the macro, it can't be run on extensions instead of file names? And the only run once?

        rgds
        Cyrex

        6,685587
        Grand MasterGrand Master
        6,685587

          Feb 19, 2010#4

          In the list of macro commands there is also IfExtIs "php" to execute something if the file extension is PHP in any case. Of course the macro is executed once on EVERY file open. But with IfNameIs or IfExtIs is used on does something only for the certain files.

          At Ctags Options you can specify %fo which is according to help replaced with the full filename/path of the tag file to be created. This would be the tagfile specified in the project, or the Default Tagfile defined above.

          And in the Project Settings dialog you can specify under Optional CTAGS file a project specific tags file passed. So you can run a batch file instead of ctags.exe with first parameter %fo which you evaluate in the batch file with

          if "%1"=="projecttagfile1" goto UseCtags
          if "%1"=="projecttagfile2" goto UseCtags
          if "%1"=="projecttagfile3" goto UseCtags

          :UseMyTagsGenerator

          :UseCtags
          Best regards from an UC/UE/UES for Windows user from Austria