Sign in to follow this  
Followers 0
ljkkda

Controlsend

17 posts in this topic

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?

Share this post


Link to post
Share on other sites



#3 ·  Posted (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 by ljkkda

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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..


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by ljkkda

Share this post


Link to post
Share on other sites

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 ....

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by ljkkda

Share this post


Link to post
Share on other sites

or ist there any other way to send ENTER to a control (without controlsend )

when the window is minimized?

Share this post


Link to post
Share on other sites

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}")

[center]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.[/center]

Share this post


Link to post
Share on other sites

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... :mellow:

usually it cant be done because its a JAVA APPLET WINDOW ??

Share this post


Link to post
Share on other sites

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... :mellow:

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?

[center]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.[/center]

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

I would suggest looking in scripts and scrapts for IE.au3, especially since you are using Internet Explorer.


[center]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.[/center]

Share this post


Link to post
Share on other sites

searched a long time and i found a lot of usefull thinks but...

cant find the right thing fot this in scripts and scrapts

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0