Jump to content

Recommended Posts

Posted

I want to run an EXE (which opens a dos window), but Instead of the window title being the location ofthe file, I want it to be preset.

The problem I am having is that WinGetTitle only seems to work with Windows windows and not DOS windows, if that makes any sense.

Posted

so to run a dos exe in a specific titled dos window would be

Run("cmd /K title This title is OWNED")

ControlSend("This title is OWNED", "", "", "whatever.exe")

ControlSend("This title is OWNED", "", "", {ENTER}

like that?

  • Moderators
Posted

Run(@ComSpec & ' /K title this is owned|dir[b][color=#FF0000]"[/color][/b])
Look at the ending quote there Gary :D ....

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Run(@ComSpec & ' /K title this is owned|dir')

Edit: fixed quotes

I'm sorry but I cannot get to my destination with the information given. I don't have any idea what the help file istalking about with @comspec.

Here's what I need.

create the variable that holds the directory location of the exe. (This I can do)

Run the DOS program (path in a variable) in a window and title that window something specific.

Send '1' to that window

Send ENTER to that window

close that window.

it's not a built in dos command like DIR or COPY.

The exe command is going to have a %1 too, it will be like:

testing.exe > c:\output.txt

When I try to change compspec to anything I need it doesnt work and opens a new window

Posted

If an exe spaws an arbitrary DOS window or two (such as Ghost32 8.0 or DOSBox), there should either be a way to set the title--or the help file should document the limitation.

When I just tested now, I was always able to set the title of DOS windows....

Remember that WinSetTitle has three parameters:

;WinSetTitle($oldTitle, $text, $newTitle)

WinSetTitle("C:\Windows", "", "My New Title")

It could also be that the window title begins with some invisible charatcter, so also try putting

Opt("WinTitleMatchMode", 2) at the top of your script.

You can also see if WinExists(..... and similar functions are able to detect the DOS window.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...