Jump to content

new here, dont really know what i'm doing


Guest m0sphere
 Share

Recommended Posts

Guest m0sphere

I'm trying to make a script that will press W every 10-15 minutes then S then W and so on. It needs to work in a non active (minimized) window and my screensaver needs to be able to work (so i can goto bed and not see the light). I messed around with v2 and was using...

Repeat, 1000000
Send, w
Sleep, 600000
Send, s
Sleep, 600000
Send, w
Sleep, 600000
Send, s
Sleep, 600000
EndRepeat

then i read the forums a little and something about how you need v3 to do it for a non active window but i cant figure out how. any help would be appreciated, thank you.

Link to comment
Share on other sites

v3 uses Sleep(5000) for 5 second sleep.

Send would be ControlClick( "title", "text", "classnameNN" [, button] [, clicks]] ) to substitute the sends?

Repeat, this is in v2? Long time since I last used it, Use While 1 instead.

Instead of EndRepeat, use Wend.

This does have buttons for ControlClicks I hope?

Link to comment
Share on other sites

Try this:

HotKeySet('!e', 'Leave'); Set Alt-E to Exit

While 1
s ( )
w ( )
WEnd

Func Leave(); Alt-E Hotkey function
MsgBox(0, "Stop", "The W & S application is now terminated.")
Exit
EndFunc
  Sleep ( 3000 );Give you 3 seconds, to change to correct window.

Func w()
  Send ( 'W' )
  Sleep ( 600000 );Pause for 10 minutes
EndFunc

Func s()
  Send ( 'S' )
  Sleep ( 600000 );Pause for 10 minutes
EndFunc

EDIT:

If you explain a little more about what you are using it for, i might be able to make it run smoother.

For example:

WinActivate("The name of the program needing W and S every ten minute")

There is alot of small things wich would make it easier for you.

Edited by Doxie

Were ever i lay my script is my home...

Link to comment
Share on other sites

Guest m0sphere

Thanks guys, I finshed it and made it a bit more basic. Heres the code if anyone happens to wanna use it. I just needed something so that the WoW servers wouldnt kick me while I sleep.

$answer = MsgBox(1, "Confirm", "This script will allow you to be AFK and not be kicked from the WoW servers.")

If $answer = 2 Then
    Exit
EndIf

While 1
ControlSend ("World of Warcraft", "", "", "w")
Sleep(30000)
ControlSend ("World of Warcraft", "", "", "s")
Sleep(30000)
WEnd

it can even be left running while you play since it only moves you forward and then backwards every 5(i think) minutes. anyways, thanks again to the ones that replied.

i might just make this even more advanced later, but its bed time now.

Edited by m0sphere
Link to comment
Share on other sites

Correct me if i'm wrong m0sphere...

You would not like to share the information until YOU don't have any use for it, correct?

Seriously, you come to this forum, and ask for help how to use this "error" for you advantage. Within a couple of hours we have a working script for you. So you can use this "bug".

And when someone is asking you about it, you tell us that you don´t wanna share it?

As Pacman said, next time you ask for help here, we might just say you will get the help when we don´t have any use for it.

Were ever i lay my script is my home...

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