Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:13

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

Advertisement



Autoit Script Help

Discussion on Autoit Script Help within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Autoit Script Help

I am trying to make new hacking but I got some problem.
When I use the script, its force me the that main window will be maplestory, which means I cant do anything on the computer when the script it working.
For the guys who know that program, I was using "Send ("{Right down}") sleep (200) Send ("{Right up}")", and then I understand that the controlsend can send spesific buttons to spesific window, BUT, I cant use Right / Left [down-up] controls which mean, that character cant move .
how do I use ControlSend commands to make my character move? thanks for the help
arielity96 is offline  
Old 10/21/2015, 19:43   #2
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
First put on start->top of the script
Code:
#RequireAdmin
Then check if window exist, if it exists then it will give u message and activate window if its there.

Code:
Global $win_title = 'Window title'

; test if window exists
If WinExists($win_title) Then
    MsgBox(0, '', 'Window exists')
    WinActivate($win_title)
Else
    MsgBox(0, '', 'Window dont exists')
EndIf ;=> test if window exists
Now try to send key in window
Code:
ControlSend($win_title, '', '', '{key u want to send}')
mlukac89 is offline  
Old 10/21/2015, 20:55   #3
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
First put on start->top of the script
Code:
#RequireAdmin
Then check if window exist, if it exists then it will give u message and activate window if its there.

Code:
Global $win_title = 'Window title'

; test if window exists
If WinExists($win_title) Then
    MsgBox(0, '', 'Window exists')
    WinActivate($win_title)
Else
    MsgBox(0, '', 'Window dont exists')
EndIf ;=> test if window exists
Now try to send key in window
Code:
ControlSend($win_title, '', '', '{key u want to send}')


But in the ControlSend function, I didnt able to send key as Down and Up, I mean, its not holding the key so on the game, the character isnt moving. You know how to do it?


Edit:
ControlSend($win_title, '', '', '{LEFT Down}')
sleep(1000)
ControlSend($win_title, '', '', '{LEFT Up}')



this is the code and its not working, what I try to do is to make on the window Hold left arrow key for 1000ms, any suggest how to make it work?
arielity96 is offline  
Old 10/22/2015, 01:23   #4
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Here u have some things so u can look into

Maybe game block it, did send() worked ?

ControlSend($win_title, '', '', '{ASC 0x1B down}') or
ControlSend($win_title, '', '', '{ASC0x4B down}') or
ControlSend($win_title, '', '', '{ASC 0x4B down}')

Try with ASCII chars
  • Up: 0x18
  • Down: 0x19
  • Right: 0x1A
  • Left: 0x1B
-----------------------------

  • Up: 0x48
  • Left: 0x4B
  • Right: 0x4D
  • Down: 0x50
----------------------------
  • Left: AC
  • Up: AD
  • Right: AE
  • Down: AF

AutoIt can send all ASCII and Extended ASCII characters (0-255), to send UNICODE characters you must use the "ASC" option and the code of the character you wish to Send(see {ASC} below).


To send the ASCII value A (same as pressing ALT+065 on the numeric keypad)
("{ASC 065}")
(When using 2 digit ASCII codes you must use a leading 0, otherwise an obsolete 437 code page is used).

To send UNICODE characters enter the character code, for example this sends a Chinese character
("{ASC 2709}")


mlukac89 is offline  
Old 10/22/2015, 06:56   #5
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
Here u have some things so u can look into

Maybe game block it, did send() worked ?

ControlSend($win_title, '', '', '{ASC 0x1B down}') or
ControlSend($win_title, '', '', '{ASC0x4B down}') or
ControlSend($win_title, '', '', '{ASC 0x4B down}')

Try with ASCII chars
  • Up: 0x18
  • Down: 0x19
  • Right: 0x1A
  • Left: 0x1B
-----------------------------

  • Up: 0x48
  • Left: 0x4B
  • Right: 0x4D
  • Down: 0x50
----------------------------
  • Left: AC
  • Up: AD
  • Right: AE
  • Down: AF

AutoIt can send all ASCII and Extended ASCII characters (0-255), to send UNICODE characters you must use the "ASC" option and the code of the character you wish to Send(see {ASC} below).


To send the ASCII value A (same as pressing ALT+065 on the numeric keypad)
("{ASC 065}")
(When using 2 digit ASCII codes you must use a leading 0, otherwise an obsolete 437 code page is used).

To send UNICODE characters enter the character code, for example this sends a Chinese character
("{ASC 2709}")


Hi, first of all Thanks,
Sencond, the scripts your wrote didnt work. and yes with Send ("{Right down}") its working perfect.
Does it possible that they really block it and if so, there is option how to make it work?
arielity96 is offline  
Old 10/22/2015, 15:21   #6
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Try this, if u dont success with this maybe is keys with control send blocked,

And try to put more time on Sleep put for example 4000 just for test.

Code:
Global $win_title = 'Window title', $handle = WinGetHandle($win_title)

If WinExists($win_title) Then
    MsgBox(0, 'Window', 'Window exists' & @CRLF & 'Window name : ' & $win_title & @CRLF & 'Window handle : ' & $handle ) ; u must get some result here, name of window and handle of window
    WinActivate($handle) ; activate window if exists

    ControlSend($handle, '', '', '{RIGHT down}')
    Sleep(1000)
    ControlSend($handle, '', '', '{RIGHT up}')
    Sleep(1000)
    MsgBox(0, 'Success', 'Key pressed.')

Else
    MsgBox(0, 'Window', 'Window ' & $win_title & ' dont exists')
EndIf
mlukac89 is offline  
Old 10/22/2015, 16:02   #7
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
Try this, if u dont success with this maybe is keys with control send blocked,

And try to put more time on Sleep put for example 4000 just for test.

Code:
Global $win_title = 'Window title', $handle = WinGetHandle($win_title)

If WinExists($win_title) Then
    MsgBox(0, 'Window', 'Window exists' & @CRLF & 'Window name : ' & $win_title & @CRLF & 'Window handle : ' & $handle ) ; u must get some result here, name of window and handle of window
    WinActivate($handle) ; activate window if exists

    ControlSend($handle, '', '', '{RIGHT down}')
    Sleep(1000)
    ControlSend($handle, '', '', '{RIGHT up}')
    Sleep(1000)
    MsgBox(0, 'Success', 'Key pressed.')

Else
    MsgBox(0, 'Window', 'Window ' & $win_title & ' dont exists')
EndIf

ok so I copied this, put the window title, and then launched it. then it says window exist and after few seconds key pressed, but the character didnt moved. o.o

EDIT : I changed the button instead right, press the key "T", what it does its press 1 time T , which means its not holding the key, so that's why the character is not moving because its require to holding the key. so what can we do?

(What I am trying to say is that I need to find command to hold key because Down&Up method is not working on controlsend() , it is working on Send() but then i cant touch the computer with send()'s commands)
arielity96 is offline  
Old 10/22/2015, 18:34   #8
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Did u try, if that dont success then on my previous post just add on top #RequireAdmin and compile it 64 bit and then try compiled exe right click -> run as admin

Code:
ControlSend($handle, '', '', '{RIGHT}')
ControlSend($handle, '', '', '{down}')
Sleep(3000)
mlukac89 is offline  
Old 10/22/2015, 19:37   #9
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
Did u try, if that dont success then on my previous post just add on top #RequireAdmin and compile it 64 bit and then try compiled exe right click -> run as admin

Code:
ControlSend($handle, '', '', '{RIGHT}')
ControlSend($handle, '', '', '{down}')
Sleep(3000)
hi, I tried this code, didnt work, I compiled to exe, used, didnt work with the code before this, and I also compiled to 64bit but it didnt work cause I have 32bit lol.
arielity96 is offline  
Old 10/22/2015, 19:58   #10
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
U can compile to x86 thats 32 bit but important thing is that file is compiled and run as admin, BTW switch to 64 bit windows it will work for sure.

On 32 bit systems many things dont works.
mlukac89 is offline  
Old 10/22/2015, 20:00   #11
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
U can compile to x86 thats 32 bit but important thing is that file is compiled and run as admin, BTW switch to 64 bit windows it will work for sure.

On 32 bit systems many things dont works.
ok maybe I will but, dont you think there is other option to make it work?
arielity96 is offline  
Old 10/22/2015, 20:54   #12
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Try search for _PostMessage() function and .au3 file system is similar to ControlSend()
mlukac89 is offline  
Old 10/22/2015, 22:22   #13
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
Try search for _PostMessage() function and .au3 file system is similar to ControlSend()
I hope u mean PostMessage on autohotkey? because there is no function of postmessage on autoit.
Anyways I tried to understand how to write it, I wrote it like this:

PostMessage,0,0,0,{Right down},%wintitle%
sleep 1000
PostMessage,0,0,0,{Right up},%wintitle%

[on AutoHotKey]
And its ran the script but didnt work. so tell me first did I write it ok? if not, fix me please
arielity96 is offline  
Old 10/22/2015, 23:28   #14
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
There u go u have UDF and example in
mlukac89 is offline  
Old 10/22/2015, 23:59   #15
 
elite*gold: 0
Join Date: Oct 2015
Posts: 9
Received Thanks: 0
Quote:
Originally Posted by mlukac89 View Post
There u go u have UDF and example in
I really need help with it I am so unskilled with this, I sent you PM I would like if you see it THANKS ALOT
arielity96 is offline  
Reply




All times are GMT +2. The time now is 06:13.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.