Jump to content

AutoIT Noob, Please Help


Recommended Posts

Ok, What I need is a script that will switch to the attached window if open, then press enter. I am willing to bet that this is simple, but I don't get the coding, and chances are, I never will. So if someone is kind enough to create this script for me, it would be much appreciated. This is for my garrysmod server that crashes a lot and I already have found a nice program that will do the rest, and I don't exactly care if there is another script that someone says that will work better, this is what I want, and I don't want to use console mode, so if anybody says "just use console mode", you will be ignored.

Here is the window

Posted Image

Sir, We are surrounded

Excellent, we can attack in any direction now :)

Link to comment
Share on other sites

Use WinWaitActive or WinExists then Send.

Example

;Wait for the window "Untitled" to exist and be active

WinWaitActive("Untitled")

Send("{ENTER}")

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

Thanks for the quick help, that works, but if the window is not active, I would like it to switch to that window before it presses enter, if something else pops up for some strange reason, I need it to switch. We have a magicjack, which is sort of like a vonage phone box thingy, but it is usb, and the window for it pops up any time someone calls or if we call someone. If someone is calling when that happens, then the server won't restart. This is most likely just one more window that I have to add, but I haven't learned AutoIt coding yet .....

Sir, We are surrounded

Excellent, we can attack in any direction now :)

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