Haloo UltimateX,
herzlich willkomen im Forun und viel Spass mit AutoIt.
Schau dir einmal in der Hilfe FileOpenDialog und DriveGetDrive an,
mfg <(Auto)Bert
Haloo UltimateX,
herzlich willkomen im Forun und viel Spass mit AutoIt.
Schau dir einmal in der Hilfe FileOpenDialog und DriveGetDrive an,
mfg <(Auto)Bert
Hallo tak,
poste doch bitte dein komplettes Skript, habe keine Lust zum puzzlen vor allem wenn Teile fehlen. Ich kann z.B. nirgends _GUIImageList_Create entdecken. Analysiere das Skript von Progandy und setze es auf dein Projekt um,
mfg (Auto)Bert
Hallo tak,
ja ist möglich schau dir die hilfe zu _GUICtrlListView_SetImageList oder diesen Beitrag von @progandy an,
mfg (Auto)Bert
Hallo kleiner27,
bekomme die _filelist.au3 (aktuell aus #1) nicht zum starten. Die bisherigen Änderungen brachten mich zwar immer einen Schritt weiter (immer 1. Fehler beseitigt), doch dann steigt das Skript an einer anderen Stelle aus. Kann es sein dass du Variablennamen zustark verkürzt hast,
mfg (Auto)Bert
Hallo rollod,
grundsätzlich möglich da dieser Decoder am LPT' betrieben wird und es unter AutoIt schon Tools gibt, die Daten vom LPT lesen. Die Übergabe an Excel ist auch realisierbar.
Ich an deiner Stelle würde aber eine EMail- oder SMS-Lösung ins Auge fassen [bessere Eingbekontrolle des Anwenders und schriftlich (wenn auch nicht beweisssicher dokumentiert)]
mfg (Auto)Bert
Halo Sen,
so kommst du am einfachsten an deinen Chat, mit dem HTML / Java-Code von Spin selbst hast du eine gute Grundlage für dein Skript, denke ich zumindest.
mfg (Auto)Bert
Hallo Baron1977,
diese Version funktioniert bei mir:
[autoit];HotKeySet("{ESC}", "_SelfDelete") ;wenn Hotkey gedrueckt wird - Selbstzerstoerung
_SelfDelete()
Func _SelfDelete($iDelay = 0)
Local $sCmdFile
FileDelete(@TempDir & "\scratch.bat")
$sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
& ':loop' & @CRLF _ ;Schleifeneinstieg der BAT
& 'del "' & @ScriptFullPath & '"' & @CRLF _ ;löscht das aufrufende Skript bzw. EXE
& 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _ ;falls Skript/Exe noch da gehe zu Loop
& 'del ' & @TempDir & '\scratch.bat' ;das erstellte temporäre BATch-File löschen
FileWrite(@TempDir & "\scratch.bat", $sCmdFile) ;hier wird das BATch-File erstellt
Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE) ;und jetzt wird es unsichtbar ausgeführt
Exit ;dieses Skript/Exe beenden
EndFunc
das Skript nicht mit F5 starten, sonst löscht es sich selbst!!! Oder danach unbedingt nocheinmal abspeichern!!!
Edit: ist aber genau das Gegenteil was die Überschrift ausagt. Hier wird ein BATch-File erstellt, danach diese Skript und das BATch-File wieder gelöscht!
mfg (Auto)Bert
Hallo cartan12,
teste doch einmal dieses Skript:
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.2.12.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
;
;##################################
; Include
;##################################
#Include<file.au3>
;##################################
; Variables
;##################################
$SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIRED
$FromName = "Name" ; name from who the email was sent
$FromAddress = "your@Email.Address.com" ; address from where the mail should come
$ToAddress = "your@Email.Address.com" ; destination address of the email - REQUIRED
$Subject = "Userinfo" ; subject from the email - can be anything you want it to be
$Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file you want to attach- leave blank if not needed
$CcAddress = "CCadress1@test.com" ; address for cc - leave blank if not needed
$BccAddress = "BCCadress1@test.com" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
$Username = "******" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "********" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 25 ; port used for sending the mail
$ssl = 0 ; 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, ![]()
$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
mfg (Auto)Bert
Hallo Aquaplant,
hier das Original-Beispiel aus der Hilfe zu GuiCtrlCreateInput:
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]Example()
[/autoit] [autoit][/autoit] [autoit]Func Example()
Local $file, $btn, $msg
GUICreate(" My GUI input acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES
$file = GUICtrlCreateInput("", 10, 5, 300, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUICtrlCreateInput("", 10, 35, 300, 20) ; will not accept drag&drop files
$btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $btn
ExitLoop
EndSelect
WEnd
MsgBox(4096, "drag drop file", GUICtrlRead($file))
EndFunc ;==>Example
mfg (Auto)Bert
Hallo cartan12,
dann poste doch bitte dein aktuelles Skript damit man helfen kann,
mfg (Auto)Bert
Hallo SEuBo,
daran hatte ich auch zuerst gedacht und habe vorsichtshalber das Beispiel zu IniReadSection getestet. Meine Schlussfolgerung geht dahin, dass die Fehlermeldung aus seinem Skript kommt weil er das Beispiel der Hilfe nicht korrekt umgesetzt hat. Das geposteteSkript ist jedoch das Beispiel,
mfg (Auto)Bert
Hallo Aquaplant,
schau dir dieses Beispielskript an, darin sind beide Prob's gelöst:
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include<WindowsConstants.au3>
Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $hlstvwHoly = 0
Global $sTitel = 'Beispiele zur Nutzung der UDF _Easter'
Local $hMainGui = GUICreate($sTitel, 400, 280, 140, 150, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
;erzeugt eine GUI die zurückgebebene ID wird in der Variablen $hMainGui gespeichert
;die GUI hat BOXen für Mininmieren, Maximieren und ist in der Größe frei änderbar
GUISetOnEvent($GUI_EVENT_CLOSE, '_End')
;Verknüpft dem Event $Gui_Event_Close mit der Funktion _End
Local $hedtBox = GUICtrlCreateEdit("", 10, 10, 200, 200,BitOr($ES_WANTRETURN,$ES_MULTILINE))
;erzeugt ein Edit Steuerelement die zurückgegebe ID wird in der Variablen $hedtBox gespeichert
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKHEIGHT)
;verankert das Inputfield Links, rechts, oben und fixiert die Höhe
;beim Resizen bleibt es dadurch auf seiner Position und ändert nur die Breite
GUICtrlCreateButton('&Löschen)', 220, 10, 150, 25)
GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKRIGHT + $GUI_DOCKTOP)
;verankert den Button "Zeigen" rechts und oben und fixiert die Größe
;beim Resizen bleibt es dadurch auf seiner Position am rechten Rand
GUICtrlSetOnEvent(-1, '_Delete')
;Beim Klicken des Buttons wird die Funktion _Delete aufgerufen
GUICtrlCreateButton('Be&enden', 220, 115, 150, 25)
GUICtrlSetOnEvent(-1, '_END')
GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKRIGHT + $GUI_DOCKTOP)
GUICtrlCreateGraphic(0, 230, 400, 2, $SS_BLACKRECT)
GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKRIGHT + $GUI_DOCKLEFT + $GUI_DOCKBOTTOM)
Global $hStatus = GUICtrlCreateLabel("", 5, 235, 400, 25)
GUICtrlSetResizing(-1, $GUI_DOCKSIZE + $GUI_DOCKRIGHT + $GUI_DOCKLEFT + $GUI_DOCKBOTTOM)
;verankert das Label Links, rechts und unten; fixiert die Höhe
;beim Resizen bleibt es dadurch auf seiner Position und ändert nur die Breite wird angepasst
GUISetState()
While 1
Sleep(120)
WEnd
Func _End()
GUIDelete($hMainGui)
Exit
EndFunc ;==>_End
Func _Delete()
GUICtrlSetData($hedtBox, "")
EndFunc ;==>_Delete
zu 1. es geht immer noch (einfach Text eingeben und danach dir Löschen drücken
zu 2. Das ist nur ein Style-Problem (siehe Skript)
mfg (Auto)Bert
Halo rölu,
herzlich willkommen im Forum und viel Spass mit AutoIt,
mfg (Auto)Bert
Hallo b0tnet,
Vielen dank für eure vorschläge!!
ich weis nicht ob das jezt nur bei mir so der fall ist, aber wen ich bei diesen 2 Scripts auf den ersten button "start" klick, kann ich den 2ten jedoch nicht in diesem moment auch noch nutzten, also wären die MsgBox darsteht...
vieleicht ist es wegen dem Exit befehl, vll funkt es wen man den Dienst direkt ausknipsen will zum beispiel
den 2. kannst du anklicken, die func _exit wird jedoch erst nach Ablauf des Sleeps ausgelöst.
aber du hast ja jetzt eine grundsätzliche Möglichkeit mit dem Skript von Micha_He. ich würde es allerdings wie folgt abändern, sonst erscheint die 2. MsgBox laufend bis zum beenden des Skriptes:
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]Global $gestartet = False
Global $start
Global $hGUI = GUICreate("My Test-Gui with OnEvent", 300, 200,10,10)
[/autoit] [autoit][/autoit] [autoit]Global $btnStart = GUICtrlCreateButton("&Start", 90, 20, 120, 30)
Global $btnStop = GUICtrlCreateButton("be&enden", 90, 50, 120, 30)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
case $msg = $btnStart
GUICtrlSetState($btnStart,$gui_disable)
MsgBox (64, "Test", "Test 01")
$gestartet = True
$start = TimerInit()
case $msg = $btnStop
Exit
; Nur beispiel
EndSelect
[/autoit] [autoit][/autoit] [autoit]If $gestartet And TimerDiff($start) > 10000 Then
MsgBox (64, "Test", "Test 02")
GUICtrlSetState($btnStart,$gui_enable)
$gestartet = False
EndIf
WEnd
[/autoit]
mfg (Auto)Bert
Hallo andBlood,
Zitat>Wir von "www.kal--online.de" sind gegen illegale Programme oder Cheats, die dem Spieler einen Vorteil Anderen gegenüber verschaffen.
also Forenregeln lesen,
mfg (Auto)Bert
Hallo BOTNET,
hier einmal dein Beispiel im OnEvent-Modus:
#include <GuiConstantsEx.au3>
;#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Opt("GUIOnEventMode", 1)
Global $hGUI = GUICreate("My Test-Gui with OnEvent", 300, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
Global $btnStart = GUICtrlCreateButton("&Start", 90, 20, 120, 30)
GUICtrlSetOnEvent(-1, "_Start")
Global $btnExit = GUICtrlCreateButton("be&enden", 90, 50, 120, 30)
GUICtrlSetOnEvent(-1, "_Exit")
GUISetState()
While 1 ;just idle, do nothin
Sleep(1000)
WEnd
Func _Start()
MsgBox(64, "Test", "Test 01")
Sleep(10000)
MsgBox(64, "Test", "Test 02")
EndFunc ;==>_Start
Func _Exit()
Exit
EndFunc ;==>_Exit
aber auch gilt
Zitat>> von Nuts in Post 2<< Das funktioniert mit Autoit nur über Umwege oder gar nicht - ist eben eine Skriptsprache bei der Zeile für Zeile ausgeführt wird.
Per AdlibRegister lässt sich beispielsweise eine timergesteuerte Funktion aufrufen.
Du solltest dein Vorhaben etwas genauer erläutern, vielleicht findet sich ja eine Lösung
SEuBo: befürchte dass deine Lösung irgendwann die Resourcen sprengt bzw. das Skript abstürzt (zu viele Rekursionen, wenn es ausgiebig benutzt wird
mfg (Auto)Bert
hallo hellboy3.
so sollte es klappen:
#include <GUIConstantsEx.au3>
;#include <audio.au3>
#include <IE.au3>
Example()
[/autoit] [autoit][/autoit] [autoit]Func Example()
Local $slider1, $button, $msg, $iOld = -1, $iVolume
$url = "http://www.youtube.com/watch?v=cj3pD-cWRc0"
$Embedded = _IECreateEmbedded()
GUICreate("slider", 220, 100, 100, 200)
GUISetBkColor(0x00E0FFFF) ; will change background color
$slider1 = GUICtrlCreateSlider(10, 10, 200, 20)
SoundSetWaveVolume(50) ; change min/max value
$button = GUICtrlCreateButton("Be&enden", 75, 70, 70, 20)
$Edit1 = GUICtrlCreateObj($Embedded, 16, 60, 60, 12)
GUISetState()
GUICtrlSetData($slider1, 45) ; set cursor
_IENavigate($Embedded, $url)
Do
$iVolume = GUICtrlRead($slider1)
If $iOld <> $iVolume Then
SoundSetWaveVolume($iVolume)
$iOld = $iVolume
EndIf
$msg = GUIGetMsg()
If $msg = $button Then ExitLoop
Until $msg = $GUI_EVENT_CLOSE
GUIDelete()
Exit
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>Example
[/autoit]aber noch ungetestet,
mfg (Auto)Bert