Macro

07/13/2011 13:42 Elborod#1
Servus ;D


Alsooooo,

ich hab mir für League of Legends ein Makro geschrieben, dass zb. bei einer 5-Tasten Maus bei Taste 5 Missing und bei Taste 6 Re in den chat schreibt.

Nun hätt ich das ganze natürlich gern auch für 3 Tasten Maus geschrieben. Das Skript funktioniert in der Theorie auch einwandfrei. Nur die Praktik sieht anders aus.... Leider gibt es immer minimale Zeitverzögerungen durch welche nicht immer abwechselnd auf SS ein RE folgt.
Kann mir wer helfen das ganze verlässlicher und cleaner zu gestalten?

Code:

PHP Code:
#include <Misc.au3>


$dll DllOpen("user32.dll")
$y 0

While 1
    Sleep 
250 )
            If 
_IsPressed("04"$dllThen
            
While _IsPressed("04"$dll)
                
Sleep(5)
            
WEnd
            send
("{Enter}")
            
sleep(250)
            
send("ss")
            
sleep(250)
            
send("{Enter}")
             Do
                
Sleep(5)
            
Until _IsPressed("04"$dll)
                While 
_IsPressed("04"$dll)
                    
Sleep(5)
                
WEnd
            send
("{Enter}")
            
sleep(250)
            
send("re")
            
sleep(250)
            
send("{Enter}")
  
    EndIf
WEnd
DllClose
($dll

Der für die 5Tasten Maus funzt Super. Falls wer braucht einfach PN.



Grüßé
Stoani
07/13/2011 14:07 Freddy​#2
[Only registered and activated users can see links. Click Here To Register...]

Der Titel ist etwas irreführend
07/13/2011 14:32 Ludder231#3
vllt kann man etwas besser machen indem man mit contolsend() was macht :)
07/14/2011 15:58 Elborod#4
Ich schonwieder....
Nach dem im Forum eh schon soviele unsinnige Threads korsieren, möchte ich einfach in dem Thread hier einen kleinen Themawechsel machen, anstatt extra einen neuen zu öffnen.

Also. Mal was ich hab:

Skript.
Funktionierende Checkbox Funktion mit Gui
Ein Video im Gui


Was ich gerne erreichen würde:

Durch das anhaken der Checkbox soll der Ton des Videos im gleichen Skript ausgeschaltet werden.


Was die Theorie sagt:
Mit Soundsetwavevolume sollte das ganze eigentlich funktionieren, da die Wave nur noch für das verwendete Skript gilt. Nur funktioniert das bei mir nicht ;)


Wäre schön wenn mit wer weiterhelfen könnte :)


Grüße
Stoani

PS.: Es wird auch ein PublicRelease von dem Programm rausgehn ;D



Edit: Code:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#AutoIt3Wrapper_UseX64 = n

$hWnd GUICreate("League of Legends - Macrobot"474386285176)
GUISetBkColor(0x000000)
$oWMP ObjCreate("WMPlayer.OCX")
$hEmbedd GUICtrlCreateObj($oWMP00640360)
$oWMP.URL = (".\League of Legends - Season One CG Cinematic Trailer.mp4")
$Start GUICtrlCreateButton("Start"11229625765)
GUICtrlSetFont(-1118002"Arial Black"
$About GUICtrlCreateButton("About"3763608925)
$Checkbox1 GUICtrlCreateCheckbox("Addmon?"482966557)
$Exit GUICtrlCreateButton("Exit"3762968965)
GUICtrlSetFont(-188002"Arial Black")
With $oWMP
    
.settings.volume 100
    
.stretchToFit True
    
.fullscreen True
    
.uiMode 'none'
    
.controls.play()
EndWith

GUISetState
()

While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

        Case 
$Start
            run
(".\Ss.exe")
            
run(".\Re.exe")
        
        Case 
$About
            MsgBox
(0,"Macrobot","The Macrobot was coded and designed by Stoani. It is made to make your laneing more safe. This is only the Alphap 1.0. Version")
    
        Case 
$Exit
            ProcessClose
("Ss.exe")
            
ProcessClose("Re.exe")
            Exit

    Case 
$Checkbox1
        
    $Check1 
GUICtrlRead($Checkbox1)
If 
$Check1 $GUI_CHECKED Then Aus()

EndSwitch
WEnd

Func Aus
()
SoundSetWaveVolume(0)
EndFunc 


EDIT 2:

Also hab das ganze jetzt so gelöst:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#AutoIt3Wrapper_UseX64 = n

$hWnd GUICreate("League of Legends - Macrobot"474386285176)
GUISetBkColor(0x000000)
$oWMP ObjCreate("WMPlayer.OCX")
$hEmbedd GUICtrlCreateObj($oWMP00640360)
$oWMP.URL = (".\League of Legends - Season One CG Cinematic Trailer.mp4")
$Start GUICtrlCreateButton("Start"11229625765)
GUICtrlSetFont(-1118002"Arial Black"
$About GUICtrlCreateButton("About"3763608925)
$Checkbox1 GUICtrlCreateCheckbox("Addmon?"482966557)
$Exit GUICtrlCreateButton("Exit"3762968965)
GUICtrlSetFont(-188002"Arial Black")
With $oWMP
    
.settings.volume 100
    
.stretchToFit True
    
.fullscreen True
    
.uiMode 'none'
    
.controls.play()
EndWith

GUISetState
()






While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

        Case 
$Start
            run
(".\Ss.exe")
            
run(".\Re.exe")
        
        Case 
$About
            MsgBox
(0,"Macrobot","The Macrobot was coded and designed by Stoani. It is made to make your laneing more safe. This is only the Alphap 1.0. Version")
    
        Case 
$Exit
            ProcessClose
("Ss.exe")
            
ProcessClose("Re.exe")
            Exit

    Case 
$Checkbox1
        
    $Check1 
GUICtrlRead($Checkbox1)
If 
$Check1 $GUI_CHECKED Then Aus()
If 
$Check1 $GUI_UNCHECKED Then Ein()



EndSwitch
WEnd






Func Ein
()
With $oWMP
    
.settings.volume 100
EndWith
EndFunc



Func Aus
()
With $oWMP
    
.settings.volume 0
EndWith
EndFunc 


Thread Closed