Jump to content

wont write


ljkkda
 Share

Recommended Posts

ok i made this script to write some text in a hided window "($window)" after a specified time... and then go back to the last window where i was active "($window2)" ...

the problem is if i have no window activated (im only on desktop) the script wont write in the window "($window)" !

but if a have any window opened like explorer , txt editor ore something it works...!!

whats wrong here ?.?

$window = WinGetTitle("")

$window2 = WinGetTitle("")

while $window2 = WinGetTitle("")

winactivate ($window)

ControlClick ( $window, "", 1 , "LEFT" , 1 )

send ("SOME TEXT")

send ("{Enter}")

WinSetState($window, "" , @SW_hide)

winactivate ($window2)

sleep (900000)

$window2 = WinGetTitle("")

winactivate ($window)

ControlClick ( $window, "", 1 , "LEFT" , 1 )

send ("SOME TEXT")

send ("{Enter}")

winactivate ($window2)

sleep (900000)

wend

Link to comment
Share on other sites

if i use ControlSend it wont send any text if i opened a window or not

$window = WinGetTitle("")

$window2 = WinGetTitle("")

while $window2 = WinGetTitle("")

winactivate ($window)

ControlSend ( "$window", "", 1, "SOME TEXT" )

WinSetState($window, "" , @SW_hide)

winactivate ($window2)

sleep (900000)

$window2 = WinGetTitle("")

winactivate ($window)

ControlSend ( "$window", "", 1, "SOME TEXT" )

winactivate ($window2)

sleep (900000)

wend

Edited by ljkkda
Link to comment
Share on other sites

ok now i use

ControlSend ( $window, "", 1, "SOME TEXT" )

and it wont send... it send only if i make a mouseclick on the edit box.

the same effect if i use this

ControlSend ( $window, "", "Edit1", "SOME TEXT" )

Edited by ljkkda
Link to comment
Share on other sites

Little question:

Why would you want to write text into random windows? B)

And why do you want to activate a hidden window ( you don't need that with controlsend ) ?

Someting like a textfile would make more sense to me.

Edited by dabus
Link to comment
Share on other sites

i wont write in random windows only ONE window then press ENTER and then go back to the last activate window... and this many times!

and i want that the window is hidden because i hate the "window jungle" in the "task-leiste" sorry i dont know the english word for this...

Edited by ljkkda
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...