scythetleppo Posted June 15, 2006 Share Posted June 15, 2006 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. Link to comment Share on other sites More sharing options...
nfwu Posted June 15, 2006 Share Posted June 15, 2006 Run("cmd /K title This title is OWNED") #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
scythetleppo Posted June 15, 2006 Author Share Posted June 15, 2006 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? Link to comment Share on other sites More sharing options...
GaryFrost Posted June 15, 2006 Share Posted June 15, 2006 (edited) Run(@ComSpec & ' /K title this is owned|dir') Edit: fixed quotes Edited June 15, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 15, 2006 Moderators Share Posted June 15, 2006 Run(@ComSpec & ' /K title this is owned|dir[b][color=#FF0000]"[/color][/b])Look at the ending quote there Gary .... 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. Link to comment Share on other sites More sharing options...
scythetleppo Posted June 15, 2006 Author Share Posted June 15, 2006 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted June 15, 2006 Share Posted June 15, 2006 doesn't have to be a built in command, just using a standard window command as example i.e. Run(@ComSpec & ' /K title this is owned') WinWaitActive('this is owned') Send("dir{ENTER}") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
CyberSlug Posted June 15, 2006 Share Posted June 15, 2006 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 puttingOpt("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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now