|
|
|||||||
Hi, I can't seem to use the SetFocus command to set the focus to the DOS window that is running my kix script. Return code is 1407 I believe, so it's clearly not working. Is it actually possible to do this? Thanks |
||||||||
|
|
|||||||
What does your setfocus line look like? What is the name of console window? You can title your window with something specific by using start "My Console Window" %comspec% |
||||||||
|
|
|||||||
What Allen said. You will get a 1407 error if SetFocus() cannot find a window matching your "Title" string. |
||||||||
|
|
|||||||
It's only a little test script at the moment just to see if the theory was possible, the script is just: Break on While 1 ? "Repeating lines of text" $x = SetFocus ("C:\Scripting\KIX32") ? $x Loop Exit the script is stored on my c: drive in a folder called "scripting" thanks |
||||||||
|
|
|||||||
Please see the manual or the following page... http://www.scriptlogic.com/Kixtart/htmlhelp/Functions/setfocus.htm Its the title of the window you need to give it, not the executable. |
||||||||
|
|
|||||||
Without trying to be too pedantic a) i couldn't have known about the command without having read the manual and b) i quote "If there is no exact match, any application whose title string begins with 'title' is activated." My window title appeared to be "c:\scripting\kix32.exe testkix.kix" hence why i searched for just the first half or so of the title string. Still i understand what you're saying and will give the 'start' command a go. |