ctwolf Posted November 9, 2008 Share Posted November 9, 2008 Hey, im trying to get a script to run on a single window such as Mozilla Fire Fox and not interfere with other programs or what im doing, so that it can just run in the back ground. i know this is possible cause i found some one else's script that works in a similiar manner for a game, if some one could explain it to me i would be very grateful, im trying to learn. here is the script that runs in a specified window but i dont know how it works or how to change it or any of the details.... WinActivate("Tales of Pirates - P") While 1 ControlSend("Tales of Pirates - P", "", "", "{2}") Sleep(15000) ControlSend("Tales of Pirates - P", "", "", "{k}") Sleep(15100) Wend i can understand all the other functions from reading tutorials and such but the "WinActivate" and then the specification of the same window in the "ControlSend" function have me confused. Link to comment Share on other sites More sharing options...
ctwolf Posted November 11, 2008 Author Share Posted November 11, 2008 The WinActivate brings the focus of the monitor to the window. The ControlSend function sends a string of characters to a certain control. From your example, that is the best I can give you.i can understand that much however i dont know how to change the focus and the script runs on the program happily in the background while not interfering with anything else id like to mimic this affect if possible. Link to comment Share on other sites More sharing options...
ctwolf Posted November 17, 2008 Author Share Posted November 17, 2008 ~Bump, please help Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 17, 2008 Share Posted November 17, 2008 This is the wrong forum. ControlSend sends a message to the window you select. In this case it is sending to some pirate game. What is it exactly that you don't understand? Link to comment Share on other sites More sharing options...
ctwolf Posted November 18, 2008 Author Share Posted November 18, 2008 This is the wrong forum.ControlSend sends a message to the window you select. In this case it is sending to some pirate game. What is it exactly that you don't understand?ah, wrong forum... that might be why... just maybe haha, i don't understand how to target a certain process because i've tried naming the window and the process, and it doesn't work, i tried to see if it was just the program i was trying that didn't work, so i tried it on Mozilla fire fox, however to no avail... it still wont target Mozilla. ill delete this thread, if i am capable of such, and move to the correct location, thank you. Link to comment Share on other sites More sharing options...
oMBRa Posted November 18, 2008 Share Posted November 18, 2008 (edited) try this WinActivate("Tales of Pirates - P") While 1 $a = ControlSend("Tales of Pirates - P", "", "", "{2}") If $a = 0 Then MsgBox(0, '', 'window/control not found') EndIf Sleep(15000) ControlSend("Tales of Pirates - P", "", "", "{k}") Sleep(15100) WEnd Edited November 18, 2008 by oMBra 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