Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 16:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Small Probilem (AutoLogin Sro_client)

Discussion on Small Probilem (AutoLogin Sro_client) within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 35
Received Thanks: 14
Small Probilem (AutoLogin Sro_client)

I have small problem with my program, it working but send "1" not return "enter", this code is 0x0d. Anyone help me?

Code:
#include <Send.au3>

While 1
	
Global $client = "SRO_Client"
$PID = WinGetProcess($client)
Global $hprocess = _MemoryOpen($PID)
Global $hwnd = WinGetHandle($client)

SimulKey($hwnd, 0x0d)
Sleep(6000)

WEnd
Send.au3 :
Code:
#include-once
#include <Process.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>

Func SimulKey($hWnd, $key, $string = 0, $state = 'skip', $delay = 10)
    ;//Open DLL (user32)
    $user32 = DllOpen('user32.dll')
    If $user32 = -1 Then
        SetError(-1, 1, -1)
    EndIf

    ;//Handle Special Keys
    Switch StringLower($key)
        Case 'enter'
            $WM_ENTER = 0x0d
            $dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_ENTER, 'int', 0)
            $lParam = BitOR(BitShift($dCall[0], -16), 1)
        Case 'space'
            $WM_SPACE = 0x20
            $dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_SPACE, 'int', 0)
            $lParam = BitOR(BitShift($dCall[0], -16), 1)

        Case 'tab'
            $WM_TAB = 0x09
            $dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_TAB, 'int', 0)
            $lParam = BitOR(BitShift($dCall[0], -16), 1)
            ;//Handle Standard Keys
        Case Else
            ;//Stringmode 1
            If $string = 1 Then
                $split = StringSplit($key, "")
                For $ctn = 1 To $split[0]
                    $split[$ctn] = Asc(StringLower($split[$ctn]))
                Next
                For $ctn = 1 To $split[0]
                    $dCall = DllCall($user32, 'int', "VkKeyScan", 'int', $split[$ctn])
                    $lParamAsc = DllCall($user32, 'int', "MapVirtualKey", 'int', $dCall[0], 'int', 0)
                    $lParam = BitOR(BitShift($lParamAsc[0], -16), 1)
                    $lUpParam = BitOR($lParam, 0xC0000000)
                    DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYDOWN, 'int', $dCall[0], 'int', $lParam)
                    Sleep($delay)
                    DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYUP, 'int', $dCall[0], 'int', $lUpParam)
                    Sleep(100)
                Next
                ;//Stringmode 0
            ElseIf $string = 0 Then
                $key = Asc(StringLower($key))
                $dCall = DllCall($user32, 'int', "VkKeyScan", 'int', $key)
                $lParamAsc = DllCall($user32, 'int', "MapVirtualKey", 'int', $dCall[0], 'int', 0)
                $lParam = BitOR(BitShift($lParamAsc[0], -16), 1)
            EndIf
    EndSwitch
    $lUpParam = BitOR($lParam, 0xC0000000)
    If $string = 0 Then
        Switch StringLower($state)
            Case 'skip'
                DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYDOWN, 'int', $dCall[0], 'int', $lParam)
                Sleep($delay)
                DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYUP, 'int', $dCall[0], 'int', $lUpParam)
            Case 'down'
                DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYDOWN, "int", $dCall[0], "int", $lParam)
            Case 'up'
                DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYUP, "int", $dCall[0], "int", $lParam)
        EndSwitch
    EndIf
    DllClose($user32)
    Return 1
EndFunc   ;==>SimulKey
potar is offline  
Old 06/05/2010, 16:40   #2
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,617
Received Thanks: 574
what are u trying to send, it makes no sense up to here.
recking is offline  
Reply


Similar Threads Similar Threads
[Autologin] New autologin for SBOT => log12project
10/06/2009 - SRO Hacks, Bots, Cheats & Exploits - 66 Replies
Hey guys ! First , i hopes that there is the right section and that im allowed to post thats ... anyway its only to shar a nice tool ive found ! So... A friend gave me a link for an autologin named log12 As i know the firsts versions comes out somes weeks ago Ive tried it and its working fine for me !
Old sro_client
08/08/2009 - SRO Private Server - 1 Replies
Do the old sro_clients with no dc still work with the new ecsro?
Simple autologin with a small menu
04/13/2009 - SRO PServer Guides & Releases - 3 Replies
EDIT: noone seems to be intrested in this, so ill just use it for myself. CLOSE and sry
i need the sro_client.exe 1.182
03/31/2009 - Silkroad Online - 3 Replies
title says it all



All times are GMT +1. The time now is 16:32.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.