|
You last visited: Today at 19:11
Advertisement
How make a keypreser[AutoIt]
Discussion on How make a keypreser[AutoIt] within the SRO Coding Corner forum part of the Silkroad Online category.
01/11/2012, 21:19
|
#1
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
How make a keypreser[AutoIt]
Hi alll
Im trying to making a simple KeyPresser in SRO with AutoIt...But this function work in all programs but dont work on a Sro...
Example:
It dont work in a silkroad...
Can anyone help me please ;D
Im waiting answer
Ty all
|
|
|
01/11/2012, 21:36
|
#2
|
elite*gold: 50
Join Date: Nov 2007
Posts: 183
Received Thanks: 54
|
First, some version of Silkroad doesn't allow using even AutoIt.
Second, Send ("{DOWN}") is command to send Down arrow, which doesn't do anything in Silkroad, try better something like Send("S") or Send("{ENTER}")
Third, here a lot of guides how to use AutoIt in Silkroad.
|
|
|
01/15/2012, 19:39
|
#3
|
elite*gold: 0
Join Date: Apr 2007
Posts: 192
Received Thanks: 24
|
Put #RequireAdmin on the top of your script.
|
|
|
01/15/2012, 19:47
|
#4
|
elite*gold: 0
Join Date: Jan 2008
Posts: 395
Received Thanks: 172
|
Here`s a simple one , dosen`t work on sro while minimized , but it dosen`t send keys to anything else other than sro:
Code:
Quote:
Global $Paused
HotKeySet("{F6}", "Pause")
HotKeySet("{F7}", "Terminate")
HotKeySet("{F5}", "start")
HotKeySet("{F8}", "minimize")
$handle = WinGetHandle("classname=CLIENT", "SRO_CLIENT")
$t = 1
While 1
Sleep (50)
WEnd
Func minimize()
WinSetState($handle, "", @SW_MINIMIZE)
EndFunc
Func start()
While $t =1
If @error Then
MsgBox(4096, "Error", "Could not find the correct window")
Else
ToolTip("Started",0,0)
Opt("SendKeyDelay",100)
ControlSend($handle, "", "Edit1", "1")
ControlSend($handle, "", "Edit1", "2")
ControlSend($handle, "", "Edit1", "3")
ControlSend($handle, "", "Edit1", "4")
ControlSend($handle, "", "Edit1", "5")
EndIf
ToolTip("",0,0)
WEnd
EndFunc
Func Pause()
$Paused = NOT $Paused
While $Paused
ToolTip("Paused",0,0)
sleep(100)
WEnd
ToolTip("",0,0)
EndFunc
Func Terminate()
Exit 0
EndFunc
|
|
|
|
01/17/2012, 06:49
|
#5
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
Ty all for answers ;D
And yes Ovidiu your code worked perfectly, what I was looking!!!!
Now im trying put on my script a simple mouse click but dont work in silkroad with the same error that I had(this function work in all programs but dont work on a SRO)...
i try: MouseMove, MouseClick, ControlClick and notinhg...:
Code:
MouseMove(526,557)
MouseClick("")
MouseClick("Left",76, 749,1)
MouseClick("click","texto",$handle,"left",Random(0,@DesktopWidth,1),Random(0,@DesktopHeight,1))
ControlClick($handle,"left",Random(0,@DesktopWidth,1),Random(0,@DesktopHeight,1))
ControlClick($handle, "", "Edit1","left",Random(0,@DesktopWidth,1),Random(0,@DesktopHeight,1))
And other question...pixelsearch work on sro? And if yes, how i can click when this fiand a gold for example....
Code:
$coord = PixelSearch( 0, 0, 800, 600, 0x277DC3)
$pos = MouseGetPos()
$var = PixelGetColor( $pos[0] , $pos[1] )
Ty Again
PS:I tried to find AuotIt Guide for Sro, but i dont found....
I waiting for new answers
|
|
|
01/18/2012, 13:53
|
#6
|
elite*gold: 0
Join Date: May 2009
Posts: 31
Received Thanks: 11
|
HackShield is blocking mouse emulating. I've found a solution for this problem. It is crazy, but it work!
You can't use mouse emulating when SRO_Client is on focus. Hackshield don't block autoit when other aplication is on focus. So, when you will put a function like WinActive("CLASS:Shell_TrayWnd") (it will set Start bar on focus) after every MouseMove, MouseClick, program will do it. Even if it will click in Silkroad window, it will work.
But remember to paste that function before every mouse event.
|
|
|
01/20/2012, 07:08
|
#7
|
elite*gold: 0
Join Date: Oct 2010
Posts: 16
Received Thanks: 1
|
Given the complexities and in-game UI dynamics of SRO, I don't think a Sendmessage() or other input macro like autoit are such a good idea..
Pro bots don't even do it, they'll leave an inventory window open for example and decide based on inline data and packet handlers..
|
|
|
01/20/2012, 07:55
|
#8
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
Yes i know, but im newbie in packets, i dont understand how to send code (of moob or npc...) to the server...
Anyway i tried : WinActive("CLASS:Shell_TrayWnd"), but fail :/
Waiting for more answers
|
|
|
01/21/2012, 01:00
|
#9
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,304
Received Thanks: 6,460
|
anyone got autoit code to write on chat?
if it work for gm console, it would be incredible
|
|
|
01/21/2012, 18:53
|
#10
|
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
|
for the one who need to make an autoit keypresser just learn this lang good and make it cuz every one have his coding way and its hard to work on some one eals work just an advise if you need it with c#
i can help with that
|
|
|
|
Similar Threads
|
[vsro] Keypreser Bot
09/16/2011 - SRO Private Server - 9 Replies
Well I did manage to insert the auto select patch (down below) but I can't modify the range,tried loaders,cheatengine,pk tool but I can't change it so...I need some help here :) tx
|
some problems for make a bot with autoIT
03/21/2011 - General Gaming Discussion - 37 Replies
hi ^^, i have some problems for do a bot with auto for grand fantasia ....
i have already do a bot who working but i want him work when the game is minimized .... i have think to use the fonction "$handle = ControlGetHandle("", "", "(controlID)")"
and controlsend($handle"",""," ;{KEY}")
but i need the control id of the game ... i have use autoIT windows info but impossible to find the control id .... can someone help me to find it or give me an other solution of my problems ?
thanks...
|
how about using autoit scripts to make a bot?
05/25/2010 - Rohan - 1 Replies
how about using autoit scripts to make a bot for rohan?
besides it has many actions that can be used by macro-recorders.
the only problem is: it's auto response in using the skills.
but heres another problem if you'll create it from autoit: no dual log in
well, it's your problem if you don't have 2 pcs, I suggest that if you own 1 pc and 1 laptop, then login your two different accounts one on each computer's own clients normally, then after that you must to a safe place so no one can pk...
|
Sw keypreser
07/25/2009 - SRO Private Server - 2 Replies
Hi all I have is some question keypreeser that works in minimized mode silkroad?
|
All times are GMT +1. The time now is 19:11.
|
|