Jump to content

Looping Send command


Kupo
 Share

Recommended Posts

HotKeySet("{ESC}", "quit")

While 1
    ControlSend ( "Untitled - Notepad", "", "Edit1", "1")
    Sleep(1800)
WEnd

Func quit()
    Exit
EndFunc

Replace the "Title" and "Control ID" with your program, of course. See ControlSend, Sleep, and HotKeySet in the help file for explanations.

Edited by xcal
Link to comment
Share on other sites

There any way to make it send to active window?

im trying to make it just hit 1 over and over every 1.8 sec on a game window called CABAL, i just changed the notepad, untitled to the window name right? its not working.. maybe active window will work?

Link to comment
Share on other sites

Try...

HotKeySet("{ESC}", "quit")

While 1
    WinWaitActive("Untitled - Notepad") ;Replace with CABAL I suppose.
    Send ("1")
    Sleep(1800)
WEnd

Func quit()
    Exit
EndFunc

See Send and WinWaitActive in the help file.

edit - you can remove WinWaitActive("Untitled - Notepad") if you don't care if "1" is sent all willy nilly to anything. Really, though, look in the help file. It's one of the best I've ever seen.

Edited by xcal
Link to comment
Share on other sites

Hi,

although might have a look at TimerDiff(), it is more exactly then Sleep(...)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

does it have to be on the task list of task manager to run auto it

its a very strange startup for this game, you login from a website and it loads the game off the IE page, and i cant find it in processes or task list, but it does show on the start bar

BTW it still does not work after using the modified script, i think most likely due to its not an actuall process or somthing, im lost from here

Edited by Kupo
Link to comment
Share on other sites

Hi,

is it a browser game or a Java Webstart oder Java Applet game?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

That script diddnt work either.. i can also right click to do the same thing, i dunno if that helps

its basicly you login to cabaonline.com, download the game (500mb dl), then later you can login again and click play game, this loads the game somhow from the website, very odd

Link to comment
Share on other sites

Hotkeyset("^q","ExitProgram")
AdLibEnable("Spammer",1800)
While 1
WEnd

Func ExitProgram()
 Exit
EndFunc

Func Spammer()
;~  If WinActive("Cabal") = 1 Then
        Send("{1}")
;~  Endif
EndFunc

;~ <== that is a quote btw

Press CTRL+Q to exit, worked fine when I tested it, just remove quotes and change title name to whatever the Cabal title is (Exactly?) and it should only send there.

Edited by Rad
Link to comment
Share on other sites

  • 11 months later...

Hi! Unfortunatly i'm totally noob in scripting and in AutoIt too :) i have almost the same problem like the topic opener. I need a script what is pressing a key or do a right click in the game cabal.I tried the sample what you are wrote here,but didn't work :P The application name is CABAL.Thanks your time and your help.

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