Sign in to follow this  
Followers 0
the_OG

Script won't close

6 posts in this topic

#1 ·  Posted (edited)

Sorry, script stripped because I found someone trying to sell it... no changes to the program at all. (lamers need to die -.-)

I made this so I would not go AFK from being away for more than 5 minutes while playing World of Warcraft since there is no way to prevent it.

It works down to exiting the program AFTER clicking "start"... There is will not close. :o

Anyway, I am new to AutoIt and the forum, Hi. :geek:

Edited by the_OG

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

maybe

Case $scr1 = $start
        MsgBox(0,"Anti-AFK", "Running nAnti-AFK, please switch over to WoW.")
        While WinWaitActive("World of Warcraft") <> 1
        sleep(5000)
        Send ( "{SPACE}", 0)
        WEnd    
        ExitLoop

8)

BTW

Welcome to Autoit Forums

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

different approach:

; Anti Away from Keyboard.
;      v.01
; by Nitu

#include <GuiConstants.au3>

GUICreate("nAnti AFK", 250, 100)
GUISetBkColor(0xaaaaaa)
Opt("TrayIconHide", 1)
;WinSetOnTop("nAnti AFK", "", 1)

GUISetState()

$file = GUICtrlCreateMenu("File")
$exit = GUICtrlCreateMenuItem("Exit", $file)
$info1 = GUICtrlCreateMenu("Info")
$info = GUICtrlCreateMenuItem("About", $info1)
$start = GUICtrlCreateButton("Start", 13, 30, 70, 20)
$stop = GUICtrlCreateButton("Close", 86, 30, 70, 20)

GUICtrlCreateGroup("Options", 5, 7, 160, 60)

While 1
    
    $scr1 = GUIGetMsg()
    Select
        Case $scr1 = $GUI_EVENT_CLOSE
            Exit
            
        Case $scr1 = $exit
            Exit
            
        Case $scr1 = $info
            MsgBox(0, "About", "World of Warcraft Anti-AFK.")
            
        Case $scr1 = $start
            MsgBox(0, "Anti-AFK", "Running nAnti-AFK, please switch over to WoW.")
            AdlibEnable("sendspace", 5000)
            
        Case $scr1 = $stop
            MsgBox(0, "Anti-AFK", "Exiting Anti-AFK loop.")
            AdlibDisable()
    EndSelect
WEnd

Func sendspace()
    Send("{SPACE}", 0)
EndFunc ;==>sendspace
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Wow you guys rock! :geek:

Posted the thread and walked to the store for breakfast and already have two replies! ;)

I'll try them both right away! :o

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hmm, neither seemed to work quite as wanted. :o

I am trying to get the script to exit after the user presses "Start", right now, if Start is pressed, the user cannot exit the program without the help of ctrl alt delete, When I first tested the script in a friends msn window, the thing almost forced me to shut the computer down. ;)

Got rid of that problem by adding "while 2 = 2" before "WinWaitActive("World of Warcraft")".

This closing has been the plague though. And I do not know how to fix it... :geek:

I'll try solving it, for learning, but help is very much appreciated.

Oh one more thing, the function of this was to make the player jump while they were away, to restart the away from they keyboard timer. Jumping in World of Warcraft is done by pressing the space bar, hence the "Send ("{SPACE}", 0)". :sorcerer:

Edited by the_OG

Share this post


Link to post
Share on other sites

I do not have use for this program anymore, however, I am still interested in solving the problem as I have never fixed it. So.. In other words, this is a bump.

Share this post


Link to post
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
Sign in to follow this  
Followers 0