ljkkda Posted March 25, 2006 Posted March 25, 2006 i have a ittle question i use controlsend $window = WinGetTitle("") ControlSend($window, "", "Edit1", "WTF WASN SCHMODDER""{ENTER}", 0) it sends the text only if the window is maximized but not if the window is minimized why?
Developers Jos Posted March 25, 2006 Developers Posted March 25, 2006 Have you checked what the value of $window is in that case ? 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.
ljkkda Posted March 25, 2006 Author Posted March 25, 2006 (edited) yes its the right value if i use this.. $window = WinGetTitle("") ControlSetText ( $window, "" , "Edit1", "funzt oda net?" ) it set the text to that control if minimized or not...!!! but so it can´t send enter... Edited March 25, 2006 by ljkkda
Blue_Drache Posted March 25, 2006 Posted March 25, 2006 yes its the right value if i use this.. $window = WinGetTitle("") ControlSetText ( $window, "" , "Edit1", "funzt oda net?" ) it set the text to that control if minimized or not...!!! but so it can´t send enter... What JedB is getting at, I believe, is ...you're not telling the program WHAT SPECIFIC WINDOW you're trying to get the title from. WinGetTitle("") Returns the active window title (but unreliably). Don't be so general. A better way to write this would be $hwnd_window = WinGetHandle("Untitled - Notepad") ; notice the I tell the program EXACTLY what window I'm going to fool with? ControlSend( $hwnd_window, "" , "Edit1", "funzt oda net?" ) Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Developers Jos Posted March 25, 2006 Developers Posted March 25, 2006 WinGetTitle("") will get the title of the Window which has the focus. Just wanted to confirm that the minimised window title was found... I don't know why ControlSend wouldn't work and ControlSetTExt() would.. 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.
ljkkda Posted March 25, 2006 Author Posted March 25, 2006 (edited) now i use this.$window = WinGetTitle("")$hwnd_window = WinGetHandle( $window ) ; notice the I tell the program EXACTLY what window I'm going to fool with?MsgBox ( 0, "blablabla", $hwnd_window )sleep(6000)ControlSend( $hwnd_window, "" , "Edit1", "funzt oda net? {ENTER}", 0 )but it send only if the window is active again... what can i do my brain hurts^^ Edited March 25, 2006 by ljkkda
Developers Jos Posted March 25, 2006 Developers Posted March 25, 2006 now i use this.but it send only if the window is active again... what can i do my brain hurts^^It works fine with Notepad so cannot replicate your problem .... 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.
BigDod Posted March 25, 2006 Posted March 25, 2006 This works for me Run("notepad") WinWait("Untitled") WinSetState("Untitled -", "", @SW_MINIMIZE) $window = WinGetTitle("Untitled - Notepad") $window = WinGetHandle( $window ) ControlSend( $window, "" , "Edit1", "funzt oda net? {ENTER}") Note - this type of thing will not work with Microsoft Word if it is minimised. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
ljkkda Posted March 25, 2006 Author Posted March 25, 2006 (edited) i want use this on InternetExplorer $window = WinGetTitle("")ControlSetText ( $window, "" , "Edit1", "funzt oda net?" )why is ControlSetText working..$window = WinGetTitle("")ControlSend($window, "", "Edit1", "WTF WASN SCHMODDER""{ENTER}", 0)and why is ControlSend not working.. i dont know! Edited March 25, 2006 by ljkkda
ljkkda Posted March 26, 2006 Author Posted March 26, 2006 or ist there any other way to send ENTER to a control (without controlsend ) when the window is minimized?
Moderators SmOke_N Posted March 26, 2006 Moderators Posted March 26, 2006 or ist there any other way to send ENTER to a control (without controlsend ) when the window is minimized?You have a quote in that ControlSend that gets sent, I don't know if that makes a difference:$window = WinGetTitle("") ControlSend($window, "", "Edit1", "WTF WASN SCHMODDER {ENTER}") Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
ljkkda Posted March 26, 2006 Author Posted March 26, 2006 You have a quote in that ControlSend that gets sent, I don't know if that makes a difference:$window = WinGetTitle("") ControlSend($window, "", "Edit1", "WTF WASN SCHMODDER {ENTER}") it dosnt change anything for me usually this is a bug? i use the last autoit BETA version! but i test with other versions and always the same probem... usually it cant be done because its a JAVA APPLET WINDOW ??
Moderators SmOke_N Posted March 26, 2006 Moderators Posted March 26, 2006 it dosnt change anything for me usually this is a bug? i use the last autoit BETA version! but i test with other versions and always the same probem... usually it cant be done because its a JAVA APPLET WINDOW ??Not that I understood any of that... But are you trying to send this to a broswer window? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
ljkkda Posted March 27, 2006 Author Posted March 27, 2006 yes im trying to send in a broswer window (but has a java icon so its a java window?) i have upload a .jpg file... i want send to the window with java icon Dont foget this: This works but cant send ENTER ControlSetText ( $window, "" , "Edit1", "funzt oda net?" ) This works only if window is maximized NOT IF MINIMIZED ControlSend($window, "", "Edit1", "WTF WASN SCHMODDER {ENTER}", 0)
Moderators SmOke_N Posted March 27, 2006 Moderators Posted March 27, 2006 I would suggest looking in scripts and scrapts for IE.au3, especially since you are using Internet Explorer. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
ljkkda Posted March 27, 2006 Author Posted March 27, 2006 searched a long time and i found a lot of usefull thinks but... cant find the right thing fot this in scripts and scrapts
greenmachine Posted March 27, 2006 Posted March 27, 2006 IE.au3 is here: http://www.autoitscript.com/forum/index.php?showtopic=13398
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