Beiträge von funkey
-
-
Mir folgendem Code bekommt man alle Links aus dem Testcode von Post#20
Spoiler anzeigen
[autoit]#include <IE.au3>
[/autoit] [autoit][/autoit] [autoit]$oIE = _IECreate(@ScriptDir& '\Test.htm')
[/autoit] [autoit][/autoit] [autoit]
$oLink = _IELinkGetCollection($oIE)For $element In $oLink
[/autoit] [autoit][/autoit] [autoit][/autoit]
MsgBox(0,"",$element.href)
Next -
So! Hab mir extra das Programm ctWLANKloner (250kB) downgeloadet. Gefällt mir sehr gut!!
Außerdem brauchte ich noch zusätzlich WindowsXP-KB918997-v6-x86-DEU.exe von Microsoft (Wireless LAN-API)!
Aber es hat sich gelohnt, mir gefällt das Tool, auch wenn ich es nicht wirklich oft benötigen werde.Das kam dabei raus:
Spoiler anzeigen
[autoit]#include <File.au3>
[/autoit] [autoit][/autoit] [autoit]Global $title = "ctWLANKloner" ;->Title von Programmfenster deklarieren
[/autoit] [autoit][/autoit] [autoit]$Dateien = _FileListToArray(@ScriptDir, '*.wlan')
[/autoit] [autoit][/autoit] [autoit]
If @error Then
MsgBox(16, "Fehler", "Keine wlan-Dateien für den Import gefunden!")
Exit
EndIfFor $i = 1 To $Dateien[0]
[/autoit]
ShellExecute(@ScriptDir & "\ctWLANKloner.exe", $Dateien[$i])
WinWait($title, "Soll die")
ControlClick($title, "&Ja", "Button1")
$Exists = WinWait($title, "Ein Profil", 1)
If $Exists Then ControlClick($title, "&Ja", "Button1")
Next -
Was genau heißt 'es funktioniert nicht mehr richtig'? Kommt eine Fehlermeldung, dass etwas nicht geht oder kann eine Datei nicht geschrieben oder gelesen werden oder was?
Normalerweise gibt es keine Probleme, wenn das Programm 'richtig' geschrieben ist. Es kommt aber häufig zu Fehlermeldungen, wenn man das Programm mit dem Obfuscator kompiliert.
Bitte beschreib genauer was nicht geht, oder hänge das Skript an, damit man es testen kann.
mfg funkey
-
Das Problem ist nur, dass man mit
[autoit]Global Const $WS_EX_COMPOSITED = 0x2000000 ; Windows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering.
[/autoit]gleich viel mehr CPU-Auslastung hat. Kann sein, dass das bei euren Maschinen nicht ins Gewicht fällt, aber mein Athlon XP 2400+ geht dabei ziemlich in die Knie, wenn das ganze flüssig aussehen soll.
Vllt ginge es besser mit AdlibEnable. -
Sieht so aus, als ob diese WinAPI Funktion noch nicht in Autoit übersetzt wurde. Ich glaube nicht, dass ich das hinbekomme, aber ich denke Prog@ndi oder ein anderer super Programmierer werden das sicher hinbekommen. Ich werd's vllt auch mal versuchen.
-
Ich greife mal ein altes Thema auf, da ich gerade darüber gestolpert bin zu zufällig sah dass ISI360 online ist!
So ist es schon fast gut, nur die 'Naht' zwischen den Bildern sieht man noch manchmal.
Spoiler anzeigen
[autoit]#include <StructureConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <WinAPI.au3>Global $Fensterhoehe = 650
[/autoit] [autoit][/autoit] [autoit]
Global $Fensterbreite = 900
Global $Bildbreite = $Fensterbreite#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\ISI\Eigene Dateien\AutoIT\ISMediaportal\main.kxf
[/autoit] [autoit][/autoit] [autoit]
$hwnd = GUICreate("Moving Background", $Fensterbreite, $Fensterhoehe, 226, 158)$backgroundimage1 = GUICtrlCreatePic(@WindowsDir&"\Angler.bmp", 0, 0, $Bildbreite, $Fensterhoehe, BitOR($WS_GROUP,$WS_CLIPSIBLINGS,$WS_EX_LAYERED))
[/autoit] [autoit][/autoit] [autoit]
$backgroundimage2 = GUICtrlCreatePic(@WindowsDir&"\Angler.bmp", -$Bildbreite, 0, $Bildbreite, $Fensterhoehe, BitOR($WS_GROUP,$WS_CLIPSIBLINGS,$WS_EX_LAYERED))guictrlsetstate(-1,$GUI_DISABLE)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$Button1 = GUICtrlCreateButton("Button1", 32, 232, 121, 33, 0)
GUICtrlSetState(-1, $GUI_ONTOP)
$Button2 = GUICtrlCreateButton("Button1", 113, 325, 121, 33, 0)
GUICtrlSetState(-1, $GUI_ONTOP)
$Button3 = GUICtrlCreateButton("Button1", 377, 185, 121, 33, 0)
GUICtrlSetState(-1, $GUI_ONTOP)
$Label1 = GUICtrlCreateLabel("Text..text..text", 48, 104, 71, 17)
GUICtrlSetState(-1, $GUI_ONTOP)
$Label2 = GUICtrlCreateLabel("Text..text..text", 58, 427, 119, 28)
GUICtrlSetState(-1, $GUI_ONTOP)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("Text..text..text", 235, 263, 119, 28)
GUICtrlSetState(-1, $GUI_ONTOP)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("Text..text..text", 433, 441, 119, 28)
GUICtrlSetState(-1, $GUI_ONTOP)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###$newX = 0
[/autoit] [autoit][/autoit] [autoit]
do
$newX = $newX+5
controlmove($hwnd,"",$backgroundimage1,$newX,0)
controlmove($hwnd,"",$backgroundimage2,$newX -$Bildbreite,0)If $newX = $Fensterbreite Then $newX = 0
[/autoit]
sleep(20)
until GUIGetMsg() = $GUI_EVENT_CLOSE -
Anmeldeskripts und Dienste und Komandozeilenprogramme sind das eine, aber grafische Programme wie ein normales Setup-Programm ist was ganz anderes. Für mich zumindest! Sonst könnte ja jeder hergehen und ein fake Login-Fenster basteln oder ähnliches.
-
_IsPressed lässt die Tasten immer durch.
-
Das wäre ziemlich dumm von Microsoft, wenn das einfach so ginge.
-
Ich hätte es so gemacht
Spoiler anzeigen
[autoit]#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <ScreenCapture.au3>Global $Anzahl = 0, $Wechsel = 0, $dll = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(1)
If _IsPressed("01", $dll) And $Wechsel = 0 Then
_CountLeftMouse()
ElseIf Not _IsPressed("01", $dll) And $Wechsel = 1 Then
$Wechsel = 0
ElseIf _IsPressed("04", $dll) Then
_MiddleMouse()
ElseIf _IsPressed("1B", $dll) Then
_Ende()
EndIf
WEndFunc _CountLeftMouse()
[/autoit] [autoit][/autoit] [autoit]
$Wechsel = 1
$Anzahl += 1
ToolTip($Anzahl)
EndFunc ;==>_CountLeftMouseFunc _MiddleMouse()
[/autoit] [autoit][/autoit] [autoit]
_ScreenCapture_Capture(@ScriptDir & '\Screenshot.jpg')
MsgBox(0, "Mittlere Taste", "Das Bild wurde gespeichert!")
EndFunc ;==>_MiddleMouseFunc _Ende()
[/autoit]
DllClose($dll)
MsgBox(0, "Linke Maustaste", "Die linke Maustaste wurde " & $Anzahl & " mal gedrückt!")
Exit
EndFunc ;==>_Ende -
-
Die Konsole in Scite ist die Ausgabe unterhalb des Bereiches in dem ich den Code eingebe. Dort wo auch Fehlermeldungen angezeigt werden.
Bei Autoit.de kommt zum Beispiel das Ergebnis raus:
Code
Alles anzeigenForm-Index: 0 / Name: 0 Form: 0 /Element: 0 /Name: q Form: 0 /Element: 1 /Name: types[] Form-Index: 1 / Name: 0 Form: 1 /Element: 0 /Name: cmd Form: 1 /Element: 1 /Name: encrypted Form-Index: 2 / Name: 0 Form: 2 /Element: 0 /Name: message Form: 2 /Element: 1 /Name: page Form: 2 /Element: 2 /Name: s Form: 2 /Element: 3 /Name: 0 -
Schau dir _isPressed an.
-
Dll's verwendest du für Funktionen, die es so nicht in Autoit gibt. Hier im Forum findest du sicher viele Beispiele wozu man Dll's verwenden kann. Häufig werden Windows-Standard-Dll's verwendet wie z.B. kernel32.dll oder user32.dll. Eine Dll kann eine Unzahl von Funktionen enthalten. Die Beispiel-DLL von DeepRed enthält nur eine Funktion mit dem Namen 'AddNumbers'.
-
Am besten das NOTIFY weglassen
[autoit]BitOR($WS_GROUP,$WS_CLIPSIBLINGS))
[/autoit] -
Nichts zu danken. Auf gelöst kannst du selber umstellen, indem du den ersten Beitrag editierst.
Noch ein Beispiel mit Pfad und Dateinamen getrennt
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form2 = GUICreate("Form1", 301, 89, 185, 188)
$Input1 = GUICtrlCreateInput("", 40, 32, 121, 21)
$Input2 = GUICtrlCreateInput("", 40, 60, 121, 21)
$Button1 = GUICtrlCreateButton("Durchsuchen", 176, 32, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Datei = FileOpenDialog("Datei öffnen", @ScriptDir, 'Alle Dateien (*.*)')
If @error Then ContinueCase
GUICtrlSetData($Input1, StringLeft($Datei, StringInStr($Datei,'\', 0, -1)))
GUICtrlSetData($Input2, StringTrimLeft($Datei, StringInStr($Datei,'\', 0, -1)))
EndSwitch
WEnd -
Nur Pfad anzeigen oder Dateiname mit Pfad? Hab mal die einfachste Variante gewählt.
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form2 = GUICreate("Form1", 301, 89, 185, 188)
$Input1 = GUICtrlCreateInput("", 40, 32, 121, 21)
$Button1 = GUICtrlCreateButton("Durchsuchen", 176, 32, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Input1, FileOpenDialog("Datei öffnen", @ScriptDir, 'Alle Dateien (*.*)'))
EndSwitch
WEnd -
Mir Alt+Q kannst du das Programm beenden
[autoit]HotKeySet('h', '_StrgH')
[/autoit][autoit][/autoit][autoit]
HotKeySet('!q', '_Ende')While 1
[/autoit][autoit][/autoit][autoit]
Sleep(1000)
WEndFunc _StrgH()
[/autoit][autoit][/autoit][autoit]
Send('^h')
EndFuncFunc _Ende()
[/autoit]
Exit
EndFuncAlles keine Hexerei mit Autoit!
Edit: Sorry hab das mit dem Spiel erst später gelesen, sonst hätte ich nicht geholfen, da es dann ja so eine Art Bot ist.
Und die wollen wir nicht! http://www.autoit.de/index.php?page=Forumrules -
Schreibt die Informationen in die Console von Scite!
Spoiler anzeigen
[autoit]#include <IE.au3>
[/autoit] [autoit][/autoit] [autoit]$Url = 'www.autoit.de'
[/autoit] [autoit][/autoit] [autoit]
$oIE = _IECreate ($Url)$oForms = _IEFormGetCollection ($oIE)
[/autoit]
If @error Then
MsgBox(0, '', 'Keine Formen enthalten')
Else
$Index = 0
For $oForm In $oForms
ConsoleWrite('Form-Index: ' & $Index & ' / Name: ' & $oForm.Name & @CRLF)
$oFormElements = _IEFormElementGetCollection($oForm)
If IsObj($oFormElements) Then
$IndexElement = 0
For $oElement In $oFormElements
ConsoleWrite('Form: ' & $Index & ' /Element: ' & $IndexElement & ' /Name: ' & $oElement.Name & @CRLF)
$IndexElement += 1
Next
EndIf
$Index += 1
Next
EndIfmfg funkey