[QUESTION] Auto-Reconnect

04/24/2009 06:40 Belth#1
Is this possible with ahk or autoit? I tried in ahk but the client does not seem to read send keys even though the text shows up. I just get "Wrong password" every time.
04/24/2009 07:01 clintonselke#2
Its possible, i can't see ur script, but what i think might be happening is the key-presses from the script are too fast for the client. I had a problem where when i type my password too fast, it does not get all the letters. (Maybe co checks every frame, and does not use an event queue, not sure). I'll have a go at making one for ya... 1 sec

Back:

Something like this

PHP Code:
Global Const $PASSWORD "YourPassword"
Global Const $CLICK_COORDS[2] = [506684]

HotKeySet("{F1}""Reconnect")
HotKeySet("{F2}""ExitProg")

While 
1
    Sleep
(1000)
WEnd

Func Reconnect
()
    
MouseClick("left"$CLICK_COORDS[0], $CLICK_COORDS[1])
    
Sleep(500)
    For 
$i 1 To StringLen($PASSWORD)
        
$a StringMid($PASSWORD$i1)
        If 
StringIsUpper($aThen
            Send
("{SHIFTDOWN}")
            
Sleep(500)
        EndIf
        
Send("{" $a " down}")
        
Sleep(500)
        
Send("{" $a " up}")
        If 
StringIsUpper($aThen
            Sleep
(500)
            
Send("{SHIFTUP}")
        EndIf
    
Next
    Send
("{ENTER down}")
    
Sleep(500)
    
Send("{ENTER up}")
EndFunc

Func ExitProg
()
    Exit(
0)
EndFunc 
You will have to fill in these two though:

Global Const $PASSWORD = "YourPassword"
Global Const $CLICK_COORDS[2] = [506, 684]

for your clicking coordinates and password.
04/24/2009 11:34 Alexios#3
Nice program clintonselke!
It seems that you are pretty good at programming,eh? :D
Keep going!
I hope you make a proxy someday!
04/24/2009 17:09 Belth#4
Quote:
Originally Posted by clintonselke View Post
Its possible, i can't see ur script, but what i think might be happening is the key-presses from the script are too fast for the client. I had a problem where when i type my password too fast, it does not get all the letters. (Maybe co checks every frame, and does not use an event queue, not sure). I'll have a go at making one for ya... 1 sec

Back:

Something like this

PHP Code:
Global Const $PASSWORD "YourPassword"
Global Const $CLICK_COORDS[2] = [506684]

HotKeySet("{F1}""Reconnect")
HotKeySet("{F2}""ExitProg")

While 
1
    Sleep
(1000)
WEnd

Func Reconnect
()
    
MouseClick("left"$CLICK_COORDS[0], $CLICK_COORDS[1])
    
Sleep(500)
    For 
$i 1 To StringLen($PASSWORD)
        
$a StringMid($PASSWORD$i1)
        If 
StringIsUpper($aThen
            Send
("{SHIFTDOWN}")
            
Sleep(500)
        EndIf
        
Send("{" $a " down}")
        
Sleep(500)
        
Send("{" $a " up}")
        If 
StringIsUpper($aThen
            Sleep
(500)
            
Send("{SHIFTUP}")
        EndIf
    
Next
    Send
("{ENTER down}")
    
Sleep(500)
    
Send("{ENTER up}")
EndFunc

Func ExitProg
()
    Exit(
0)
EndFunc 
You will have to fill in these two though:

Global Const $PASSWORD = "YourPassword"
Global Const $CLICK_COORDS[2] = [506, 684]

for your clicking coordinates and password.
Very nice, thank you:)
04/26/2009 11:12 InfamousNoone#5
Quote:
Originally Posted by Alexios View Post
Nice program clintonselke!
It seems that you are pretty good at programming,eh? :D
Keep going!
I hope you make a proxy someday!
Programming in context, compared to auto-it is much more challenging, nor (to my knowledge) can a proxy be written in auto it. Just thought I'd point that out.
04/26/2009 21:24 hok30#6
Quote:
Originally Posted by InfamousNoone View Post
Programming in context, compared to auto-it is much more challenging, nor (to my knowledge) can a proxy be written in auto it. Just thought I'd point that out.
My thoughts and my problem exactly.
04/26/2009 23:45 unknownone#7
Quote:
Originally Posted by InfamousNoone View Post
Programming in context, compared to auto-it is much more challenging, nor (to my knowledge) can a proxy be written in auto it. Just thought I'd point that out.
Programming in other imperative programming languages is just using the same logic, applied differently. It may be 'more challenging' in other languages because there's a bigger syntax to remember. You also need to be familiar with APIs, but the same goes for any language. Of course, modern languages aren't just straighforward imperative languages, and learning about good OOP designs and such isn't so straightforward.

Auto-it is turing complete though. You can write a proxy, or whatever the fuck you want with it. (Someone has already demonstrated by coding a server-client framework in it). However, doing so is just rediculous, because you end up doing extended amounts of work to interface to APIs in other languages, where it'd be much simpler to use languages where the APIs are already defined.
05/01/2009 14:16 hok30#8
Quote:
Originally Posted by unknownone View Post
However, doing so is just rediculous, because you end up doing extended amounts of work to interface to APIs in other languages, where it'd be much simpler to use languages where the APIs are already defined.
Not to mention that using a 'modern' language would run more stably and faster.