Jump to content

autoit will be stop when click the other windows


Recommended Posts

Hello

I write one autoit script, it is used to install one software automatically.

When I run the autoit script,  I find it will stop temporarily if I click the other windows or I change my desktop to  remote desktop.

I need to active it by focus on the autoit script windows again.

 

So, if it mean I need to do nothing  when run the autoit script?? I can't click the other windows and I can't switch to the other remote desktop

Link to comment
Share on other sites

I think I have told you that  the shortcut can't been created on the desktop and startmenu if I install the software by "setup.exe -i silent"

I try to install the software on windows7 and windows10, but the shortcut can't be created on both of the two OS

The software is built by Installanywhere2008

 

Can you tell me how to install the software by command way?

Link to comment
Share on other sites

By the way:

Your slang has made me very uncomfortable. I have encountered problems that cannot be solved therefore I ask questions here.
It seems that there is no consumption of public resources.
Link to comment
Share on other sites

6 hours ago, qiong said:

It seems that there is no consumption of public resources.

This is where you got all wrong.  Ppl take time to read your threads and respond to it.  But you don't listen.  You should have check how to create a desktop shortcut.  It is a single line of code !!!

Link to comment
Share on other sites

i know the answer to this post. take a look at the fragments of script, it does not use any ControlClick or any controls based control, it's all just Send.

so, that is why when you activate another window while it's running, it doesn't work--but this is based on what I saw in the other threads since he won't show the full script

OP use the code tags and post your code inside them, the <> button, click it, and dump your code in there. maybe someone can help

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

1.thumb.png.2f07725f802052a449a45d3ea68f3b37.pngSorry, for autoit3, I am a new, rookie, and I am not a developer. I am just an IT staff.
I don’t understand what you mean by using the command line. It’s not that I don’t follow what you said, but I completely can't understand what the command line means.
Is it right to use "setup -i install"? It is like a group of college students discussing with a primary school student what is C and what is java.
First of all, I have to understand then I can follow with you. 
For example, " You should have check how to create a desktop shortcut. It is a single line of code !!! " What is a line of code? How to write this code, where to write it, and in which way? ?
Yes, the horse can’t see the water and how do you let him drink?
I know that my question is like 1+1 is equal to ?. I hope that you will not be ridiculed. This forum does not limit the novices to ask questions, right?
 
The code
Run("setup.exe")
WinWaitActive("Winpower")
Send("!n")
$hWnd = WinGetHandle("[ACTIVE]");
$ret = DllCall("user32.dll", "long", "LoadKeyboardLayout", "str", "08040804", "int", 1 + 0)
DllCall("user32.dll", "ptr", "SendMessage", "hwnd", $hWnd, "int", 0x50, "int", 1, "int", $ret[0])
Send('nh')

WinWait("Check Previous Version","",5)
If WinExists("Check Previous Version","") Then
  Send("{Enter}")
  WinWaitActive("Save Configuration")
  Send("{TAB}")
  Send("{Enter}")
  Sleep(70000);
EndIf

WinWaitActive("Winpower")
Opt ("SendKeyDelay", 100);
Send("{TAB}")
Send("511C1-01220----")
Send("!n")
WinWaitActive("Winpower")
Send("!n")
WinWaitActive("Winpower")
Send("!n")
WinWaitActive("Winpower")
Send("!i")
WinWaitActive("Winpower")
Send("!d")
Sleep(25000)
WinClose("Winpower")

I want to use " ControlClick", but I can't get any control

Link to comment
Share on other sites

8 hours ago, qiong said:

You should have check how to create a desktop shortcut. It is a single line of code !!!

Ok I am going to give you the 2 lines of code that will replace all of yours (untested of course) :

RunWait ("setup.exe -i silent")
FileCreateShortcut ("Your full path to winpower.exe", @Desktop & "\WinPower.lnk", "Your full path to working directory")

Now you will need to adjust those 2 lines to fit the installation location directory.

Link to comment
Share on other sites

11 hours ago, qiong said:
Sorry, for autoit3, I am a new, rookie, and I am not a developer. I am just an IT staff.
 

Wait - let me get this right. You are IT staff yet you don't know what command line is? 

Google is your friend. https://www.computerhope.com/jargon/c/commandi.htm

Link to comment
Share on other sites

you can't get any controls because this is a stupid installer created with java... lol, god I hate you java

best to use the silent install options because the OP has no chance at doing this otherwise.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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