Jump to content

NEw and woundering if this will work...


Recommended Posts

Hi all, I'm Tony and I just downloaded autoit and Im liking all the things that can be done with it. Problem is I don't know anything about it. lol. Really Im looking for some good starter points. HERE is my goal for learning autoit: I'm trying to make an autoit to press TAB and then press F5 like 3 seconds later, THEN wait 35 seconds and PRESS TAB again and then wait 3 seconds and press F5, and keep repeating it self over and oever and over and oever. So if anyone would like to help me learn autoit or if this is really easy script to write, would someone mind replying to me? Thanx! THANX!! ~ Tony

Link to comment
Share on other sites

Hi all, I'm Tony and I just downloaded autoit and Im liking all the things that can be done with it. Problem is I don't know anything about it. lol. Really Im looking for some good starter points. HERE is my goal for learning autoit: I'm trying to make an autoit to press TAB and then press F5 like 3 seconds later, THEN wait 35 seconds and PRESS TAB again and then wait 3 seconds and press F5, and keep repeating it self over and oever and over and oever. So if anyone would like to help me learn autoit or if this is really easy script to write, would someone mind replying to me? Thanx! THANX!! ~ Tony

#NotrayIcon
HotkeySet("{F11}","Start")
HotkeySet("{ESC}","Quit")
Global $Bool=False
While 1
Sleep(500)
WEnd
Func Start()
$Bool=Not $Bool
While $Bool=True
Send("{TAB}")
Sleep(3000)
Send("{F5}")
Sleep(35000)
Send("{TAB}")
Sleep(3000)
Send("{F5}")
Sleep(35000)
WEnd
EndFunc
Func Quit()
Exit
EndFunc

If this is what you want.

Edited by Generator
Link to comment
Share on other sites

wow man that was really fast and looks cool. Im not really good at reading forign launges but nice work! Im noticing a little something tho, duz that repeat it self over and over and over and over again?

Link to comment
Share on other sites

If this is what you want.

The use of the $Bool flag was confusing to me, though it might work fine. My preference would have been:

HotKeySet("{F11}", "Start") ; F11 starts and stops the key sending
HotKeySet("{ESC}", "Quit") ; ESC exits the script

Global $Bool = False

While 1
    If $Bool Then
        Send("{TAB}")
        Sleep(3000)
        Send("{F5}")
        Sleep(35000)
    EndIf
    Sleep(50)
WEnd

Func Start()
    $Bool = Not $Bool
EndFunc   ;==>Start

Func Quit()
    Exit
EndFunc   ;==>Quit

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

cool guys I really thank you for the help, 1 question tho, how do run it? I copy'd and pasted it into the editor and then click run audoit program and nothing...Thanx for the help!

His has icon mine doesn't. So you may not see the icon but when you press hotkey it will do the job.
Link to comment
Share on other sites

yeah I press F11 like he said and it didnt do anything... IDK whats wrong with it. Maybe you or he could send the file and I could just run it? Thanx again!

Compile it yourself. It should be working 100%. Only exception is..What window are you trying to send those key to?
Link to comment
Share on other sites

cool guys I really thank you for the help, 1 question tho, how do run it? I copy'd and pasted it into the editor and then click run audoit program and nothing...Thanx for the help!

Assuming your using Scite make sure you save the file with an extension of .au3 so that it knows it's an AutoIT script. Pressing F5 (or Tools > Go) will start the script but you'll have to press F11 to actually make it send the key presses.

Link to comment
Share on other sites

Compile it yourself. It should be working 100%. Only exception is..What window are you trying to send those key to?

Good point. The scripts we wrote don't specify the window. Presumably Tony223 wants the @TAB and F5 going to a particular window, and it would have to be the active window during the key sending to work.

@Tony223,

If you want a certain window to get those keys, look in the help file for ControlSend() instead of Send() and adjust the script(s).

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

yeah I went to help file and there is nothing there about control send...hmm. Im trying to send it to Rappelz window or if I alt+crtl+delte in proccess its called SFrame.exe thanx again for all ur hard work. its really apriciated

Link to comment
Share on other sites

duz it matter that Im trying to use it with Rappelz game? it has something called hack shield but I don't think that matters. Thanx

It could be, some apps can block AutoIT i believe (try a search on that hack-protection thing, chances are someone has asked about it before).

Psalty's code works fine for me refreshing Firefox.

Just to make sure your actually getting it to run you could try the following code:

HotKeySet("{F11}", "Start") ; F11 starts and stops the key sending
HotKeySet("{ESC}", "Quit") ; ESC exits the script

Global $Bool = False

MsgBox(0, "Script Started", "Script has started although not sending Keypresses yet!")

While 1
    If $Bool Then
        Send("{TAB}")
        Sleep(3000)
        Send("{F5}")
        Sleep(35000)
    EndIf
    Sleep(50)
WEnd

Func Start()
    $Bool = Not $Bool
    MsgBox(0, "Kepresses will start", "Keypresses will start sending after you click OK.")
EndFunc   ;==>Start

Func Quit()
    MsgBox(0, "Exiting", "Esc was pushed exiting the script. :P")
    Exit
EndFunc   ;==>Quit

Then going to Tools > Go in Scite should result in a message box popping up straight away. If that happens then either your hack protection thing is stopping AutoIT or you need to do what the other guys suggested and target the specific window your after. :)

Link to comment
Share on other sites

It could be, some apps can block AutoIT i believe (try a search on that hack-protection thing, chances are someone has asked about it before).

Psalty's code works fine for me refreshing Firefox.

Just to make sure your actually getting it to run you could try the following code:

HotKeySet("{F11}", "Start") ; F11 starts and stops the key sending
HotKeySet("{ESC}", "Quit") ; ESC exits the script

Global $Bool = False

MsgBox(0, "Script Started", "Script has started although not sending Keypresses yet!")

While 1
    If $Bool Then
        Send("{TAB}")
        Sleep(3000)
        Send("{F5}")
        Sleep(35000)
    EndIf
    Sleep(50)
WEnd

Func Start()
    $Bool = Not $Bool
    MsgBox(0, "Kepresses will start", "Keypresses will start sending after you click OK.")
EndFunc   ;==>Start

Func Quit()
    MsgBox(0, "Exiting", "Esc was pushed exiting the script. :P")
    Exit
EndFunc   ;==>Quit

Then going to Tools > Go in Scite should result in a message box popping up straight away. If that happens then either your hack protection thing is stopping AutoIT or you need to do what the other guys suggested and target the specific window your after. :)

ok script is running good so let me check for hack protection and duz anyone know what info I need to post here about the window I wanna send packets to? THANX!

To fu2m8: No game blocks Autoit, it is if the game accepts software stimulated keys. For example, gameguard blcoks all the software stimulated keys which is called in user32.dll, i remember there was a bypass for it, you gotta do that in C++ though.

To Tony223: Go to Example script and look for Autoit 1-2-3, a great tutorial made by Valuater, try to do something on your own.

I feel like we spoon fed him too much.

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