kishannepal Posted May 16, 2013 Share Posted May 16, 2013 I have been using autoit for testing my network server...the purpose is to send some numerics from a console window developed in visual studio and check if it is received in another window....i m able to do it by winactivate and send function already but what i want to do is to send the commands without activating the console window such that my test is running in background and m still able to use my system for other works. hav searched for such concept but didnt come across a possible solution...seems like controlsend does the required job but while automating m still unable to write in the console window. i hav been trying to do this since a week now....please if anyone can help me, plz do.....thanks in advance. Link to comment Share on other sites More sharing options...
spudw2k Posted May 16, 2013 Share Posted May 16, 2013 Check out the AutoIt Window Info tool and see what type of control(s) the console uses. You may be able to use ControlSend functions to interact with it. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 16, 2013 Share Posted May 16, 2013 (edited) Or if it's a console window, you would instead launch the process via your script and redirect the standard input and output. This way you can "write" to the input channel, simulating user input. Edited May 16, 2013 by Richard Robertson Link to comment Share on other sites More sharing options...
kishannepal Posted May 17, 2013 Author Share Posted May 17, 2013 (edited) Thanks guys for replying .....the thing is when i use autoit win info tool and see the controls for my window console it doesnt return anything in control tag.....its all blank..... Hello Richard.... launching a process using run(is that what u mean here?) is enough??? i already do that, i can winactivate the console and send the numerics but i want to do the same thing without even seeing the console so that i can use my desktop without hampering my automation?? And i didnt quite understand what u mean by redirect the standard input and output. Edited May 17, 2013 by kishannepal Link to comment Share on other sites More sharing options...
spudw2k Posted May 17, 2013 Share Posted May 17, 2013 (edited) Check out the StdoutRead and StdinWrite functions in the help file. http://www.autoitscript.com/autoit3/docs/functions/StdinWrite.htm That is what RichRob is referring to I believe. edit:This really belongs in the General Help forum, not Dev Chat Someone moved it, thanks Edited May 17, 2013 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
kishannepal Posted May 17, 2013 Author Share Posted May 17, 2013 Local $handle = Run("D:mycoderndmpoc_client.exe","", @SW_show, $STDIN_CHILD + $STDOUT_CHILD) StdinWrite($handle, "1") i m trying to run the above snippet...it is the part of code which i wanna modify for running in minimized condition. First of all m not able to write on my console and secondly my console is designed with Visual studio so i have some text written in the console which one can see immediatly after launching the EXE. BUt while running this way m not even able to see text in my console... Link to comment Share on other sites More sharing options...
spudw2k Posted May 17, 2013 Share Posted May 17, 2013 (edited) I was afraid of that when you mentioned it was made in VS. So just to be sure...when you used the AuInfo tool did you drag the crosshair over the applicatiion? Did it highlight any regions of it? Not insinuating anything here. edit: Was it VS.NET by chance? That's a whole other monster to tackle of which my support stops here. I NO know me some .NET automation. Edited May 17, 2013 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
kishannepal Posted May 17, 2013 Author Share Posted May 17, 2013 (edited) Even i ws wondering if VS has anything to with the complexity m facing. with info tool, I dont think it highlight any region. the background of the console is black so its actually difficult to say if it highlights anything. The info tool returns title, class, size, style,handle and position, in the window sub menu whereas the control sub menu is blank. The result of the info tool is sth similar to what one will obtain when the cross hair is dragged to CMD.exe And thanks for ur quick replies....i really apreciate ur help. Edited May 17, 2013 by kishannepal Link to comment Share on other sites More sharing options...
spudw2k Posted May 17, 2013 Share Posted May 17, 2013 Strange...in that case I would've thought the StdInwrite funcs would've worked. Hard to say without seeing the program. I gotta run, flight to catch. I'll tune in later but hopefully someone else can help. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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