[REQUEST] Minibot Code[s]

Posts 1–13 of 13 · Page 1 of 1
[REQUEST] Minibot Code[s]
Allright lads and lasses. Just want a simple code for a very simple project of mine. I could not ask for more.

So what i want it to do is:

Button 1 -> Start and (as a bot) press F5 every one minute or so.
Button 2 (Below button 1) -> Change time whether pressing F5 every minute or hour.
Button 3 -> Stop Bot.

And i how to get the time next on the toolbar. Example:


Thank You
You know that 1 second is 1000 milliseconds so

60000 millliseconds = 1 minute

Then refresh time
[php]#Region "Press Key"

Declare Sub keybd_event Lib "user32.dll" ( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

Private Sub pk(ByVal vk As Int32) 'press key
keybd_event(vk, 0&, 0&, 0&)
keybd_event(vk, 0&, KEYEVENTF_KEYUP, 0&)
End Sub

#End Region
[/php]

[php]pk(keys.f5)[/php]

You can sure use Sendkeys.Send(), but the function above is also working in DirectXGames...

And about the interval(minute/hour), read the post above.
Basically you just have to copy & paste what I have posted into a timer_tick event. Enable that timer on button click. If you don't know how to, learn the basics. Basic tutorial ~#2 - Accesssing properties...
Though are those does for the buttons ?
Quote Originally Posted by Katie_Perry View Post
Though are those does for the buttons ?
huh ? do you originally speak English or not , also so you wanting to press s key by clicking a button ? your post was kinda hard to understand
hi, in blubbs's code, I got an error...
it says that KEYEVENTF_KEYUP is not declared...
Quote Originally Posted by TheRealOne View Post
hi, in blubbs's code, I got an error...
it says that KEYEVENTF_KEYUP is not declared...
Make sure you declared the Const KEYEVENTF_KEYUP =.=
What? I please you to learn the VERY basic tutorials.
pk(keys.space) i guess.....
That's because Blubb forgot to declare it

Here's his code with the Keyup pointer declared:

Code:
#Region "Press Key" 
    Const KEYEVENTF_KEYUP = &H2
    Declare Sub keybd_event Lib "user32.dll" ( _ 
   ByVal bVk As Byte, _ 
   ByVal bScan As Byte, _ 
   ByVal dwFlags As Long, _ 
   ByVal dwExtraInfo As Long) 

Private Sub pk(ByVal vk As Int32) 'press key 
        keybd_event(vk, 0&, 0&, 0&) 
        keybd_event(vk, 0&, KEYEVENTF_KEYUP, 0&) 
    End Sub 

#End Region
No need to declare it.

You can use keys.<- intellisense nao....
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us