Question

10/31/2015 07:23 sgian217#1
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?
11/02/2015 13:36 mlukac89#2
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
11/03/2015 10:14 sgian217#3
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?
11/04/2015 13:31 mlukac89#4
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