Sign in to follow this  
Followers 0
bunny123

background execuation?

11 posts in this topic

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

Share this post


Link to post
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.


"...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." -Mozart_ONLINECheck out this free 1 GB FTP website at DriveHQ.com. You can control the users and even publish a website for free!![s]Your-Start.com - A online website that you can customize to hold all you links, news information, and other website info.[/s]

Share this post


Link to post
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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try replacing WinWaitActive() with WinWait()..

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

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

ok well what I want to do to make it easier is include a product key in the cmd switch. for example

Setup.exe /Key 1234-5678-90

it will start my script "/key" and have 1234-5678-90 set as $cdkey

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

ok sorry, thank you

Share this post


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
Sign in to follow this  
Followers 0