gagaga Posted November 8, 2008 Share Posted November 8, 2008 (edited) Hi, I was wondering why controlsend doesnt work in my script:$Wait = 400AutoItSetOption("WinTitleMatchMode", 4)$Win_Title = "WordPad"$Win_Text = ""$Control_ID = "59648"Sleep($Wait)ShellExecute("webproxies.txt")WinWaitActive("WordPad") $variable = "http://www."$variable2 = "{DOWN}"$variable3 = "{HOME}"$x = 0doControlSend($Win_Title, $Win_Text, $Control_ID, $variable)Sleep($Wait)ControlSend($Win_Title, $Win_Text, $Control_ID, $variable2)Sleep($Wait)ControlSend($Win_Title, $Win_Text, $Control_ID, $variable3)$x += 1until $x = 5Im new to autoit , tried to search for answer but couldnt findthanks, Edited November 8, 2008 by gagaga Link to comment Share on other sites More sharing options...
Pain Posted November 8, 2008 Share Posted November 8, 2008 This works for me. AutoItSetOption("WinTitleMatchMode", 2) ControlSend("WordPad", "", "RICHEDIT50W1", "hello world") Link to comment Share on other sites More sharing options...
oMBRa Posted November 8, 2008 Share Posted November 8, 2008 (edited) just replace this: $Control_ID = "59648" with: $Control_ID = 59648 Edited November 8, 2008 by oMBra Link to comment Share on other sites More sharing options...
gagaga Posted November 8, 2008 Author Share Posted November 8, 2008 Thanks, but those didnt work. any help? Link to comment Share on other sites More sharing options...
oMBRa Posted November 8, 2008 Share Posted November 8, 2008 do u get any errors?? btw I post the code with the replacement: $Wait = 400 AutoItSetOption("WinTitleMatchMode", 4) $Win_Title = "[Class:WordPadClass]" $Win_Text = "" $Control_ID = 59648 Sleep($Wait) ;ShellExecute("webproxies.txt") WinWaitActive($Win_Title) $variable = "http://www." $variable2 = "{DOWN}" $variable3 = "{HOME}" $x = 0 do ControlSend($Win_Title, $Win_Text, $Control_ID, $variable) Sleep($Wait) ControlSend($Win_Title, $Win_Text, $Control_ID, $variable2) Sleep($Wait) ControlSend($Win_Title, $Win_Text, $Control_ID, $variable3) $x += 1 until $x = 5 Link to comment Share on other sites More sharing options...
Bowmore Posted November 8, 2008 Share Posted November 8, 2008 Thanks, but those didnt work. any help? Another variation that should work for you. $Wait = 400 AutoItSetOption("WinTitleMatchMode", 4) $Win_Title = "[REGEXPTITLE:WordPad]" $Win_Text = "" $Control_ID = 59648 Sleep($Wait) ShellExecute("webproxies.txt") WinWait($Win_Title) If Not WinActivate($Win_Title) Then WinActivate($Win_Title) WinWaitActive($Win_Title) $variable = "http://www." $variable2 = "{DOWN}" $variable3 = "{HOME}" $x = 0 do ControlSend($Win_Title, $Win_Text, $Control_ID, $variable) Sleep($Wait) ControlSend($Win_Title, $Win_Text, $Control_ID, $variable2) Sleep($Wait) ControlSend($Win_Title, $Win_Text, $Control_ID, $variable3) $x += 1 until $x = 5 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
JReinn Posted November 8, 2008 Share Posted November 8, 2008 I also have this problem, but none of these codes work for me .. (I actually want it to say something in Warcraft 3 (The window is named "Warcraft III")) Any help ? Link to comment Share on other sites More sharing options...
oMBRa Posted November 9, 2008 Share Posted November 9, 2008 you are lucky... I play warcraft III to... tell me your account and server and we can talk directly Link to comment Share on other sites More sharing options...
JReinn Posted November 9, 2008 Share Posted November 9, 2008 you are lucky... I play warcraft III to... tell me your account and server and we can talk directlyWinneR_DK on northrend, but I think it would be easier to do it on MSN, jan@pixiehouse.com 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