|
You last visited: Today at 10:22
Advertisement
2 fragen
Discussion on 2 fragen within the AutoIt forum part of the Coders Den category.
11/07/2010, 14:56
|
#1
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
2 fragen
moin, wie kann ich das machen?:
wie kann ich es machen das eine funktion erst ausgeführt wird wenn es als bsp 13:39 ist (immer wenn eine 9 hinten bei der uhrzeit ist) und 2. das sich der bot background auf das angegeben fenster bezieht als bsp. ( lastchaos - 0x31331)
|
|
|
11/07/2010, 15:11
|
#2
|
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
|
ich habe zwar keine ahnung was du mit der 2ten frage meinst, aber das erste kannst du doch einfach über die @Min variable lösen...
Code:
if stringright(@min,1)='9' then ...
|
|
|
11/07/2010, 15:22
|
#3
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
Quote:
Originally Posted by lolkop
ich habe zwar keine ahnung was du mit der 2ten frage meinst, aber das erste kannst du doch einfach über die @Min variable lösen...
Code:
if stringright(@min,1)='9' then ...
|
Das ich das fentser nicht immer im vordergrund haben kann also nebenbei was anderes mache. So das der bot nur in dem fenster was angegeben ist arbeitet.
thx.
|
|
|
11/07/2010, 15:25
|
#4
|
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
|
Code:
$tTime = _Date_Time_GetSystemTime()
_Date_Time_SystemTimeToArray($tTime)
Gibt n Array wieder:
[0] - Monat
[1] - Tag
[2] - Jahr
[3] - Stunden
[4] - Minuten
[5] - Sekunden
[6] - Millisekunden
[7] - Wochentag
Dann machste halt ne For-Next-Schleife:
Code:
#include <Date.au3>
#include <Array.au3>
For $i = 9 To 59 Step 10
$tTime = _Date_Time_GetSystemTime()
$htime = _Date_Time_SystemTimeToArray($tTime)
If $htime[4] = $i Then
...
EndIf
Sleep(600000) ;60000 -> 1min, 600000 -> 10min
Next
Ich versteh allerdings dein 2. Anliegen nicht so recht oô
EDIT: Da war lolkop schneller
|
|
|
11/07/2010, 15:49
|
#5
|
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
|
Quote:
Originally Posted by nilsheigener
Das ich das fentser nicht immer im vordergrund haben kann also nebenbei was anderes mache. So das der bot nur in dem fenster was angegeben ist arbeitet.
thx.
|
Das müsste in AutoIt ControlSend sein.
In gescheiten Sprachen Send/PostMessage
|
|
|
11/07/2010, 16:02
|
#6
|
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
|
Quote:
Originally Posted by MoepMeep
Das müsste in AutoIt ControlSend sein.
In gescheiten Sprachen Send/PostMessage 
|
mit "in gescheiten sprachen" meinst du auf windows-systemen?
ich bin mir ziemlich sicher, das Send/PostMessage in mehr als 90% aller bekannten und unbekannten sprachen (ja, auch in autoit) genutzt werden können, da es einfach nur vorgekaute funktionen in einer de vielen winapi dlls sind.
|
|
|
11/07/2010, 16:30
|
#7
|
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
|
Quote:
Originally Posted by lolkop
mit "in gescheiten sprachen" meinst du auf windows-systemen?
ich bin mir ziemlich sicher, das Send/PostMessage in mehr als 90% aller bekannten und unbekannten sprachen (ja, auch in autoit) genutzt werden können, da es einfach nur vorgekaute funktionen in einer de vielen winapi dlls sind.
|
Yep, auf windowssystemen
In gescheiten Sprachen sind diese aber ohne umwege Nutzbar(C++  ), in AutoIt soweit ich weiß nicht
|
|
|
11/07/2010, 16:50
|
#8
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
PHP Code:
#include <Date.au3>
#include <Array.au3>
For $i = 9 To 59 Step 10
$tTime = _Date_Time_GetSystemTime()
$htime = _Date_Time_SystemTimeToArray($tTime)
If $htime[4] = $i Then
ControlSend ("LastChaos")
send ("{I}")
send ("{I}"
send ("{I}"
send ("{I}"
send ("{I}"
EndIf
Sleep(600000) ;60000 -> 1min, 600000 -> 10min
Next
würde er dann in das LastChaos Fentser I Senden?
|
|
|
11/07/2010, 17:09
|
#9
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
schau dir mal den syntax vom controlsend an -.-
|
|
|
11/07/2010, 17:21
|
#10
|
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
|
Code:
#include <Date.au3>
#include <Array.au3>
For $i = 9 To 59 Step 10
$tTime = _Date_Time_GetSystemTime()
$htime = _Date_Time_SystemTimeToArray($tTime)
If $htime[4] = $i Then
For $t = 1 To 5
ControlSend("LastChaos","","","{I}")
Next
EndIf
Sleep(600000)
Next
|
|
|
11/07/2010, 17:24
|
#11
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
Quote:
Originally Posted by omer36
schau dir mal den syntax vom controlsend an -.-
|
Wie oft hast du mir schon geholfen?^^ closed. dummer fehler von mir.^^
|
|
|
11/07/2010, 19:33
|
#12
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Bei LastChaos ist "ControlSend" alles andere als empfehlenswert, da es öfters zu Bluescreens
kommen kann. Außerdem hat man immer Probleme mit der Groß- und Kleinschreibung. Die
Probleme sollten dir ja bekannt sein.
Schau dir dafür einfach mal das an:
Quote:
|
Originally Posted by KillerDeluxe
PostMessage.au3
PHP Code:
; ======================================================================================
; Author: KillerDeluxe
; ======================================================================================
#include-once
#include "KeyCodes.au3"
#include <WindowsConstants.au3>
Func _PostMessage_Send($hWnd, $Key, $Delay = 10)
If StringLen($Key) == 1 Then
If $Key == "+" Or $Key == "^" Or $Key == "!" Then
SetError(1)
Else
$Key = StringUpper($Key)
$Key = StringToBinary($Key)
EndIf
Else
$Key = _ReplaceKey($Key)
EndIf
$Key_ = DllCall("user32.dll", "int", "MapVirtualKey", "int", $Key, "int", 0)
If IsArray($Key_) Then
DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYDOWN, "int", $Key, "long", _MakeLong(1, $Key_[0]))
Sleep($Delay)
DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYUP, "int", $Key, "long", _MakeLong(1, $Key_[0]) + 0xC0000000)
Else
SetError(2)
EndIf
EndFunc
Func _PostMessage_Click($hWnd, $X = Default, $Y = Default, $Button = "left", $Clicks = 1, $Delay = 10)
If $Button == "left" Then
$Button = $WM_LBUTTONDOWN
ElseIf $Button == "right" Then
$Button = $WM_RBUTTONDOWN
ElseIf $Button == "middle" Then
$Button = $WM_MBUTTONDOWN
If $Delay < 100 Then $Delay = 100
EndIf
$WinSize = WinGetClientSize($hWnd)
If $X == Default Then $X = $WinSize[0] / 2
If $Y == Default Then $Y = $WinSize[1] / 2
For $j = 1 To $Clicks
DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hWnd, "int", $Button, "int", "0", "long", _MakeLong($X, $Y))
Sleep($Delay)
DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hWnd, "int", $Button + 1, "int", "0", "long", _MakeLong($X, $Y))
Next
EndFunc
Func _MakeLong($LoDWORD, $HiDWORD) ;WinAPI.au3
Return BitOR($HiDWORD * 0x10000, BitAND($LoDWORD, 0xFFFF))
EndFunc
KeyCodes.au3:
PHP Code:
; ======================================================================================
; Author: KillerDeluxe
; ======================================================================================
#include-once
#include <Constants.au3>
Global Const $VK_BACK = 0x8
Global Const $VK_TAB = 0x9
Global Const $VK_RETURN = 0xD
Global Const $VK_SHIFT = 0x10
Global Const $VK_CONTROL = 0x11
Global Const $VK_MENU = 0x12
Global Const $VK_PAUSE = 0x13
Global Const $VK_CAPITAL = 0x14
Global Const $VK_ESCAPE = 0x1B
Global Const $VK_SPACE = 0x20
Global Const $VK_SNAPSHOT = 0x2C
Global Const $VK_INSERT = 0x2D
Global Const $VK_DELETE = 0x2E
Global Const $VK_NUMPAD0 = 0x60
Global Const $VK_NUMPAD1 = 0x61
Global Const $VK_NUMPAD2 = 0x62
Global Const $VK_NUMPAD3 = 0x63
Global Const $VK_NUMPAD4 = 0x64
Global Const $VK_NUMPAD5 = 0x65
Global Const $VK_NUMPAD6 = 0x66
Global Const $VK_NUMPAD7 = 0x67
Global Const $VK_NUMPAD8 = 0x68
Global Const $VK_NUMPAD9 = 0x69
Global Const $VK_MULTIPLY = 0x6A
Global Const $VK_ADD = 0x6B
Global Const $VK_SUBTRACT = 0x6D
Global Const $VK_DECIMAL = 0x6E
Global Const $VK_DIVIDE = 0x6F
Global Const $VK_F1 = 0x70
Global Const $VK_F2 = 0x71
Global Const $VK_F3 = 0x72
Global Const $VK_F4 = 0x73
Global Const $VK_F5 = 0x74
Global Const $VK_F6 = 0x75
Global Const $VK_F7 = 0x76
Global Const $VK_F8 = 0x77
Global Const $VK_F9 = 0x78
Global Const $VK_F10 = 0x79
Global Const $VK_F11 = 0x7A
Global Const $VK_F12 = 0x7B
Global Const $VK_NUMLOCK = 0x90
Global Const $VK_SCROLL = 0x91
Func _ReplaceKey($Key)
$Key = StringReplace($Key, "{DELETE}", $VK_BACK)
$Key = StringReplace($Key, "{TAB}", $VK_TAB)
$Key = StringReplace($Key, "{ENTER}", $VK_RETURN)
$Key = StringReplace($Key, "+", $VK_SHIFT)
$Key = StringReplace($Key, "{LSHIFT}", $VK_SHIFT)
$Key = StringReplace($Key, "{RSHIFT}", $VK_SHIFT)
$Key = StringReplace($Key, "^", $VK_CONTROL)
$Key = StringReplace($Key, "{LCTRL}", $VK_CONTROL)
$Key = StringReplace($Key, "{RCTRL}", $VK_CONTROL)
$Key = StringReplace($Key, "!", $VK_MENU)
$Key = StringReplace($Key, "{LALT}", $VK_MENU)
$Key = StringReplace($Key, "{RALT}", $VK_MENU)
$Key = StringReplace($Key, "{PAUSE}", $VK_PAUSE)
$Key = StringReplace($Key, "{CAPSLOCK}", $VK_CAPITAL)
$Key = StringReplace($Key, "{CAPSLOCK ON}", $VK_CAPITAL)
$Key = StringReplace($Key, "{CAPSLOCK OFF}", $VK_CAPITAL)
$Key = StringReplace($Key, "{CAPSLOCK TOGGLE}", $VK_CAPITAL)
$Key = StringReplace($Key, "{ESCAPE}", $VK_ESCAPE)
$Key = StringReplace($Key, "{SPACE}", $VK_SPACE)
$Key = StringReplace($Key, "{PGUP}", $VK_PRIOR)
$Key = StringReplace($Key, "{PGDN}", $VK_NEXT)
$Key = StringReplace($Key, "{END}", $VK_END)
$Key = StringReplace($Key, "{HOME}", $VK_HOME)
$Key = StringReplace($Key, "{LEFT}", $VK_LEFT)
$Key = StringReplace($Key, "{UP}", $VK_UP)
$Key = StringReplace($Key, "{RIGHT}", $VK_RIGHT)
$Key = StringReplace($Key, "{DOWN}", $VK_DOWN)
$Key = StringReplace($Key, "{PRINTSCREEN}", $VK_SNAPSHOT)
$Key = StringReplace($Key, "{INSERT}", $VK_INSERT)
$Key = StringReplace($Key, "{DELETE}", $VK_DELETE)
$Key = StringReplace($Key, "{NUMPAD0}", $VK_NUMPAD0)
$Key = StringReplace($Key, "{NUMPAD1}", $VK_NUMPAD1)
$Key = StringReplace($Key, "{NUMPAD2}", $VK_NUMPAD2)
$Key = StringReplace($Key, "{NUMPAD3}", $VK_NUMPAD3)
$Key = StringReplace($Key, "{NUMPAD4}", $VK_NUMPAD4)
$Key = StringReplace($Key, "{NUMPAD5}", $VK_NUMPAD5)
$Key = StringReplace($Key, "{NUMPAD6}", $VK_NUMPAD6)
$Key = StringReplace($Key, "{NUMPAD7}", $VK_NUMPAD7)
$Key = StringReplace($Key, "{NUMPAD8}", $VK_NUMPAD8)
$Key = StringReplace($Key, "{NUMPAD9}", $VK_NUMPAD9)
$Key = StringReplace($Key, "{NUMPADMULT}", $VK_MULTIPLY)
$Key = StringReplace($Key, "{NUMPADADD}", $VK_ADD)
$Key = StringReplace($Key, "{NUMPADSUB}", $VK_SUBTRACT)
$Key = StringReplace($Key, "{NUMPADDOT}", $VK_DECIMAL)
$Key = StringReplace($Key, "{NUMPADDIV}", $VK_DIVIDE)
$Key = StringReplace($Key, "{F1}", $VK_F1)
$Key = StringReplace($Key, "{F2}", $VK_F2)
$Key = StringReplace($Key, "{F3}", $VK_F3)
$Key = StringReplace($Key, "{F4}", $VK_F4)
$Key = StringReplace($Key, "{F5}", $VK_F5)
$Key = StringReplace($Key, "{F6}", $VK_F6)
$Key = StringReplace($Key, "{F7}", $VK_F7)
$Key = StringReplace($Key, "{F8}", $VK_F8)
$Key = StringReplace($Key, "{F9}", $VK_F9)
$Key = StringReplace($Key, "{F10}", $VK_F10)
$Key = StringReplace($Key, "{F11}", $VK_F11)
$Key = StringReplace($Key, "{F12}", $VK_F12)
$Key = StringReplace($Key, "{NUMLOCK}", $VK_NUMLOCK)
$Key = StringReplace($Key, "{NUMLOCK ON}", $VK_NUMLOCK)
$Key = StringReplace($Key, "{NUMLOCK OFF}", $VK_NUMLOCK)
$Key = StringReplace($Key, "{NUMLOCK TOGGLE}", $VK_NUMLOCK)
$Key = StringReplace($Key, "{SCROLLLOCK}", $VK_SCROLL)
$Key = StringReplace($Key, "{SCROLLLOCK ON}", $VK_SCROLL)
$Key = StringReplace($Key, "{SCROLLLOCK OFF}", $VK_SCROLL)
$Key = StringReplace($Key, "{SCROLLLOCK TOGGLE}", $VK_SCROLL)
Return $Key
EndFunc
|
Die Tasten kannst du auch wie bei ControlSend benutzen:
PHP Code:
_PostMessage_Send($hWnd, "{TAB}")
|
|
|
Similar Threads
|
Welcher Bot zum leveln - Fragen über Fragen
09/17/2010 - WoW Bots - 6 Replies
Hallo zusammen,
Die Geister scheiden sich ja bekanntlich an dieser Frage, doch ich befasse mich damit für das kommende Addon. Ich selber besitze 28Accounts, also die Frage ist berechtigt wie nun leveln?
Ich selber nutze zur Zeit Pirox, klar Gathern ist nett ohne Frage doch wie nun ab 80 leveln? Pirox ist da doch recht langsam und halt net sonderlich klug, AIO Bot zu teuer da nur pro Key 1 Char.
HB naja.... sehr teuer wie ich finde...
Was werdet ihr nutzen?
|
All times are GMT +1. The time now is 10:22.
|
|