1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Re5p3c7

Beiträge von Re5p3c7

  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 14. Februar 2020 um 18:59

    Mit dieser Methode leider auch nicht ..

    C
    #include <GUIConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <File.au3>
    
    MsgBox($MB_OK, "x", "xx")
    
    fenstercheck ()
    
    Func fenstercheck ()
    
        shellExecute("chrome.exe","https://web.whatsapp.com/")
    
    EndFunc
    
    chromefenster ()
    
    Func chromefenster ()
    
       $x = 7
       $y = 54
       $laenge = 547
       $breite = 145
    
       WinWaitActive("WhatsApp - Google Chrome", "")
    
       WinMove("WhatsApp - Google Chrome","",$x,$y,$laenge,$breite)
    
       MsgBox($MB_OK, "Sollte eig gehen", "verschiebt aber nicht")
    
             MsgBox($MB_OK, "x", "xx")
    
    
    EndFunc
    Alles anzeigen
  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 14. Februar 2020 um 18:52

    Hallo,

    ebenfalls danke für deine Hilfe!

    Funktioniert leider auch nicht...

    Code
    MsgBox($MB_OK, "x", "xx")
    
    fenstercheck ()
    
    Func fenstercheck ()
    
        shellExecute("chrome.exe","https://web.whatsapp.com/")
    
    EndFunc
    
    chromefenster ()
    
    Func chromefenster ()
    
       $x = 7
       $y = 54
       $laenge = 547
       $breite = 145
    
       sleep(20000)
    
       If WinWaitActive("[CLASS:Chrome_WidgetWin_1]", "") Then
    
       WinMove("WhatsApp - Google Chrome","",$x,$y,$laenge,$breite)
    
       MsgBox($MB_OK, "Sollte eig gehen", "verschiebt aber nicht")
         Else
             MsgBox($MB_OK, "x", "xx")
         EndIf
    Alles anzeigen
  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 13. Februar 2020 um 16:44

    Hallo, ebenfalls danke für deine Hilfe!! Hier der Code... bitte nicht die Hände vor den Kopf, bin komplett neu in diesem Gebiet... Aber sehr interessant

    C
    #include <GUIConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <File.au3>
    
    MsgBox($MB_OK, "x", "xx")
    
    fenstercheck ()
    
    Func fenstercheck ()
    
        shellExecute("chrome.exe","https://web.whatsapp.com/")
    
    EndFunc
    
    chromefenster ()
    
    Func chromefenster ()
    
       $x = 7
       $y = 54
       $laenge = 547
       $breite = 145
    
       WinMove("WhatsApp - Google Chrome","",$x,$y,$laenge,$breite)
    EndFunc
    Alles anzeigen
  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 13. Februar 2020 um 08:17

    alpines

    Danke für deine Rückmeldung.

    Wenn ein Erfahrener das schreibt, dann gehe ich davon aus, dass er recht hat.

    Das Problem ist wie du meinst, das selbe.

    Ich versuche mich jetzt, mal mit Hilfe, sowas ähnliches aufzubauen.

    Habe hier auch in dem Forum ein "Nachschlagewerk" gefunden und mir mal heruntergeladen.

    Soweit bin ich gut damit klar gekommen.

    Wo es ein wenig hapert ist, ich habe jetzt einen Code erstellt, der automatisch Web-Whatsapp öffnet. Vorher ein paar MSGBoxen etc.

    Bis dahin funktioniert der Code wunderbar.

    Was jetzt nicht funktioniert ist, auch schon mehere Varianten probiert, dass er dieses Fenster in Google-Chrome an eine bestimmte Stelle in einer bestimmten Größe machen soll.

    Als BSP, habe ich das benutzt: WinMove ( "title", "text", x, y [, width [, height [, speed]]] )

    Aber er macht nichts.

    Hatte auch nachgelesen, dass man ein Sleep machen soll zwischen den Steps, aber das hatte auch nichts gebracht.

    Hast du villt. eine Idee? Oder ein anderer? Das er dieses google Chrome Fenster anpasst?

  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 11. Februar 2020 um 08:23

    Hallo,

    vielen Dank. Aktuell bin ich leider auf der Arbeit und kann erst gegen Abend testen.


    Aktuell sieht dann mein Code so aus.

    Habe ich soweit dies richtig ersetzt?

    C
    #include <GUIConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <File.au3>
    
    ChecarJanela()
    
    Func ChecarJanela()
       ;Default pos
       $x = 7
       $y = 54
       $largura = 547
       $altura = 145
    
       ;MsgBox($MB_SYSTEMMODAL,"","X: " & $aPos[0] & " Y:" & $aPos[1] & " Largura:" & $aPos[2] & " Altura:" & $aPos[3])
       Local $aPos = WinGetPos("WhatsApp - Google Chrome")
    
       if $aPos[0] == $x And $aPos[1] == $y And $aPos[2] == $largura And $aPos[3] == $altura Then
          IniciarBot()
       Else
          AjustarJanela($x,$y,$largura,$altura)
       EndIf
    EndFunc
    
    Func AjustarJanela($x,$y,$largura,$altura)
       WinMove("WhatsApp - Google Chrome","",$x,$y,$largura,$altura)
       ChecarJanela()
    EndFunc
    
    Func IniciarBot()
       While 1
        ProcurarPixelOnline()
       WEnd
    EndFunc
    
    Func ProcurarPixelOnline()
    
       $tempo=TimerInit()
       $tempoRegistrado = 0
    
       While 1
          $pixel = PixelSearch(0, 0,377, 175,0x5F5F5F)
          If not @error Then
             if $tempoRegistrado = 0 Then
                $hora = @HOUR & ":" & @MIN & ":" & @SEC
                $tempoRegistrado = 1
             EndIf
    
             $novo = TimerDiff ($tempo)
             $novo = (1000)+$novo
             $segundos = Round ($novo/1000)
             $novoMin = Floor ($segundos/60)
             $novoSeg = Mod ($segundos, 60)
             If $novoSeg < 10 Then
                $novoSeg = "0" & $novoSeg
                $tempoOnline = $novoMin & ":" & $novoSeg
             EndIf
          Else
             If Not IsDeclared("hora") Then
                $hora = 0
             Endif
    
             Sleep(500)
             If Not IsDeclared("tempoOnline") Then
                ExitLoop
             Else
                Local $hFile = FileOpen("C:\Users\Jean\Desktop\" & @MDAY & "-" & @MON & "-" & @YEAR & ".txt", 1)
                FileWrite($hFile, "[" & $hora & "] Tempo online: " & $tempoOnline & @CRLF)
                FileClose($hFile)
                ExitLoop
             Endif
          EndIf
       WEnd
    EndFunc
    Alles anzeigen
  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 10. Februar 2020 um 22:39

    Hallo,

    vielen Dank für das freundliche willkommen :)

    Hier der link:

    Externer Inhalt youtu.be
    Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

    Oder angefügt der Code:

    C
    #include <GUIConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <File.au3>
    
    ChecarJanela()
    
    Func ChecarJanela()
       ;Default pos
       $x = 0
       $y = 0
       $largura = 0
       $altura = 0
    
       ;MsgBox($MB_SYSTEMMODAL,"","X: " & $aPos[0] & " Y:" & $aPos[1] & " Largura:" & $aPos[2] & " Altura:" & $aPos[3])
       Local $aPos = WinGetPos("WhatsApp - Google Chrome")
    
       if $aPos[0] == $x And $aPos[1] == $y And $aPos[2] == $largura And $aPos[3] == $altura Then
          IniciarBot()
       Else
          AjustarJanela($x,$y,$largura,$altura)
       EndIf
    EndFunc
    
    Func AjustarJanela($x,$y,$largura,$altura)
       WinMove("WhatsApp - Google Chrome","",$x,$y,$width,$height)
       ChecarJanela()
    EndFunc
    
    Func IniciarBot()
       While 1
           ProcurarPixelOnline()
       WEnd
    EndFunc
    
    Func ProcurarPixelOnline()
    
       $tempo=TimerInit()
       $tempoRegistrado = 0
    
       While 1
          $pixel = PixelSearch(0, 0,341, 340,0x776F60)
          If not @error Then
             if $tempoRegistrado = 0 Then
                $hora = @HOUR & ":" & @MIN & ":" & @SEC
                $tempoRegistrado = 1
             EndIf
    
             $novo = TimerDiff ($tempo)
             $novo = (1000)+$novo
             $segundos = Round ($novo/1000)
             $novoMin = Floor ($segundos/60)
             $novoSeg = Mod ($segundos, 60)
             If $novoSeg < 10 Then 
                $novoSeg = "0" & $novoSeg
                $tempoOnline = $novoMin & ":" & $novoSeg
             EndIf
          Else
             If Not IsDeclared("hora") Then
                $hora = 0
             Endif
    
             Sleep(500)
             If Not IsDeclared("tempoOnline") Then
                ExitLoop
             Else
                Local $hFile = FileOpen("C:\Users\Jean\Desktop\" & @MDAY & "-" & @MON & "-" & @YEAR & ".txt", 1)
                FileWrite($hFile, "[" & $hora & "] Tempo online: " & $tempoOnline & @CRLF)
                FileClose($hFile)
                ExitLoop
             Endif
          EndIf
       WEnd
    EndFunc
    Alles anzeigen
  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 10. Februar 2020 um 21:02

    Hi,

    danke für deine Antwort.

    Wie würde denn der Quellcode lauten, damit es funktioniert?

    Was müsste ich löschen und mit deiner ersetzen?

  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 10. Februar 2020 um 20:31

    Was ich nicht ganz verstehe ist, dass es einmal funktioniert hat und wenige Minuten nicht mehr...

  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 10. Februar 2020 um 20:31

    Hallo,

    danke für die schnelle Antwort.

    Hier die Fehlermeldung:

    >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\TimLAP\Desktop\AutoIt v3 Script (neu).au3"

    "C:\Users\TimLAP\Desktop\AutoIt v3 Script (neu).au3" (25) : ==> Variable used without being declared.:

    WinMove("WhatsApp - Google Chrome","",$x,$y,$width,$height)

    WinMove("WhatsApp - Google Chrome","",$x,$y,^ ERROR

    >Exit code: 1 Time: 0.3904

  • Bräuchte Hilfe Variable used without being declared.:

    • Re5p3c7
    • 10. Februar 2020 um 19:05

    Hey lieber Member,

    ich hab vor einigen Tagen auf YouTube ein Video gesehen und wollte es mal nachmachen. Sind auch meine erste Erfahrungen mit diesem Programm.

    Einmal hab ich es zum laufen gebracht, aber nun erscheint immer eine Fehler-Meldung.

    Villt könnte mir jemand helfen.

    C
    #include <GUIConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <File.au3>
    
    ChecarJanela()
    
    Func ChecarJanela()
       ;Default pos
       $x = 7
       $y = 54
       $largura = 547
       $altura = 145
    
       ;MsgBox($MB_SYSTEMMODAL,"","X: " & $aPos[0] & " Y:" & $aPos[1] & " Largura:" & $aPos[2] & " Altura:" & $aPos[3])
       Local $aPos = WinGetPos("WhatsApp - Google Chrome")
    
       if $aPos[0] == $x And $aPos[1] == $y And $aPos[2] == $largura And $aPos[3] == $altura Then
          IniciarBot()
       Else
          AjustarJanela($x,$y,$largura,$altura)
       EndIf
    EndFunc
    
    Func AjustarJanela($x,$y,$largura,$altura)
       WinMove("WhatsApp - Google Chrome","",$x,$y,$width,$height)
       ChecarJanela()
    EndFunc
    
    Func IniciarBot()
       While 1
        ProcurarPixelOnline()
       WEnd
    EndFunc
    
    Func ProcurarPixelOnline()
    
       $tempo=TimerInit()
       $tempoRegistrado = 0
    
       While 1
          $pixel = PixelSearch(0, 0,377, 175,0x5F5F5F)
          If not @error Then
             if $tempoRegistrado = 0 Then
                $hora = @HOUR & ":" & @MIN & ":" & @SEC
                $tempoRegistrado = 1
             EndIf
    
             $novo = TimerDiff ($tempo)
             $novo = (1000)+$novo
             $segundos = Round ($novo/1000)
             $novoMin = Floor ($segundos/60)
             $novoSeg = Mod ($segundos, 60)
             If $novoSeg < 10 Then
                $novoSeg = "0" & $novoSeg
                $tempoOnline = $novoMin & ":" & $novoSeg
             EndIf
          Else
             If Not IsDeclared("hora") Then
                $hora = 0
             Endif
    
             Sleep(500)
             If Not IsDeclared("tempoOnline") Then
                ExitLoop
             Else
                Local $hFile = FileOpen("C:\Users\Jean\Desktop\" & @MDAY & "-" & @MON & "-" & @YEAR & ".txt", 1)
                FileWrite($hFile, "[" & $hora & "] Tempo online: " & $tempoOnline & @CRLF)
                FileClose($hFile)
                ExitLoop
             Endif
          EndIf
       WEnd
    EndFunc
    Alles anzeigen

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™