Select
Case $msg = $button ;You pressed the button
$send1 = GUICtrlRead($key1) ;We read the key inside the input
While 1 ;We enter a never ending loop here
Send($send1) ;Send key
WEnd
;We cannot go here -> means that we won't register close message anymore
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
EndSelect
What you should do:
Instead of a loop inside a loop call a function everytime that will have a boolean value
like $running or something and if $running execute the send code, if not then not...
global $running = false
While 1
$msg = guigetmsg()
Select
...
case $msg = $button
$running = not $running ;Switch state
...
EndSelect
SomeFunc();if running will send keys if not, not...
wEnd
Func SomeFunc()
if $running then
$send1 = guictrlread($key1)
send($send1)
endif
endfunc
If you want to add more keys, you need more inputs, also you need to use scrollbars or sth...
Example of ussage:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StructureConstants.au3>
#include <GuiScrollBars.au3>
Global $inputs[0][3];x,y,handle
Global const $INPUT_INIT_X = 30
Global const $INPUT_INIT_Y = 10
Global const $INPUT_HEIGHT = 20
$hGUI = GUICreate("Test", 335, 100)
GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL")
For $i = 1 to 15
newInput() ;Create inputs
Next
$button = GUICtrlCreateButton("Read",200,60)
GUISetState(@SW_SHOW)
_GUIScrollBars_Init($hGUI,-1,UBound($inputs)*2)
_GUIScrollBars_EnableScrollBar($hGUI,$SB_HORZ,$ESB_DISABLE_BOTH)
Func newInput()
If UBound($inputs) > 0 Then
$x = $INPUT_INIT_X
$y = $INPUT_INIT_Y + $inputs[UBound($inputs)-1][1] + $INPUT_HEIGHT;Last input y
Else
$x = $INPUT_INIT_X
$y = $INPUT_INIT_Y
EndIf
ReDim $inputs[UBound($inputs)+1][3];
$inputs[UBound($inputs)-1][0] = $x
$inputs[UBound($inputs)-1][1] = $y
GUICtrlCreateLabel(UBound($inputs),$x-25,$y)
$inputs[UBound($inputs)-1][2] = GUICtrlCreateInput("",$x,$y,120)
EndFunc
While 1
$msg = GUIGetMsg()
If $msg = $button Then
$keys = ""
For $i = 0 To UBound($inputs)-1
$keys &= GUICtrlRead($inputs[$i][2]) & @CRLF
Next
MsgBox(0,"KEYS",$keys)
EndIf
If $msg = -3 Then ExitLoop
WEnd
;Don't try to understand this, it cames with autoit help file example...
Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam)
#forceref $Msg, $wParam, $lParam
Local $nScrollCode = BitAND($wParam, 0x0000FFFF)
Local $index = -1, $yChar, $yPos
Local $Min, $Max, $Page, $Pos, $TrackPos
For $x = 0 To UBound($aSB_WindowInfo) - 1
If $aSB_WindowInfo[$x][0] = $hWnd Then
$index = $x
$yChar = $aSB_WindowInfo[$index][3]
ExitLoop
EndIf
Next
If $index = -1 Then Return 0
; Get all the vertial scroll bar information
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT)
$Min = DllStructGetData($tSCROLLINFO, "nMin")
$Max = DllStructGetData($tSCROLLINFO, "nMax")
$Page = DllStructGetData($tSCROLLINFO, "nPage")
; Save the position for comparison later on
$yPos = DllStructGetData($tSCROLLINFO, "nPos")
$Pos = $yPos
$TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos")
Switch $nScrollCode
Case $SB_TOP ; user clicked the HOME keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Min)
Case $SB_BOTTOM ; user clicked the END keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Max)
Case $SB_LINEUP ; user clicked the top arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1)
Case $SB_LINEDOWN ; user clicked the bottom arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1)
Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page)
Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page)
Case $SB_THUMBTRACK ; user dragged the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $TrackPos)
EndSwitch
; // Set the position and then retrieve it. Due to adjustments
; // by Windows it may not be the same as the value set.
DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
_GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
_GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
;// If the position has changed, scroll the window and update it
$Pos = DllStructGetData($tSCROLLINFO, "nPos")
If ($Pos <> $yPos) Then
_GUIScrollBars_ScrollWindow($hWnd, 0, $yChar * ($yPos - $Pos))
$yPos = $Pos
EndIf
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_VSCROLL
[FRAGE] AutoIT / Scripts via Script starten 04/10/2012 - AutoIt - 4 Replies Guten Tag.
Ich habe mich so schlau wie möglich gemacht und trozdem finde ich meinen Fehler nicht.
Mein Script sieht so aus:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("ArcherMacro by Infinity", 300, 200)
AutoIt Script mit nomadMemory geht nicht. Und HWID Frage 01/18/2012 - AutoIt - 13 Replies Hallo Lute,
Ich habe eine Frage ich will für mich einen Hack erstellen,
aber leider verändert er die Values wohl nicht, da nix passiert.
Hier das Script:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
Frage zu Autoit Script 03/09/2011 - AutoIt - 3 Replies ich hoff erstmal das ich das so richtig eingefügt habe oO
ok zu meiner frage das ganze ist für League of Legend hab mir mal son bot angeschaut und werdmit dem ding ned schlau
vor dem _Login kommt #Includ <inet> und son seugs und irgendwas memory auslesen ka
ist das sowas wie keyloger oder sowas??? bin anfänger hab angst das sich das script mein pw ect schnappt xD
oder ist das ein login per web für das script damit man das überhaupt benutzen kann???
Frage : Howto paste pic into autoit v3 script 12/29/2010 - S4 League - 5 Replies EnglishHey Guys !
my question is ... how to past a pic into a autoit v3 file .. idk which code i should take ... i need help
i have seen lots of tut's and HowTo's but idk ...
soo i say Thank you for help
German