MrM Posted September 18, 2005 Share Posted September 18, 2005 hey there im new here srtarted using autoit 2 days ago and like very much i have 2 problems: 1. i need to get all the ips used in a certain port, i didnt find a function for that, thought of using dos 'netsat -n | find "port" ' but the only function i found the manual was _RunDOS($sCommand) (in my case: _RunDOS('netstat -n | find "4000"'') and it return 0, no array not anything else , just a zero. also, in the manual its not writen how to use that function. if using that function is not possible for that purpose, how can i do it? 2. autoit doesnt recotnize text inside comuter games, this particular thing is very importante to me, is there a way to make it see text in games? and the question: is it possible to do things in inactive windows with autoit? like keystrokes, mouse moves/click and all there is to do with recotnizing text and pixel colors? (i realy hope for a positive answer ) Link to comment Share on other sites More sharing options...
jefhal Posted September 18, 2005 Share Posted September 18, 2005 i need to get all the ips used in a certain portnetstat -n | find "4000"'')Here it is:#include <Constants.au3> dim $PID, $cmdOUT $PID = Run(@comspec & ' /c ' & 'netstat -n | find ' & '"4000"', "","", $STDOUT_CHILD) ;MsgBox(1,"PID=",$PID) While NOT @ERROR $cmdOUT &= StdoutRead($PID) Wend if StringInStr($cmdOUT,"ESTABLISHED") <> 0 Then MsgBox(1, "netstat results:", $cmdOUT) else MsgBox(1, "netstat results:", "Port not found") Exit EndIf Exit ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
therks Posted September 18, 2005 Share Posted September 18, 2005 Jef, just out of curiousity, why did you format that string like this? 'netstat -n | find ' & '"4000"' You didn't need to seperate with the &. 'netstat -n | find "4000"' My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
LxP Posted September 19, 2005 Share Posted September 19, 2005 Welcome to the forums! 2. autoit doesnt recotnize text inside comuter games, this particular thing is very importante to me, is there a way to make it see text in games? Games don't use standard Microsoft controls. If you can manipulate your game to copy text to the clipboard then you could read it using ClipGet(). You may also wish to search the forums for 'OCR'. is it possible to do things in inactive windows with autoit? like keystrokes, mouse moves/click and all there is to do with recotnizing text and pixel colors? (i realy hope for a positive answer )Positive! Check out the ControlSend(), ControlClick(), WinGetText() and ControlGetText() functions. I believe that there are also a few pieces of code in the Scripts and Scraps forum that could help you find pixel colours on minimised/hidden windows, but don't quote me on that. Link to comment Share on other sites More sharing options...
Valuater Posted September 19, 2005 Share Posted September 19, 2005 and the question:is it possible to do things in inactive windows with autoit? like keystrokes, mouse moves/click and all there is to do with recotnizing text and pixel colors? (i realy hope for a positive answer )check this outhttp://www.autoitscript.com/forum/index.ph...ic=7112&hl=bot#hope it helps8) Link to comment Share on other sites More sharing options...
jefhal Posted September 19, 2005 Share Posted September 19, 2005 Jef, just out of curiousity, why did you format that string like this?I'm the same way with commas. If two are good, six must be better! Also, it was late at night and it worked that way, so I posted and retired... I appreciate the + feedback and will eschew surplusage in the future... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
MrM Posted September 19, 2005 Author Share Posted September 19, 2005 ty all! jefhal, in the script u gave me, the function StdoutRead() is not recotnized by compiler, and search thrue manual gave no results... Link to comment Share on other sites More sharing options...
LxP Posted September 19, 2005 Share Posted September 19, 2005 You'll need to download and install the beta version. Link to comment Share on other sites More sharing options...
Uten Posted September 19, 2005 Share Posted September 19, 2005 Seems to work on my w2k sp4 with the autoit beta 3.1.1.75. The function StdoutRead is also documented in the beta help file..) Best Regards Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
jefhal Posted September 19, 2005 Share Posted September 19, 2005 ty all!jefhal, in the script u gave me, the function StdoutRead() is not recotnized by compiler, and search thrue manual gave no results...MrM- Save this link in three places (favorites, on a piece of paper, on the back of your hand). It's a link I go to every time I need to remember where to find the beta code and how to install it correctly: http://www.autoitscript.com/autoit3/scite/...nstallation.htm (hyperlink function broken in forum editor)I forgot to mention that you would need beta code...My apologies... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
MrM Posted September 19, 2005 Author Share Posted September 19, 2005 gosu^^ tx man Link to comment Share on other sites More sharing options...
MrM Posted September 21, 2005 Author Share Posted September 21, 2005 hkmm it doesnt work, i change to beta and press update and it stay on the non-beta version... 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