Klick-bot
Das hat mir Probleme bereitet...
Definiere bitte mal, was du unter Klick-bot verstehst, und wofür du das brauchst...
Klick-bot
Das hat mir Probleme bereitet...
Definiere bitte mal, was du unter Klick-bot verstehst, und wofür du das brauchst...
Bitte erstmal die Forenregelndurchlesen ![]()
Ansonsten herzlich willkommen im Forum ![]()
Kopier mal die FTPEx.au3 in das Verzeichnis, wo kompiliert wird...
Hat nur ein EndIf gefehlt ![]()
GUICreate("Option wählen", 600, 70, 1, 1)
$Standby = GUICtrlCreateButton("Standby", 0, 10, 100, 50)
$Herunterfahren = GUICtrlCreateButton("Herunterfahren", 100, 10, 100, 50)
$HerunterfahrenT = GUICtrlCreateCombo ("Zeiten zum Herunterfahren", 500, 10, 100, 50)
GUICtrlSetData(-1, "5min|10min|20min|40min|60min|80min|100min")
$_combo_text = GUICTRLRead($HerunterfahrenT)
$Abmelden = GUICtrlCreateButton("Abmelden", 200, 10, 100, 50)
$Neustarten = GUICtrlCreateButton("neustarten", 300, 10, 100, 50)
$Schliessen = GUICtrlCreateButton ("schließen", 400, 10, 100, 50)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $Standby
Shutdown(64)
Case $Herunterfahren
if $_combo_text = "5min" Then
Sleep (300000)
Shutdown (1+8)
elseif $_combo_text = "10min" Then
Sleep (600000)
Shutdown (1+8)
elseif $_combo_text = "20min" then
Sleep (1200000)
Shutdown (1+8)
elseif $_combo_text = "40min" then
Sleep (2400000)
Shutdown (1+8)
elseif $_combo_text = "60min" then
Sleep (3600000)
Shutdown (1+8)
elseif $_combo_text = "80min" then
Sleep (4800000)
Shutdown (1+8)
elseif $_combo_text = "100min" then
Sleep (6000000)
Shutdown (1+8)
EndIf
Case $Abmelden
Shutdown(0)
Case $Neustarten
Shutdown(2 + 16)
Case $Schliessen
GUISetState(@SW_HIDE)
EndSwitch
WEnd
While 1
Sleep(500)
WEnd
GUICtrlRead($clientlist, $list)
Das ergibt keinen Sinn...
Mach daraus mal
GUICtrlRead($clientlist)
[/autoit]Ganz ehrlich?
Das hättest du auch in der Hilfe gefunden -.-
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]While 1
If _IsPressed(41) Then
$file = FileOpen(@ScriptDir & "\testfile.txt", 1)
FileWrite($file, "Du hast den Hotkey a gedrückt")
FileClose($file)
EndIf
WEnd
dann machs mit
[autoit]_ispressed()
[/autoit]#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 633, 447, 293, 183)
$Tab1 = GUICtrlCreateTab(0, 0, 633-50, 447-50)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$tab2 = GUICtrlCreateTabItem("test1")
GUICtrlCreatePic(@MyDocumentsDir & "\Eigene Bilder\2.bmp",60,60)
$tab1 = GUICtrlCreateTabItem("test2")
GUICtrlCreatePic(@MyDocumentsDir & "\Eigene Bilder\1.jpg", 0, 60)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
So klappts bei mir wunderbar...
Es ist wichtig, das du die Bilder direkt nach den einzelnen Tab-Items erzeugst ![]()
Ich empfehle diese hier:
;
;##################################
; Include
;##################################
#Include<file.au3>
;################################## ; Variables
;##################################
$SmtpServer = "mail.server.com" ; address for the smtp-server to use - REQUIRED
$FromName = "John.Doe" ; name from who the email was sent
$FromAddress = "User@domain.com" ; address from where the mail should come
$ToAddress = "user@domain.com" ; destination address of the email - REQUIRED
$Subject = "Hello World!" ; subject from the email - can be anything you want it to be
$Body = "This script is great! See attachment!" ; 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 = "" ; 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 = "" ; 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") = 0
$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
Die von Name22 ist noch sehr fehleranfällig...
Klar, Global und Local braucht man meißtens nur für umfangreiche Programme
Ich machs trotzdem immer, da man so viele Fehler vermeidet ![]()
Wenn du eine Variable innerhalb einer Function als Local declarierst, kannst du außerhalb der Funktion nicht drauf zugreifen, so wird z.B. dieses Script mit einer Fehlermeldung abbrechen:
test()
[/autoit] [autoit][/autoit] [autoit]MsgBox(0,"",$var)
Func test()
Local $var = "test"
EndFunc
Machst du es aber z.B. so, klappt alles wunderbar:
Global $var
[/autoit] [autoit][/autoit] [autoit]test()
[/autoit] [autoit][/autoit] [autoit]MsgBox(0,"",$var)
Func test()
$var = "test"
EndFunc
Ich hoffe, ich konnte dir helfen ![]()
Edit: Lol, ich hab fast das Selbe wie Name gemacht ![]()
ZitatCartan12: So gut?
Lol ![]()
Könnte noch kleiner sein, aber was solls, ich will hier nicht rummeckern ![]()
Bin ich nicht für, würd mich als "ehrlichen" User ärgern...
Es reicht, wenns beim anmelden so groß da steht
Wer das ignoriert, würde auch deinen Vorschlag ignorieren ![]()
Was soll ich sagen, mein erster Thread war für'n Bot...
Danach 2 Monate funkstille, wo meine Freunde so lange gebottet haben, das man sie kaum noch ansprechen konnte, danach hab ich mich entschieden mal was produktives in AutoIt zu scripten, und war sofort von dem Forum begeistert...
Seitdem helfe ich
Edit: Und hasse Bots ![]()
P.S. AutoIt hab ich wegen umfangreicher Vorkenntisse schnell gelernt ![]()
Ja, wie gesagt, kein Support...
Edit: Upps, war nichts gegen dich Ali, war nur etwas zu spät...
Änder bitte mal deine Signatur, die is etwas groß geraten und zieht den ganzen Thread in die Länge ![]()
Vielleicht werde ich auch mal dazu gehören
Ich kam ja auch als Botter hierher !
Du bist doch nicht der einzige hier...
Du benimmst dich nur manchmal etwas auffällig ![]()
Ich hab ja nichts gegen dich, du bist witzig, aber du bist nicht immer sehr nett zu den User, und das finde ich unfair...
Edit: Oh Gott, jetzt wurd schon wieder der erste Beitrag gelöscht ![]()
Jetzt reichts, das war doch keine Lösung ![]()
Außerdem bin ich der Meinung, dass selbst aus dem schlimmsten Botter noch ein guter Programmierer werden kann...
Auch in diesem Forum gibt es viele Beispiele ![]()
Ich werd erst wütend, wenn meine Tipps missbraucht werden oder die Botter direkt den nächsten Thread aufmachen...
Nicht schlimm, schreib doch was anderes Produktives, dann lernst du die beste Programmiersprache der Welt auch richtig kennen ![]()
Les bitte erstmal die Forenregeln!
Edit: Zu spät ![]()
Nach Tutorial sieht das nicht aus, denn er hat "no" anstatt "not" benutzt ![]()