bunny123 Posted December 1, 2006 Share Posted December 1, 2006 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 More sharing options...
i386 Posted December 1, 2006 Share Posted December 1, 2006 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 youIt 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 Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 1, 2006 Share Posted December 1, 2006 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 youProbably, 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 More sharing options...
bunny123 Posted December 1, 2006 Author Share Posted December 1, 2006 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 More sharing options...
Developers Jos Posted December 1, 2006 Developers Share Posted December 1, 2006 (edited) Try replacing WinWaitActive() with WinWait().. Mouseclick's won't work ... you will have to use Control functions .. Edited December 1, 2006 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 More sharing options...
mikehunt114 Posted December 1, 2006 Share Posted December 1, 2006 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 More sharing options...
AcidCorps Posted June 4, 2007 Share Posted June 4, 2007 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 Link to comment Share on other sites More sharing options...
McGod Posted June 4, 2007 Share Posted June 4, 2007 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 [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
AcidCorps Posted June 5, 2007 Share Posted June 5, 2007 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 More sharing options...
herewasplato Posted June 5, 2007 Share Posted June 5, 2007 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-90Go 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 More sharing options...
AcidCorps Posted June 5, 2007 Share Posted June 5, 2007 ok sorry, thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now