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. Xenobiologist

Beiträge von Xenobiologist

  • Firefox Popup

    • Xenobiologist
    • 11. August 2009 um 17:53

    Hi,

    guck dir mal die FF.au3 an. Ggf. kannst du den Titel abfragen oder sowas. Immer überlegen wie du es manuell machst und dann dies automatisieren.

    Mega

  • Zufahlsgenertor? (Schere Stein Papier)

    • Xenobiologist
    • 11. August 2009 um 17:51

    LOL,

    außerdem solltest du sowas ausgliedern und nur dann aufrufen, wenn du es auch wirklich brauchst und nicht in der SChleife, da ansonsten der PC x-fach spielt, bis endlich der Button gedrückt wird.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Schere, Stein Papier!", 300, 171, 192, 124)
    GUISetBkColor(0x0B6295)
    GUISetIcon("C:\Users\Johannes\Desktop\Hacking\Stealer\Universal1337_Version_2_-_The_Account_Stealer_2\Extras\icons\noicon.ico")
    $Button1 = GUICtrlCreateButton("Stein", 32, 50, 65, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Schere", 112, 50, 65, 25, $WS_GROUP)
    $Button3 = GUICtrlCreateButton("Papier", 75, 90, 65, 25, $WS_GROUP)
    $Label1 = GUICtrlCreateLabel("", 200, 32, 100, 100)
    $Label2 = GUICtrlCreateLabel("Scripted by !Jo!", 200, 140, 65, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    Global $aPosi[3] = ['Stein', 'Schere', 'Papier']

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button2
    $Auswahl = "Schere"
    Sleep(500)
    $cool = MsgBox(0, "Pc sagt", ": " & _pc())
    Case $Button1
    $Auswahl = "Stein"
    Case $Button3
    $Auswahl = "Papier"
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _pc()
    Return $aPosi[Random(0, 2, 1)]
    EndFunc ;==>_pc

    [/autoit] [autoit][/autoit] [autoit]

    Func stop()
    Exit
    EndFunc ;==>stop

    [/autoit]

    Mega

  • Problem mit _INetSmtpMail

    • Xenobiologist
    • 11. August 2009 um 17:18

    Versuch mal dies :

    Spoiler anzeigen
    [autoit]

    #include <INet.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $s_SmtpServer = "mail.gmx.net"
    $s_FromName = "Chef"
    $s_FromAddress = "xxx@gmx.de"
    $s_ToAddress = "xxx@gmx.de"
    $s_Subject = "My Test UDF"
    $s_UName = "xxx@gmx.de"
    $s_PWD = "xxx"
    #cs
    $arIniRead = IniReadSection(@ScriptDir & '\mails.ini', "mail")
    $s_SmtpServer = $arIniRead[1][1]
    $s_FromName = $arIniRead[2][1]
    $s_FromAddress = $arIniRead[3][1]
    $s_ToAddress = $arIniRead[4][1]
    $s_Subject = $arIniRead[5][1]
    $s_UName = $arIniRead[6][1]
    $s_PWD = $arIniRead[7][1]
    MsgBox(0, "", $s_SmtpServer & ' ' & $s_FromName & ' ' & $s_FromAddress & ' ' & $s_ToAddress & ' ' & $s_Subject & ' ' & $s_UName & ' ' & $s_PWD)
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Dim $as_Body[2]
    $as_Body[0] = "Testing the new email udf"
    $as_Body[1] = "Second Line"
    $Response = _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_UName, $s_PWD, $s_Subject, $as_Body)
    ;~ $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
    $err = @error
    If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _INetSmtpMailAuth()
    ; Description: Sends an email using SMTP over TCP IP.
    ; Parameter(s): $s_SmtpServer - SMTP server to be used for sending email
    ; $s_FromName - Name of sender
    ; $s_FromAddress - eMail address of sender
    ; $s_ToAddress - Address that email is to be sent to
    ; $s_Username - Username for Authentication (bernd670)
    ; $s_Passwd - Password for Authentication (bernd670)
    ; $s_Subject - Subject of eMail
    ; $as_Body - Single dimension array containing the body of eMail as strings
    ; $s_helo - Helo identifier (default @COMPUTERNAME) sometime needed by smtp server
    ; $s_first - send before Helo identifier (default @CRLF) sometime needed by smtp server
    ; $b_trace - trace on a splash window (default 0 = no trace)
    ; Requirement(s): None
    ; Return Value(s): On Success - Returns 1
    ; On Failure - 0 and sets
    ; @ERROR = 1 - Invalid Parameters
    ; @ERROR = 2 - Unable to start TCP
    ; @ERROR = 3 - Unable to resolve IP
    ; @ERROR = 4 - Unable to create socket
    ; @ERROR = 5x - Cannot open SMTP session
    ; @ERROR = 50x - Cannot send body
    ; @ERROR = 5000 - Cannot close SMTP session
    ; Authors: Original function to send email via TCP - Asimzameer
    ; Conversion to UDF - Walkabout
    ; Correction Helo, timeout, trace - Jpm
    ; Correction send before Helo - Jpm
    ; Include Authentication - bernd670
    ;
    ;===============================================================================
    Func _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Passwd, $s_Subject = "", $as_Body = "", $s_helo = "", $s_first = "-1", $b_trace = 0)

    Local $v_Socket
    Local $s_IPAddress
    Local $i_Count
    Local $s_Send[9]
    Local $s_ReplyCode[9];Return code from SMTP server indicating success

    If $s_SmtpServer = "" Or $s_FromAddress = "" Or $s_ToAddress = "" Or $s_Username = "" Or $s_Passwd = "" Or $s_FromName = "" Or StringLen($s_FromName) > 256 Then
    SetError(1)
    Return 0
    EndIf
    If $s_helo = "" Then $s_helo = @ComputerName
    If TCPStartup() = 0 Then
    SetError(2)
    Return 0
    EndIf
    StringRegExp($s_SmtpServer, "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
    If @extended Then
    $s_IPAddress = $s_SmtpServer
    Else
    $s_IPAddress = TCPNameToIP($s_SmtpServer)
    EndIf
    If $s_IPAddress = "" Then
    TCPShutdown()
    SetError(3)
    Return 0
    EndIf
    $v_Socket = TCPConnect($s_IPAddress, 25)
    If $v_Socket = -1 Then
    TCPShutdown()
    SetError(4)
    Return (0)
    EndIf

    $s_Send[0] = "EHLO " & $s_helo & @CRLF
    ;~ If StringLeft($s_helo,5) <> "EHLO " Then $s_Send[0] = "EHLO " & $s_helo & @CRLF
    $s_ReplyCode[0] = "250"

    [/autoit] [autoit][/autoit] [autoit]

    $s_Send[1] = "AUTH LOGIN" & @CRLF
    $s_ReplyCode[1] = "334"
    $s_Send[2] = _Base64Encoding($s_Username) & @CRLF
    $s_ReplyCode[2] = "334"
    $s_Send[3] = _Base64Encoding($s_Passwd) & @CRLF
    $s_ReplyCode[3] = "235"
    $s_Send[4] = "MAIL FROM: <" & $s_FromAddress & ">" & @CRLF
    $s_ReplyCode[4] = "250"
    $s_Send[5] = "RCPT TO: <" & $s_ToAddress & ">" & @CRLF
    $s_ReplyCode[5] = "250"
    $s_Send[6] = "DATA" & @CRLF
    $s_ReplyCode[6] = "354"

    $s_Send[7] = "From: " & $s_FromName & " <" & $s_FromAddress & ">" & @CRLF & _
    "To: " & "<" & $s_ToAddress & ">" & @CRLF & _
    "Subject: " & $s_Subject & @CRLF & _
    "Mime-Version: 1.0" & @CRLF & _
    "Content-Type: text/plain; charset=US-ASCII" & @CRLF & _
    @CRLF
    $s_ReplyCode[7] = ""

    $s_Send[8] = @CRLF & "." & @CRLF
    $s_ReplyCode[8] = "250"

    [/autoit] [autoit][/autoit] [autoit]

    ; open stmp session
    If _SmtpSend($v_Socket, $s_Send[0], $s_ReplyCode[0], $b_trace, "220", $s_first) Then
    SetError(50)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ; send header
    For $i_Count = 0 To UBound($s_Send) - 2
    If _SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
    SetError(50 + $i_Count)
    Return 0
    EndIf
    Next

    ; send body records (a record can be multiline : take care of a subline beginning with a dot should be ..)
    For $i_Count = 0 To UBound($as_Body) - 1
    ; correct line beginning with a dot
    If StringLeft($as_Body[$i_Count], 1) = "." Then $as_Body[$i_Count] = "." & $as_Body[$i_Count]

    If _SmtpSend($v_Socket, $as_Body[$i_Count] & @CRLF, "", $b_trace) Then
    SetError(500 + $i_Count)
    Return 0
    EndIf
    Next

    ; close the smtp session
    $i_Count = UBound($s_Send) - 1
    If _SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
    SetError(5000)
    Return 0
    EndIf

    TCPCloseSocket($v_Socket)
    TCPShutdown()
    Return 1
    EndFunc ;==>_INetSmtpMailAuth

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _Base64Encoding()
    ; Description: Kodiert eine Zeichenfolge mit dem Base64-Verfahren
    ; (http://de.wikipedia.org/wiki/Base64)
    ; Parameter(s): $String - Zeichenfolge die kodiert werden soll
    ; Requirement(s): None
    ; Return Value(s): Kodierte Zeichenfolge
    ; Authors: bernd670
    ;
    ;===============================================================================
    Func _Base64Encoding($String)

    [/autoit] [autoit][/autoit] [autoit]

    $strUmsetzung = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
    $strRetValue = ""

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To StringLen($String) Step 3
    $strTok = StringMid($String, $i, 3)
    Switch StringLen($strTok)
    Case 3
    $iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
    Asc(StringMid($strTok, 2, 1))) * 256 + _
    Asc(StringMid($strTok, 3, 1))
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt

    [/autoit] [autoit][/autoit] [autoit]

    Case 2
    $iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
    Asc(StringMid($strTok, 2, 1))) * 256
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt & "="

    [/autoit] [autoit][/autoit] [autoit]

    Case 1
    $iTokVal = Asc(StringMid($strTok, 1, 1)) * 65536
    $iTokVal = BitShift($iTokVal, 12)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt & "=="

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Return $strRetValue
    EndFunc ;==>_Base64Encoding

    [/autoit]

    Mega

  • Zufahlsgenertor? (Schere Stein Papier)

    • Xenobiologist
    • 11. August 2009 um 17:15

    Dafür gibt es auch den dritten Parameter!

  • Winamp aktuell gespieltes Lied ermitteln und senden

    • Xenobiologist
    • 11. August 2009 um 17:13

    Diese UDF : Winamp UDF

    mit folgenden Skript schreibt den Song in die Console.

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <Winamp_Library.au3>

    [/autoit] [autoit][/autoit] [autoit]

    _Winamp_Example()

    [/autoit] [autoit][/autoit] [autoit]

    Func _Winamp_Example()
    ;This example will start winamp, check if there is some songs in the list, if not,
    ;will show "Select File" dialog to add some song(s),
    ;then will hit the Play button on some random song, set winamp's volume to 100%,
    ;and set song position to halth of the total song lenght.

    [/autoit] [autoit][/autoit] [autoit]

    _Winamp_Start(-1, 5)

    [/autoit] [autoit][/autoit] [autoit]

    If @error Then
    MsgBox(16, "Error", StringFormat("There was an error (%d) executing Winamp Player.", @error) & _
    @CRLF & @CRLF & "OK ===> EXIT")

    [/autoit] [autoit][/autoit] [autoit]

    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $aTracksList = _Winamp_GetPlayListToArray()
    _ArrayDisplay($aTracksList)
    ConsoleWrite('!' & $aTracksList[$aTracksList[0][0]][0] & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    Local $iTotalSongs = UBound($aTracksList) - 1

    [/autoit] [autoit][/autoit] [autoit]

    If $iTotalSongs < 1 Then
    Local $sSelectedSong = FileOpenDialog("Select Song", "C:\", "Media files (*.mp3;*.wav;*.mdi)", 7)
    If @error Then Exit

    [/autoit] [autoit][/autoit] [autoit]

    If StringInStr($sSelectedSong, "|") Then
    Local $aSelectedSongs = StringSplit($sSelectedSong, "|")
    $iTotalSongs = 0

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 2 To UBound($aSelectedSongs) - 1
    _Winamp_AddFile($aSelectedSongs[1] & "\" & $aSelectedSongs[$i])
    $iTotalSongs += 1
    Next
    Else
    _Winamp_AddFile($sSelectedSong)
    $iTotalSongs = 1
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $iRandom_Song = Random(0, $iTotalSongs - 1, 1)

    [/autoit] [autoit][/autoit] [autoit]

    _Winamp_Play($iRandom_Song)
    _Winamp_SetVolume(255)

    [/autoit] [autoit][/autoit] [autoit]

    ;We wait untill the song starting to play...
    While _Winamp_GetCurrentTrackPlayStatus() <> 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Sleep(100)

    [/autoit] [autoit][/autoit] [autoit]

    Local $iTrack_Lenght = _Winamp_GetCurrentTrackOutputTime(1)

    [/autoit] [autoit][/autoit] [autoit]

    Sleep(100)

    [/autoit] [autoit][/autoit] [autoit]

    _Winamp_Seek(Ceiling($iTrack_Lenght / 2))
    EndFunc ;==>_Winamp_Example

    [/autoit]

    Mega

  • _SplashOn fragen

    • Xenobiologist
    • 23. Juli 2009 um 21:29

    Hi,

    such mal im Eng Forum nach Freetext.au3 von Valuater

    Mega

  • Liste aller UDFs für AutoIt; Bildschirm-Informationen

    • Xenobiologist
    • 23. Juli 2009 um 11:09

    Hi,

    klar. Die Übersicht wäre sicher genail und würde seinen Platz hier finden. Nur das aktuell halten ist schwierig. Aber einen Versuch ist es allemal wert.

    Mega

  • Sound includen?

    • Xenobiologist
    • 22. Juli 2009 um 15:42

    Am einfachsten wäre es mit FileInstall.

  • Array Problem

    • Xenobiologist
    • 21. Juli 2009 um 08:49

    Auch hier der Tipp einfach mal selbst debuggen. ConsoleWrite hilft.

  • Dynamisches Array macht Probleme

    • Xenobiologist
    • 21. Juli 2009 um 08:47

    Hi,

    einfach mal ConsoleWrites einbauen und gucken ob nach jeder Zeile noch das erwartete drinsteht. WElchen Fehler bekommst du denn?

    Mega

  • _arraydisplay zeigt jeden 2.wert an ><

    • Xenobiologist
    • 20. Juli 2009 um 17:45

    Ggf. Ubound(...) -1 nehmen

  • Endlosschleife

    • Xenobiologist
    • 20. Juli 2009 um 17:42

    Bitte in der Hilfe gucken, es gibt auch eine deutsche Hilfe.

  • Sound streamen

    • Xenobiologist
    • 20. Juli 2009 um 17:41

    Link

  • combobox problem

    • Xenobiologist
    • 20. Juli 2009 um 17:40

    Guck dir die Ini Funktionen an. In der Hilfe steht wie man mit IniRead und iniWrite usw. arbeitet.

  • combobox problem

    • Xenobiologist
    • 20. Juli 2009 um 16:35

    GuiCtrlRead($combo1)

  • zählen

    • Xenobiologist
    • 20. Juli 2009 um 16:04

    Hi,

    oder

    [autoit]

    StringReplace(FileRead('meine.txt'), '.mp3', '')
    MsgBox(64, 'Anzahl', 'MP3s : ' & @extended)

    [/autoit]

    Mega

  • Liste aller UDFs für AutoIt; Bildschirm-Informationen

    • Xenobiologist
    • 17. Juli 2009 um 11:33
    Spoiler anzeigen
    [autoit]

    ;====================================================================================
    ;
    ;Function Name: _ScreenSetting()
    ;Description: Changes the screen resolution, color dept and refresh rate
    ;Version: 1.0
    ;Parameters: $iWidth - Width of the desktop screen in pixels. (horizontal resolution)
    ; $iHeight - Height of the desktop screen in pixels. (vertical resolution)
    ; $iDepth - Depth of the desktop screen in bits per pixel.
    ; $iRefresh - Refresh rate of the desktop screen in hertz.
    ;Return Value(s): On Success - Screen is adjusted
    ; On failure - Message with error description
    ;Requirement(s): Tested on AutoIt 3.2.10.0
    ;Autor(s): R.Gilman (a.k.a rasim); special thanks to amel27
    ;
    ;====================================================================================
    Func _ScreenSetting($iWidth = @DesktopWidth, $iHeight = @DesktopHeight, $iDepth = @DesktopDepth, $iRefresh = @DesktopRefresh)
    Local Const $DISP_CHANGE_SUCCESSFUL = 0
    Local Const $DISP_CHANGE_RESTART = 1
    Local Const $DISP_CHANGE_FAILED = -1
    Local Const $DISP_CHANGE_BADMODE = -2
    Local Const $DISP_CHANGE_NOTUPDATED = -3
    Local Const $DISP_CHANGE_BADFLAGS = -4
    Local Const $DISP_CHANGE_BADPARAM = -5

    [/autoit] [autoit][/autoit] [autoit]

    Local Const $CDS_TEST = 0x4
    Local Const $CDS_UPDATEREGISTRY = 0x1

    [/autoit] [autoit][/autoit] [autoit]

    Local Const $DM_PELSWIDTH = 0x80000
    Local Const $DM_PELSHEIGHT = 0x100000
    Local Const $DM_BITSPERPEL = 0x40000
    Local Const $DM_DISPLAYFREQUENCY = 0x400000

    [/autoit] [autoit][/autoit] [autoit]

    Local Const $ENUM_CURRENT_SETTINGS = -1
    Local Const $WM_DISPLAYCHANGE = 0x007E
    Local Const $HWND_BROADCAST = 0xFFFF
    Local Const $SPI_SETNONCLIENTMETRICS = 0x2A

    [/autoit] [autoit][/autoit] [autoit]

    Local $DEVMODE, $DllRet

    [/autoit] [autoit][/autoit] [autoit]

    $DEVMODE = DllStructCreate("char dmDeviceName[32];ushort dmSpecVersion;ushort dmDriverVersion;short dmSize;" & _
    "ushort dmDriverExtra;dword dmFields;short dmOrientation;short dmPaperSize;short dmPaperLength;" & _
    "short dmPaperWidth;short dmScale;short dmCopies;short dmDefaultSource;short dmPrintQuality;" & _
    "short dmColor;short dmDuplex;short dmYResolution;short dmTTOption;short dmCollate;" & _
    "byte dmFormName[32];dword dmBitsPerPel;int dmPelsWidth;dword dmPelsHeight;" & _
    "dword dmDisplayFlags;dword dmDisplayFrequency")

    [/autoit] [autoit][/autoit] [autoit]

    $DllRet = DllCall("user32.dll", "int", "EnumDisplaySettings", "ptr", 0, "dword", $ENUM_CURRENT_SETTINGS, _
    "ptr", DllStructGetPtr($DEVMODE))
    $DllRet = $DllRet[0]

    [/autoit] [autoit][/autoit] [autoit]

    If $DllRet = 0 Then
    MsgBox(16, "Error", "Unable to get graphic mode")
    Return False
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $VGA_MAP_KEY = RegRead("HKLM\HARDWARE\DEVICEMAP\VIDEO", "\Device\Video0")
    $VGA_KEY = StringReplace($VGA_MAP_KEY, "\Registry\Machine", "HKLM")

    [/autoit] [autoit][/autoit] [autoit]

    RegWrite($VGA_KEY, "PruningMode", "REG_DWORD", 0)

    [/autoit] [autoit][/autoit] [autoit]

    DllStructSetData($DEVMODE, "dmSize", DllStructGetSize($DEVMODE))
    DllStructSetData($DEVMODE, "dmPelsWidth", $iWidth)
    DllStructSetData($DEVMODE, "dmPelsHeight", $iHeight)
    DllStructSetData($DEVMODE, "dmBitsPerPel", $iDepth)
    DllStructSetData($DEVMODE, "dmDisplayFrequency", $iRefresh)
    DllStructSetData($DEVMODE, "dmFields", BitOR($DM_PELSWIDTH, $DM_PELSHEIGHT, $DM_BITSPERPEL, $DM_DISPLAYFREQUENCY))

    [/autoit] [autoit][/autoit] [autoit]

    $DllRet = DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_TEST)
    $DllRet = $DllRet[0]

    [/autoit] [autoit][/autoit] [autoit]

    If $DllRet <> $DISP_CHANGE_SUCCESSFUL Then
    Switch $DllRet
    Case $DISP_CHANGE_RESTART
    MsgBox(48, "Warning", "Restart your computer for change display settings")
    Case $DISP_CHANGE_FAILED
    MsgBox(16, "Error", "The video driver not set a new mode")
    Return False
    Case $DISP_CHANGE_BADMODE
    MsgBox(16, "Error", "Video mode not supported")
    Return False
    Case $DISP_CHANGE_NOTUPDATED
    MsgBox(16, "Error", "Unable to write in registry")
    Return False
    Case $DISP_CHANGE_BADFLAGS
    MsgBox(16, "Error", "Bad flags")
    Return False
    Case $DISP_CHANGE_BADPARAM
    MsgBox(16, "Error", "Bad parameters")
    Return False
    EndSwitch
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $DllRet = DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_UPDATEREGISTRY)
    $DllRet = $DllRet[0]

    [/autoit] [autoit][/autoit] [autoit]

    DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND_BROADCAST, "int", $WM_DISPLAYCHANGE, _
    "int", $SPI_SETNONCLIENTMETRICS, "int", 0)

    [/autoit] [autoit][/autoit] [autoit]

    RegWrite($VGA_KEY, "PruningMode", "REG_DWORD", 1)

    [/autoit] [autoit][/autoit] [autoit]

    $DEVMODE = ""
    $DllRet = ""
    EndFunc ;==>_ScreenSetting

    [/autoit]
  • H2112 Setup

    • Xenobiologist
    • 17. Juli 2009 um 11:30

    Hi,

    anstatt If then else .. kannst du auch switch oder select benutzen. Und deine Saisionfunktionen kannst du auch auf eine zusammendampfen.

    Mega

  • Verzeichnis prüfen

    • Xenobiologist
    • 17. Juli 2009 um 11:25

    Hi,

    viele Programme haben einen silent mode. Einfach mal die exe mit -? oder /? aufrufen.
    Ansonsten die Control... Befehle nutzen dann geht es auch hidden.

    Mega

  • Weshalb ein leeres Fenster davor ?

    • Xenobiologist
    • 14. Juli 2009 um 09:09
    [autoit]

    MsgBox(64, 'Datum', _getDOSOutput('date /t'))

    [/autoit][autoit][/autoit][autoit]

    Func _getDOSOutput($command)
    Local $text = '', $Pid = Run('"' & @ComSpec & '" /c ' & $command, '', @SW_HIDE, 2 + 4)
    While 1
    $text &= StdoutRead($Pid, False, False)
    If @error Then ExitLoop
    Sleep(10)
    WEnd
    Return $text
    EndFunc ;==>_getDOSOutput

    [/autoit]

    Mega

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™