Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: default language (syntax) for new files #23868
    kenny
    Participant

    worked like a charm.
    thanks for the prompt reply.

    in reply to: Setting Configuration for active docket via macro #7448
    kenny
    Participant

    Works beautifully.

    thanks again for prompt and accurate replies.

    in reply to: macro to execute external tool with prompts #7293
    kenny
    Participant

    OK, I have it now. Many thanks for your help

    Missed a set statement.
    code should have been
    sServer = prompt(“Enter Server”, “MyServer”)
    sDatabase = prompt(“Enter Database”, “MyDB”)
    sFileName = “MyFile.txt”
    sCmdline = “-w””2000″” -S””” + sServer + “”” -E -d””” + sDatabase + “”” -n -t28800 -I -i””” + sFileName + “”””

    set wsh = CreateObject(“WScript.Shell”)
    set wExec = wsh.exec(“osql.exe ” + sCmdline)

    OutputBar.Visible = true
    OutputBar.SetFocus()
    OutputBar.writeln(“——–“)
    OutputBar.write(wExec.StdOut.ReadAll())
    OutputBar.write(wExec.StdErr.ReadAll())

    in reply to: macro to execute external tool with prompts #7292
    kenny
    Participant

    I’m getting somewhere, but not quite there yet.
    Using vb rather than jscript [code below]
    It doesn’t seem to like the ReadAll lines.
    I can’t find any reference to this in the help file. Maybe I should be looking at some vbscript references instead.

    Any thoughts?

    sServer = prompt(“Enter Server”, “MyServer”)
    sDatabase = prompt(“Enter Database”, “MyDB”)
    sFileName = “MyFile.sql”
    sCmdline = “-w””2000″” -S””” + sServer + “”” -E -d””” + sDatabase + “”” -n -t28800 -I -i””” + sFileName + “”””

    set wsh = CreateObject(“WScript.Shell”)
    wExec = wsh.Run(“osql.exe ” + sCmdline)

    OutputBar.Visible = true
    OutputBar.SetFocus()
    OutputBar.writeln(“——–“)
    OutputBar.write(wExec.StdOut.ReadAll())
    OutputBar.write(wExec.StdErr.ReadAll())

    in reply to: macro to execute external tool with prompts #7289
    kenny
    Participant

    OK, I can see how I could get this working, but it’s not calling one of the configured external tools [i.e. tools menu -> external tools].

    This is still OK, but can I capture the output of WshShell.Run( “app.exe”, sCmdline ); ?

    in reply to: macro to execute external tool with prompts #7286
    kenny
    Participant

    For this purpose, you will need to write a macro. External Tools currently cannot include a user interface to input parameters.

    Thanks for the reply, but what I’m asking is how to write this macro. I can see hpow to execute an external tool from a macro, but I can’t see how to pass parameters to it in a macro.

Viewing 6 posts - 1 through 6 (of 6 total)