Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 18:53

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

Advertisement



Question

Discussion on Question within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2015
Posts: 10
Received Thanks: 4
Question

I am using a autoit and I encounter something that interest me so i will tell it now first of all I wanna know how to make an address to be auto injected because I don't have a button or checkbox or anything like that to make it injected someone know how?
sgian217 is offline  
Old 11/02/2015, 13:36   #2
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
U can inject it with hotkey, because with hotkey u can call any function. So u make a function with code u want to inject then just put that function name in hokey, so when u press hotkey u set it will call that function.

Here is example, so when u press F1 it will give u msgbox with Hello.

Code:
HotKeySet("{F1}", "myFunction")

While 1
    Sleep(10)
WEnd

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc
mlukac89 is offline  
Old 11/03/2015, 10:14   #3
 
elite*gold: 0
Join Date: Oct 2015
Posts: 10
Received Thanks: 4
Quote:
Originally Posted by mlukac89 View Post
U can inject it with hotkey, because with hotkey u can call any function. So u make a function with code u want to inject then just put that function name in hokey, so when u press hotkey u set it will call that function.

Here is example, so when u press F1 it will give u msgbox with Hello.

Code:
HotKeySet("{F1}", "myFunction")

While 1
    Sleep(10)
WEnd

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc
ok gonna try it now but I will like it if it can be auto injected no need hotkey once the pid open it will auto inject the function do you know how? and how to use multiple address on autoit?
sgian217 is offline  
Old 11/04/2015, 13:31   #4
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Quote:
Originally Posted by sgian217 View Post
ok gonna try it now but I will like it if it can be auto injected no need hotkey once the pid open it will auto inject the function do you know how? and how to use multiple address on autoit?
For multiple addresses u can make more functions and call it 1 by 1 because autoit works 1task, 2task ....

So if u have

func1()
func2()
func3()

it will run it from 1st to last, so make more functions and add it like i show u on example below.

U can add it like this, without repeat

Code:
While 1
    Sleep(10)
WEnd

; it will call it without any keys or buttons
; and if u want to repeat it all time put in while loop and put sleep because of cup usage

myFunction()

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc
And if u want function to repeat put it like this, so it will repeat it every 1 second until u shut down script.

With repeat every 1 second

Code:
While 1
    Sleep(10)
    myFunction() ; your function
    sleep(1000) ; 1 second
WEnd

; it will call it without any keys or buttons
; and if u want to repeat it all time put in while loop and put sleep because of cup usage

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc
More functions without repeat

Code:
While 1
    Sleep(10)

WEnd

; it will call it without any keys or buttons
; and if u want to repeat it all time put in while loop and put sleep because of cup usage

myFunction()
myFunction1()
myFunction2()

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc

Func myFunction1()
    MsgBox(0, "Title", "Hello")
EndFunc

Func myFunction2()
    MsgBox(0, "Title", "Hello")
EndFunc
More functions with repeat

Code:
While 1
    Sleep(10)
    myFunction()
    sleep(1000)
    myFunction1()
    sleep(1000)
    myFunction2()
    sleep(1000)
WEnd

; it will call it without any keys or buttons
; and if u want to repeat it all time put in while loop and put sleep because of cup usage

Func myFunction()
    MsgBox(0, "Title", "Hello")
EndFunc

Func myFunction1()
    MsgBox(0, "Title", "Hello")
EndFunc

Func myFunction2()
    MsgBox(0, "Title", "Hello")
EndFunc
mlukac89 is offline  
Reply




All times are GMT +2. The time now is 18:53.


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.