Jump to content

AutoIt Malfunction While the Window is minimised.

Recommended Posts

Hi All,

I am very new to AutoIT. I am using AutoIT in a test server and I remote connect to the server from my PC.

I have a piece of AutoIt script which works fine when I have the Server window open in my PC.

But when I minimized the Server Window, AutoIT commits mistake by typing ";" instead of typing ":"

Simple example: The script Opens command Prompt and type "D:"

But when the Server window (Scheduled to run the Job) is minimized, it typed "D;" and command prompt could not fund the command ";"

Please Note IT works fine when the Server Window is open in my PC.

I have attached the script for better reference.

#Include <GuiTab.au3>
#Include <File.au3>
ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "D:")
ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "{Enter}")

Link to post
Share on other sites

Send wouldn't work, the window has to be active for Send to work with it.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

Glad I'm not the only one that's having this issue. Same issue but different area/window.  Doesn't seem to happen all the time but when it does it's always in the same spot for me.  I've tried the following 3 options in hopes of not running into this issue randomly but it still get sometimes. 1. ControlSend 2. Send or 3. Clipget/put
Instead of a DOS window that's minimized like yours, mines a dialog box for an Apache install. Basically attempting to choose a custom install path of C:\Apache.

The thing I find interesting is that it's never done this on a physical workstation. It only seems to happen randomly for me while testing on virtual PCs. So in a way i'm also remoted in like you are. Another thing to note, my dialog box isn't minimized but I do have splash image that blocks most views of the installer.  

I would also like to know why AutoIT is sending ; instead of : at times. I can't seem to reproduce it every time in my instance. Curious if it'll do the same for me if I try this on minimized windows on my VM.

Link to post
Share on other sites
  • Developers

Do the applications (Active and Background) have different keyboards defined of different Shift states?

Maybe something to read: 



Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites

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...