Jump to content

background execuation?


 Share

Recommended Posts

HI,

I need to automate a execuation progress, i.e. fill out user id, passwd, click the menu, button, ..... right now, I can run it visually. My question, can I run it at the background? When I minimize the window, everything messed up.

Please advise.

Thank you

Link to comment
Share on other sites

HI,

I need to automate a execuation progress, i.e. fill out user id, passwd, click the menu, button, ..... right now, I can run it visually. My question, can I run it at the background? When I minimize the window, everything messed up.

Please advise.

Thank you

It all depends on what you have to do. Also, if you could post the part of the script that is causing you problems or all of it then I am sure you would get faster support and help.

Spoiler

 

"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor

"Mess with the best, die like the rest!!" -Hackers

"This above all to thine own self be true." -William Shakespeare

"Corruption is only as corrupted as the individual makes it out to be." -i386

 

style7,AutoIt.png

 

 

Link to comment
Share on other sites

HI,

I need to automate a execuation progress, i.e. fill out user id, passwd, click the menu, button, ..... right now, I can run it visually. My question, can I run it at the background? When I minimize the window, everything messed up.

Please advise.

Thank you

Probably, can you give more specific info? Otherwise look at the Control* and Win* commands I guess.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

The script is quite simple. just some activities,

run("C:\Program Files\WinSCP3\WinSCP3.exe")

WinWaitActive("WinSCP Login")

ControlSend("WinSCP Login","","TEdit2","ipadd")

ControlSend("WinSCP Login","","TEdit1","userid")

ControlSend("WinSCP Login","","TPasswordEdit1","passwd")

ControlClick("WinSCP Login","","TButton20")

WinWaitActive("userid - userid@ipaddr - WinSCP")

After log in, i use mouseclick event to move mouse to the certain point to click some folder, it works when window opening, but when i minimize the window, even cannot log in. Do I have to run it on the window.

Please advise

Link to comment
Share on other sites

  • Developers

Try replacing WinWaitActive() with WinWait()..

Mouseclick's won't work ... you will have to use Control functions ..

Edited by JdeB

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 comment
Share on other sites

The Control* commands will all work while the window is minimized. If you use the same sort of commands to run the rest of your script it should work fine. Post the whole script as well as console output to tell us where your script is hanging.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

  • 6 months later...

script.exe /key 1234-5678-90

In your script, you can use

$CmdLine[0] = 2

$CmdLine[1] = "/key"

$CmdLine[2] = "1234-5678-90"

$CmdLine is generated with the switches

Link to comment
Share on other sites

i need the reverse of what you just did, so that i don't need to supply a cd key with it.

The user would type into the cmd window Setup.exe /Key 1234-5678-90

and the script will run Setup.exe and set $cdkey = 1234-5678-90

Link to comment
Share on other sites

i need the reverse of what you just did, so that i don't need to supply a cd key with it.

The user would type into the cmd window Setup.exe /Key 1234-5678-90

and the script will run Setup.exe and set $cdkey = 1234-5678-90

Go to the help file.

Go to the index tab.

Type in command.

Read the info under "Command Line Parameters".

...and you should find that what Chip told you is what you do want.

If you start your script using:

Setup.exe /Key 1234-5678-90

Then when setup.exe runs there will be an array automatically populated as follows:

$CmdLine[0] = 2

$CmdLine[1] = "/key"

$CmdLine[2] = "1234-5678-90"

You can write your script to make use of that special array.

If you must have $cdkey = 1234-5678-90 then

$cdkey = $CmdLine[2]

...enjoy...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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