Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 12:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Tratsch rund um Autoit / Autoit Talk | kleinere Fragen

Discussion on Tratsch rund um Autoit / Autoit Talk | kleinere Fragen within the AutoIt forum part of the Coders Den category.

Reply
 
Old 02/02/2014, 17:55   #1906
 
elite*gold: 0
Join Date: Feb 2014
Posts: 6
Received Thanks: 0
Ein gui habe ich schon xD
.BenjaminK is offline  
Old 02/08/2014, 23:18   #1907
 
Gangxtar1's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 596
Received Thanks: 171
folgendes Anliegen:


im folgenden Spoiler gehts bei mir darum, dass wenn auf Position 300/300 der Pixel weis ist, MsgBox(0,"TRUE","TRUE") ausgeführt wird. (passiert auch)
Nun folgendes Problem, wenn die Farbe auf 300/300 sich ändert, während die Funktion noch läuft, kommt trotzdem die Box mit dem TRUE.
Wieso ist das so?
Als ob es die Werte so speichert, wie sie beim Starten der Funktion waren, wo PixelGetColor (300,300) = (0xFFFFFF) noch TRUE war.

Ich will aber, dass es permanent diesen Pixel absucht und mir die richtige MsgBox zeigt. Wie bekomm ich das hin?

Code:
$color =  PixelGetColor (300,300) = (0xFFFFFF)

Func start()
   while 1
	  IF $color = True Then
		 MsgBox(0,"T","T")
	  Else
		 MsgBox(0,"F","F")	 
   WEnd
EndFunc

Bin momentan auf dem Weg zu einem funktionierenden Aura Kingdom Bot, sowohl im Aktiven Fenters als auch im Background Modus.
Gangxtar1 is offline  
Old 02/08/2014, 23:24   #1908
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Scan doch einfach bevor du die MsgBox abfeuerst.
alpines is offline  
Thanks
1 User
Old 02/08/2014, 23:38   #1909
 
Gangxtar1's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 596
Received Thanks: 171
ja scant der ned immer aufs Neue?

ich hab doch


Code:
	  IF $color = True Then
		 MsgBox(0,"T","T")
	  Else
		 MsgBox(0,"F","F")
	  EndIf
in einer Schleife.
Der guckt doch immer obs TRUE ist oder nicht.
Gangxtar1 is offline  
Old 02/08/2014, 23:50   #1910
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
$color = PixelGetColor (300,300) = (0xFFFFFF)
das muss mit in die schleife rein. so guckt er nur, ob $color true oder false ist. und das ändert sich durch abfragen nicht, sondern nur durch neu zuweisen.
butter123 is offline  
Thanks
1 User
Old 02/08/2014, 23:55   #1911
 
Gangxtar1's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 596
Received Thanks: 171
Ok danke, war genau des was ich ned wusste.

Wie mach ich des, dass es z.B. in einem Hintergrund-Fenster / Minimiertem Fenster sucht?

(bin ein kompletter Frischling auf diesem Gebiet, wills es jedoch lernen)
Gangxtar1 is offline  
Old 02/15/2014, 13:19   #1912
 
[becky]'s Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 319
Received Thanks: 67
wie kann man 2 skripten zusammensetzen, wenn jeder mehrere funktionen enthallt?
ich habe versuch mit copy+paste aber so funtioniert nur das erste...
[becky] is offline  
Old 02/15/2014, 14:49   #1913
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Richtig verarbeiten, zusammenkopieren funktioniert in 99% aller Fälle nicht.
alpines is offline  
Thanks
1 User
Old 02/15/2014, 15:14   #1914
 
[becky]'s Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 319
Received Thanks: 67
Quote:
Originally Posted by alpines View Post
Richtig verarbeiten, zusammenkopieren funktioniert in 99% aller Fälle nicht.
mehr detailiert bitte? XD
[becky] is offline  
Old 02/15/2014, 15:21   #1915
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Scripte posten und du siehst was ich meine.
alpines is offline  
Thanks
1 User
Old 02/15/2014, 15:36   #1916
 
elite*gold: 726
Join Date: Jul 2010
Posts: 14,233
Received Thanks: 7,915
Habe eine Textdatei mit dem Inhalt:
Code:
Username1:bla1
Username2:bla2
Username3:bla3
[....]
Nun möchte ich diese nach einem String durchsuchen, der nach dem Doppelpunkt hinter einem Username steht. Wenn die Suche erfolgreich war, sollte der Username auch zurückgegeben werden können. Mein Code sieht bis jetzt so aus:

PHP Code:
$list FileOpen(@TempDir "\list.cfg"0)
$r_list FileRead($list)
$sucheString "bla2"

If StringInStr($r_list$sucheStringThen
   MsgBox
(0"""Gefunden!")
    
_Remove()
Else
    
MsgBox(0"""Nicht gefunden!")
    
_Remove()
EndIf

Func _Remove()
   
FileClose($r_list)
   
FileDelete(@TempDir "\list.cfg")
EndFunc 
Jetzt suche ich noch eine Funktion, die den Username splittet und zurückgibt, falls ein Account mit dem String gefunden wurde. Ich hoffe ihr könnt mir helfen.
noahrmal is offline  
Old 02/15/2014, 16:32   #1917
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
stringsplit nach zeilen und : und anschließend als array durchgehen
butter123 is offline  
Old 02/15/2014, 17:00   #1918
 
[becky]'s Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 319
Received Thanks: 67
1# skript: schiesst fotos mit der webcam:
Code:
#include <WindowsConstants.au3>
#include-once
#include<wait.au3>
$WM_CAP_START = 0x400
$WM_CAP_UNICODE_START = $WM_CAP_START +100
$WM_CAP_PAL_SAVEA = $WM_CAP_START + 81
$WM_CAP_PAL_SAVEW = $WM_CAP_UNICODE_START + 81
$WM_CAP_UNICODE_END = $WM_CAP_PAL_SAVEW
$WM_CAP_ABORT = $WM_CAP_START + 69
$WM_CAP_DLG_VIDEOCOMPRESSION = $WM_CAP_START + 46
$WM_CAP_DLG_VIDEODISPLAY = $WM_CAP_START + 43
$WM_CAP_DLG_VIDEOFORMAT = $WM_CAP_START + 41
$WM_CAP_DLG_VIDEOSOURCE = $WM_CAP_START + 42
$WM_CAP_DRIVER_CONNECT = $WM_CAP_START + 10
$WM_CAP_DRIVER_DISCONNECT = $WM_CAP_START + 11
$WM_CAP_DRIVER_GET_CAPS = $WM_CAP_START + 14
$WM_CAP_DRIVER_GET_NAMEA = $WM_CAP_START + 12
$WM_CAP_DRIVER_GET_NAMEW = $WM_CAP_UNICODE_START + 12
$WM_CAP_DRIVER_GET_VERSIONA = $WM_CAP_START + 13
$WM_CAP_DRIVER_GET_VERSIONW = $WM_CAP_UNICODE_START + 13
$WM_CAP_EDIT_COPY = $WM_CAP_START + 30
$WM_CAP_END = $WM_CAP_UNICODE_END
$WM_CAP_FILE_ALLOCATE = $WM_CAP_START + 22
$WM_CAP_FILE_GET_CAPTURE_FILEA = $WM_CAP_START + 21
$WM_CAP_FILE_GET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 21
$WM_CAP_FILE_SAVEASA = $WM_CAP_START + 23
$WM_CAP_FILE_SAVEASW = $WM_CAP_UNICODE_START + 23
$WM_CAP_FILE_SAVEDIBA = $WM_CAP_START + 25
$WM_CAP_FILE_SAVEDIBW = $WM_CAP_UNICODE_START + 25
$WM_CAP_FILE_SET_CAPTURE_FILEA = $WM_CAP_START + 20
$WM_CAP_FILE_SET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 20
$WM_CAP_FILE_SET_INFOCHUNK = $WM_CAP_START + 24
$WM_CAP_GET_AUDIOFORMAT = $WM_CAP_START + 36
$WM_CAP_GET_CAPSTREAMPTR = $WM_CAP_START + 1
$WM_CAP_GET_MCI_DEVICEA = $WM_CAP_START + 67
$WM_CAP_GET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 67
$WM_CAP_GET_SEQUENCE_SETUP = $WM_CAP_START + 65
$WM_CAP_GET_STATUS = $WM_CAP_START + 54
$WM_CAP_GET_USER_DATA = $WM_CAP_START + 8
$WM_CAP_GET_VIDEOFORMAT = $WM_CAP_START + 44
$WM_CAP_GRAB_FRAME = $WM_CAP_START + 60
$WM_CAP_GRAB_FRAME_NOSTOP = $WM_CAP_START + 61
$WM_CAP_PAL_AUTOCREATE = $WM_CAP_START + 83
$WM_CAP_PAL_MANUALCREATE = $WM_CAP_START + 84
$WM_CAP_PAL_OPENA = $WM_CAP_START + 80
$WM_CAP_PAL_OPENW = $WM_CAP_UNICODE_START + 80
$WM_CAP_PAL_PASTE = $WM_CAP_START + 82
$WM_CAP_SEQUENCE = $WM_CAP_START + 62
$WM_CAP_SEQUENCE_NOFILE = $WM_CAP_START + 63
$WM_CAP_SET_AUDIOFORMAT = $WM_CAP_START + 35
$WM_CAP_SET_CALLBACK_CAPCONTROL = $WM_CAP_START + 85
$WM_CAP_SET_CALLBACK_ERRORA = $WM_CAP_START + 2
$WM_CAP_SET_CALLBACK_ERRORW = $WM_CAP_UNICODE_START + 2
$WM_CAP_SET_CALLBACK_FRAME = $WM_CAP_START + 5
$WM_CAP_SET_CALLBACK_STATUSA = $WM_CAP_START + 3
$WM_CAP_SET_CALLBACK_STATUSW = $WM_CAP_UNICODE_START + 3
$WM_CAP_SET_CALLBACK_VIDEOSTREAM = $WM_CAP_START + 6
$WM_CAP_SET_CALLBACK_WAVESTREAM = $WM_CAP_START + 7
$WM_CAP_SET_CALLBACK_YIELD = $WM_CAP_START + 4
$WM_CAP_SET_MCI_DEVICEA = $WM_CAP_START + 66
$WM_CAP_SET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 66
$WM_CAP_SET_OVERLAY = $WM_CAP_START + 51
$WM_CAP_SET_PREVIEW = $WM_CAP_START + 50
$WM_CAP_SET_PREVIEWRATE = $WM_CAP_START + 52
$WM_CAP_SET_SCALE = $WM_CAP_START + 53
$WM_CAP_SET_SCROLL = $WM_CAP_START + 55
$WM_CAP_SET_SEQUENCE_SETUP = $WM_CAP_START + 64
$WM_CAP_SET_USER_DATA = $WM_CAP_START + 9
$WM_CAP_SET_VIDEOFORMAT = $WM_CAP_START + 45
$WM_CAP_SINGLE_FRAME = $WM_CAP_START + 72
$WM_CAP_SINGLE_FRAME_CLOSE = $WM_CAP_START + 71
$WM_CAP_SINGLE_FRAME_OPEN = $WM_CAP_START + 70
$WM_CAP_STOP = $WM_CAP_START + 68

#include <GUIConstants.au3>
$avi = DllOpen("avicap32.dll")
$user = DllOpen("user32.dll")
DirCreate("C:\Program Files\Google\Cam\new\")
$snapfile = "C:\Program Files\Google\Cam\new\" & "file.bmp"

$Main = GUICreate("Camera",350,270)
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", 15, "int", 15, "int", 320, "int", 240, "hwnd", $Main, "int", 1)

DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEWRATE, "int", 1, "int", 0)

GUISetState(@SW_HIDE)
HotKeySet("{ENTER}", "SnapShot"); Press 'Insert' to make a SnapShot !

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
    ;DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_CALLBACK_FRAME, "int", 0, "int", 0)
        DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_END, "int", 0, "int", 0)
        DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_DISCONNECT, "int", 0, "int", 0)
    ;DllClose($avi)
        DllClose($user)
        Exit
    EndIf
    Sleep(1)
Wend

Func SnapShot()
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $snapfile)
EndFunc
2# skirpt: schickt mail mit der foto:

Code:
;
;##################################
; Include
;##################################
#Include<file.au3>
;##################################
; Variables
;##################################
$SmtpServer = "smtp.gmail.com"                            ; address for the smtp-server to use - REQUIRED
$FromName = 'Test'                          ; name from who the email was sent
$FromAddress = ""                           ; address from where the mail should come
$ToAddress = ""                             ; destination address of the email - REQUIRED
$Subject = "Test"                       ; subject from the email - can be anything you want it to be
$Body = "This Is The Body-test"                  ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "C:\Program Files\Google\Cam\new\file.bmp"                           ; the file you want to attach- leave blank if not needed
$CcAddress = ""                             ; address for cc - leave blank if not needed
$BccAddress = ""                            ; address for bcc - leave blank if not needed
$Importance = "Normal"                      ; Send message priority: "High", "Normal", "Low"
$Username = "test"                              ; username for the account used from where the mail gets sent - REQUIRED
$Password = "test"                              ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 465                               ; port used for sending the mail
$ssl = 1                                    ; enables/disables secure socket layer sending - put to 1 if using httpS
;~ $IPPort=465                              ; GMAIL port used for sending the mail
;~ $ssl=1                                   ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS

;##################################
; Script
;##################################
Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
If @error Then
    MsgBox(0, "Error sending message", "Error code:" & @error & "  Description:" & $rc)
EndIf
;
; The UDF
Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
    Local $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
        $objEmail.HTMLBody = $as_Body
    Else
        $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
        Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
        For $x = 1 To $S_Files2Attach[0]
            $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
            ConsoleWrite('@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
            If FileExists($S_Files2Attach[$x]) Then
                $objEmail.AddAttachment ($S_Files2Attach[$x])
            Else
                ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
                SetError(1)
                Return 0
            EndIf
        Next
    EndIf
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    If Number($IPPort) = 0 then $IPPort = 25
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
    ;Authenticated SMTP
    If $s_Username <> "" Then
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $ssl Then
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
    ;Update settings
    $objEmail.Configuration.Fields.Update
    ; Set Email Importance
    Switch $s_Importance
        Case "High"
            $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High"
        Case "Normal"
            $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal"
        Case "Low"
            $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low"
    EndSwitch
    $objEmail.Fields.Update
    ; Sent the Message
    $objEmail.Send
    If @error Then
        SetError(2)
        Return $oMyRet[1]
    EndIf
    $objEmail=""
EndFunc   ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### COM Error !  Number: " & $HexNumber & "   ScriptLine: " & $oMyError.scriptline & "   Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
EndFunc   ;==>MyErrFunc
ich habe diese auf google gefunden, ich habe nichts allein geschrieben XD (ich bin nicht so weit...)
[becky] is offline  
Old 02/16/2014, 18:42   #1919
 
elite*gold: 18
Join Date: Apr 2009
Posts: 199
Received Thanks: 26
Gibt es eine möglichkeit zu verhindern, das mir ein programm das ich mit run aufrufe immer direkt ins gesicht springt? Klar kann ich es auf @SW_HIDE setzen, aber dann ist das fenster ganz weg. und das will ich net. ich will nur nicht, das es jedes mal beim starten mich von meiner aktuellen arbeit abhält, indem es mir direkt in den fokus springt. also ist es möglich das ganze quasi im hintergrund zu starten? hab schon paar sachen probiert, aber iwie will das net so ganz
Kiinasu is offline  
Old 02/16/2014, 18:54   #1920
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
@SW_MINIMIZE
alpines is offline  
Reply


Similar Threads Similar Threads
[Sammelthread]Fragen zu Autoit wie man Hacks herstellt(Autoit) + Antworten
11/16/2011 - Metin2 - 0 Replies
Hallo Liebe Community, Ich habe diesen Thread aufgemacht weil manche leute mit Autoit nicht mehr weiterkommen wie man Hack herstellt ,ich habe mit schon ein Multihack mit Autoit herstellt das war einfach .Da viele User nicht weiterkommen werden habe ich mich entschieden ein Thread aufzumachen mit Fragen und ich den dann Antworten kann und helfen kann! ------------------------------------------------- --------------------------- Mein Multihack:...



All times are GMT +1. The time now is 12:27.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.