Tapatalk

How to define a "popup input box" before running a tool ?

How to define a "popup input box" before running a tool ?

3
NewbieNewbie
3

    Apr 11, 2008#1

    We are using the "tool configuration" option to run a batch file which deploy the selected pl/sql file on the database.

    The command line for this tool is : D:\MyPath\deploy.bat %n

    The batch file includes the whole database connection settings (user/pass@schema).
    Is it possibe to set the connection settings in a "popup input box" with a OK/Cancel option before runnig the batch file ?

    Thanks for your help
    Joggi
    Currently using: UE12.10a(English edition). Windows XP SP2 (32Bit)

    236
    MasterMaster
    236

      Apr 11, 2008#2

      I'm not sure from your description if the command line parameter %modify% would work for you. This allows you to edit the command line before actually running it.

      Or do you need to automatically edit the batch file itself that you're about to run, just before you run it?

      3
      NewbieNewbie
      3

        Apr 11, 2008#3

        I know the %modify% option but for me it is not a real solution.
        I use it when I commit files into the cvs repository: cvs commit -m %modify% %N%E.
        The problem is that when you are using the %modify% option you see the completely
        command line data like: "D:\MYPathIsVeryVeryLong\AndIHaveToFindTheModifyPlaceInTheInputbox\test.bat MyFile.sql
        in the input box.

        I want just input the database login/connection data into the input box and "give it" to the batch file.
        But editing the batch file before I run it is also a good idea, but I still need the "input box" for setting the database connections.

        Thanks
        Joggi
        Currently using: UE12.10a(English edition). Windows XP SP2 (32Bit)

        262
        MasterMaster
        262

          Apr 11, 2008#4

          You write nothing about which UE version you use, but if it is UE13 or higher you could use a script.

          The script command for "popup info box" is
          var myToolParms = UltraEdit.getString("Enter tool parms",1);

          In the thread "Open UCL from script" there is an example on how to invoke a user tool with parameters set in the script itself. Integrate UltraEdit.getString into this. I'm not gonna create a working example as I do not know if it at all is relevant if you are using a pre UE13 version.

          3
          NewbieNewbie
          3

            Apr 11, 2008#5

            Sorry, you are right I forget to specify the UE version which is 12.10a.
            Currently using: UE12.10a(English edition). Windows XP SP2 (32Bit)

            6,685587
            Grand MasterGrand Master
            6,685587

              Apr 13, 2008#6

              It would be possible to run a tool with a macro and use macro command GetString for the optional parameters. The problem is that the macro engine does not support variables. The string entered in the dialog is inserted at the current cursor position into the active file and this will be not what you want. Also you need to select the entered string and run the tool with command line parameter %sel%. So this solution is not really practicable.

              What about entering the optional parameters in the batch file itself?

              You could run the batch file with option "Show DOS Box" enabled in the tool configuration.

              Inside the batch file use following:

              set userpw=
              set /p userpw=Enter user name and password:

              to be able to enter the user name and the password and apply it to environment variable userpw which you can use further.
              Best regards from an UC/UE/UES for Windows user from Austria