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

Beiträge von qon

  • Programmier-/Skriptsprachen außer AutoIt

    • qon
    • 26. April 2010 um 22:04
    Zitat von name22

    Vielleicht könntest du dich mal für eine Rechtschreibung entscheiden...
    1.Version: Programimier
    2.Version: Programmier (korrekt)
    3.Version: Programier

    Hahaha stark :D
    Das ist echt schon ne Kunst

    Also ich programmiere, wegen der Schule, noch Java

  • Mit dem Computer reden xDD

    • qon
    • 26. April 2010 um 20:53

    LOL
    Ohne Misst, un keiner merkts

  • Mit dem Computer reden xDD

    • qon
    • 26. April 2010 um 20:13

    Er hat zwar _IsPressed erwähnt, jedoch glaube ich nur, weil er nichts anderes kannte :)
    Also ich würde dir empfehlen, es per InputBox zu machen.

    Edit: also so ungefähr mit switch-case, ist beliebig erweiterbar:

    [autoit]

    While 1

    $input = InputBox("Input", "Gib etwas ein!")
    If @error Then
    MSgbox(0,"","Exit")
    Exit
    EndIf

    Switch $input
    Case "Hallo"
    MsgBox(0,"","Hi!")
    Case "Wie gehts"
    MsgBox(0,"","Mir gehts gut")
    Case "Wie heisst du"
    MsgBox(0,"","Ich heisse " & @ComputerName)
    Case Else
    Msgbox(0,"","Ich konnte dich nicht verstehen.")
    EndSwitch

    WEnd

    [/autoit]

    Schau dir am besten auch mal StringInStr an, damit ein satz nicht genau übereinstimmen muss

  • Programm schreiben zum aufnehmen von videos??

    • qon
    • 26. April 2010 um 19:59

    Sorry,
    aber wenn du da net durchblickst ( ist ziemlich einfach ), dann lass es am besten und lade dir ein anderes Programm, was das schon kann, runter ;)

  • Variablen am anfang deklarieren aber noch nicht ausführen?

    • qon
    • 26. April 2010 um 19:02

    Funktioniert doch einwandfrei??

  • Variablen am anfang deklarieren aber noch nicht ausführen?

    • qon
    • 26. April 2010 um 18:54

    Du machst einfach $Musik = FileOpenDialog(...) an die Position, wo er auch den Dialog öffnen soll!

  • Schleifen Problem

    • qon
    • 25. April 2010 um 01:18

    While schleife,
    darin wenn Processexist dann Processclose,
    und nen sleep, für keine zu hohe auslastung.

    So sollte es doch funktionieren.

  • Möchte maus pos ablesen wie ?

    • qon
    • 25. April 2010 um 01:15

    Ich finde, ihr seid viel zu nett..
    ehrlich, das schadet neuen usern eher.
    Wäre doch denke ich angebracht, nur die Befehle zu nennen, die man braucht.
    Den rest kann man sich per Hilfe aneignen, und lernt so viel mehr.

  • Gleichgewicht halten (Spiel)

    • qon
    • 24. April 2010 um 12:58

    Warum seh ich nur schwarz, dann sagt er mir dass ich immer 1 oder 2 oder 3 Sec durchgehalten habe :D Alsobei mir wird beim starten nur das Fenster angezeigt, aber is nur schwarz drin.
    edit: hat sich erledigt, hab als nur die .au3 datei geladen

  • Vorschlag - Treffen?

    • qon
    • 23. April 2010 um 16:15
    Zitat von shayn

    MAAAAAAANNNNNNNNNN! Wo man sich trifft, in nem Restaurant oder so, um sich mal in echt zu sehen! :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing: :cursing:

    Weisst du, was Ironie ist? :)

  • Vorschlag - Treffen?

    • qon
    • 23. April 2010 um 16:07

    Real Life? Was ist das? :rofl::rofl:

  • GDI+ Plasma - eine andere Variante :-)

    • qon
    • 22. April 2010 um 19:55
    Zitat von Antispeed

    WoW, das is ja mal cool! Weida so! :thumbup:

    ein altes topic wieder ausgegraben, aber okay warum nicht xD
    sieht echt cool aus
    name22: das war glaube von ihm eher spass halber gemeint, keineswegs ernst

  • Bestimmtes Programm wählen, wenn Datei geöffnet wird

    • qon
    • 22. April 2010 um 17:46

    Also auf Windows Vista und Xp funktioniert es so auf jeden Fall, wies jetzt bei 7 aussieht, weiss ich nicht, sollte aber auch genau so funktionieren. (nach dem regeintrag ist evtl ein neustart nötig, und das script braucht adminrechte, also #requireadmin)
    Aber es muss doch irgendwie möglich sein, die Version zu erkennen..
    Oder warum machst dus nicht eigentlich einfach so, dass du in dem Dateinamen direkt die Version speicherst, zB KundeXY_Version1.ext
    edit: also mir gehts jetzt darum, dass er automatisch erkennt, welche version er nehmen soll.

  • Bestimmtes Programm wählen, wenn Datei geöffnet wird

    • qon
    • 22. April 2010 um 14:16

    Hi,

    also ich würde wahrscheinlich so vorgehen:
    Ich würde die Dateiendung des Programms mit meinem AutoIt Script verknüpfen, welches dann dadurch per CMD-Line den Pfad der zu öffnenden Datei bekommt.
    Das ist per registry realisierbar. Dann wäre es möglich, die Datei mit Autoit zu öffnen und auszulesen, denn irgendwo möge wohl in der Datei die Version stehen, sodass das Autoit-Programm bescheid weiss,
    und die Datei mit der richtigen Version öffnet ( Es müsste natürlich die Pfade zu den verschiedenen Versionen entweder aus einer ini lesen oder vll. steht es auch in der registry )

    Grüße

    edit:
    Hiermit kann man per Registry einstellen, dass eine bestimmte Endung mit dem Autoit Programm verknüpft wird, und das Autoit Programm bekommt durch das "%1" in dem Eintrag den Pfad der zu öffnenden Datei per cmd line (dazu in der Hilfe unter $CmdLine oder so schauen) übergeben
    Der Zweite Regeintrag setzt für eine bestimmte Endung das Icon des Autoit Programms.

    [autoit]

    $ProgPath = @Desktopdir & "\AutoItProgramm.exe"
    $Ext = ".blub"
    RegWrite("HKEY_CLASSES_ROOT\" & $Ext & "\shell\open\command", "", "REG_SZ", '"' & $ProgPath & '" "%1"')
    RegWrite("HKEY_CLASSES_ROOT\" & $Ext & "\DefaultIcon", "", "REG_SZ", '"' & $ProgPath & '",0')

    [/autoit]
  • GDI+ Screensavers (jetzt mit 2 Beispielen)

    • qon
    • 22. April 2010 um 14:02

    so einen schönen screensaver sieht man selten :D

  • Objekt Orientierte Programmierung

    • qon
    • 21. April 2010 um 21:39

    Wir haben jetzt in der Schule mit der OOP in Java angefangen, also ich finds total leicht ;)
    Liegt aber auch daran, dass der Lehrer alles 5x und überausführlich erklärt :P

  • 567 = 100%

    • qon
    • 19. April 2010 um 13:41

    Code?
    Also wenn 567 100% sind, muss man einfach nur einfache Prozentrechnung anwenden?!

    Pseudocode:
    erreicht / 567 * 100, das ganze noch Runden.

  • Eigene Funktionen in Scite "vorschlagen" lassen

    • qon
    • 17. April 2010 um 22:26

    Zu dem Blau färben hatte ich vor langer Zeit mal was geschrieben:

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Version=beta
    #AutoIt3Wrapper_icon=icon.ico
    #AutoIt3Wrapper_Res_Comment=color your own or someone others function's in your SciTE
    #AutoIt3Wrapper_Res_Description=color your own or someone others function's in your SciTE
    #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
    #AutoIt3Wrapper_Res_LegalCopyright=Copyright © 2008 qon
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <GuiConstants.au3>
    #include <file.au3>
    #include <array.au3>
    #include <String.au3>

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

    $EditorPath = _RegRead("HKEY_CURRENT_USER\Software\Funcadder","EditorPath",RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir") & "\SciTE")

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

    $Gui = GuiCreate("Funcadder 1.0.0.0 © qon",500,235)
    $Label = GuiCtrlCreateLabel("This was made to add functions to SciTE properties, so the function is shown bright blue in SciTE." & @CRLF & "It's kept simple. This tool also can automaticly scan whole files and make all black own functions blue.",5,10)

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

    $SingleGroup = GuiCtrlCreateGroup("Single",20,50,390,60)
    $SingleAddInput = GuiCtrlCreateInput("_ExampleFunc",33,73,240,22)
    $SingleAddButton = GuiCtrlCreateButton("Add",290,71,100)

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

    $FileGroup = GuiCtrlCreateGroup("File",20,120,460,60)
    $FileAddInput = GuiCtrlCreateInput("C:\ExampleFile.au3",33,143,240,22)
    $FileAddButton = GuiCtrlCreateButton("Scan and add",283,141,85)
    $FileSelectButton = GuiCtrlCreateButton("Select...",380,141,85)

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

    $EditorLabel = GuiCtrlCreateLabel("SciTE Path",8,203)
    $EditorPathInput = GuiCtrlCreateInput($EditorPath,73,200,300)
    $EditorBrowse = GuiCtrlCreateButton("Browse...",383,200,101,20)

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

    Global $LastBrowse = @DesktopDir

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

    GuiSetBkColor(0x18C3DF,$Gui)

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

    GuiSetState()

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

    While 1
    Switch GuiGetMsg()
    Case $GUI_EVENT_CLOSE
    RegWrite("HKEY_CURRENT_USER\Software\Funcadder","EditorPath","REG_SZ",GuiCtrlRead($EditorPathInput))
    Exit
    ;;;
    Case $EditorBrowse
    $EditorPathSelect = FileSelectFolder("Select SciTE folder","")
    IF Not @error then GuiCtrlSetData($EditorPathInput,$EditorPathSelect)
    ;;;
    Case $FileSelectButton
    $FilePathSelect = FileOpenDialog("Please choose an Autoit source file",$LastBrowse,"Autoit Source (*.au3)")
    If Not @error Then
    GuiCtrlSetData($FileAddInput,$FilePathSelect)
    Dim $szDrive, $szDir, $szFName, $szExt
    $SplitPath = _PathSplit($FilePathSelect, $szDrive, $szDir, $szFName, $szExt)
    IF Not @Error Then $LastBrowse = $SplitPath[1] & $SplitPath[2]
    EndIf
    ;;;
    Case $SingleAddButton
    $PropertyFilePath = GuiCtrlRead($EditorPathInput) & "\Properties\au3.keywords.properties"
    $PropertyFileHandle = FileOpen($PropertyFilePath,0)
    $PropertyFileText = FileRead($PropertyFileHandle)
    If Not @error Then
    IF StringInStr($PropertyFileText,GuiCtrlRead($SingleAddInput) & " ") Then
    Msgbox(48,"Already exists","This function does already exist.")
    FileClose($PropertyFileHandle)
    Else
    $NewText = _InsertFunc(GuiCtrlRead($SingleAddInput),$PropertyFileText)
    IF Not @error Then
    FileClose($PropertyFileHandle)
    FileDelete($PropertyFilePath)
    $PropertyFileHandle = FileOpen($PropertyFilePath,2)
    FileWrite($PropertyFileHandle,$NewText)
    FileClose($PropertyFileHandle)
    Msgbox(64,"Added","The function was added successfully!")
    Else
    GuiCtrlSetData($SingleAddInput,"error while adding.")
    FileClose($PropertyFileHandle)
    EndIf
    EndIf
    Else
    Msgbox(48,"Error","Error opening property file, maybe SciTE path invalid.")
    EndIf
    ;;;
    Case $FileAddButton
    $SourceFilePath = GuiCtrlRead($FileAddInput)
    If Not FileExists($SourceFilePath) or StringRight($SourceFilePath,4) <> ".au3" Then
    Msgbox(48,"Error","File does not exist or invalid file extension.")
    Else
    $SourceFile = FileOpen($SourceFilePath,0)
    $Source = FileRead($SourceFile)
    If @error Then
    Msgbox(48,"Error","Error while reading source file or file is empty.")
    FileClose($SourceFile)
    Else
    $FuncFound = _StringBetween($Source, 'Func ', '(')
    If @error Then
    Msgbox(64,"No founds","No user functions found.")
    FileClose($SourceFile)
    Else
    FileClose($SourceFile)
    $PropertyFilePath = GuiCtrlRead($EditorPathInput) & "\Properties\au3.keywords.properties"
    $PropertyFileHandle = FileOpen($PropertyFilePath,0)
    $PropertyFileText = FileRead($PropertyFileHandle)
    If @error then
    Msgbox(48,"Error","Error while reading property file.")
    FileClose($PropertyFileHandle)
    Else
    $Founds = 0
    For $i = 0 to UBound($FuncFound)-1
    If Not StringInStr($PropertyFileText,$FuncFound[$i] & " ") Then
    $PropertyFileText = _InsertFunc($FuncFound[$i],$PropertyFileText)
    $Founds += 1
    EndIf
    Next
    FileClose($PropertyFileHandle)
    FileDelete($PropertyFilePath)
    $PropertyFileHandle = FileOpen($PropertyFilePath,2)
    FileWrite($PropertyFileHandle,$PropertyFileText)
    FileClose($PropertyFileHandle)
    Msgbox(64,"Added",$Founds & " functions were made blue")
    EndIf
    EndIf
    EndIf
    EndIf
    EndSwitch
    WEnd

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

    Func _InsertFunc($sFuncName,$sFileText)
    $Pos = StringInStr($sFileText,"au3.keywords.udfs=")
    IF @error Then SetError(1,0,0)
    $Start = StringLeft($sFileText, $Pos + 17)
    $End = StringRight($sFileText, StringLen($sFileText) - $Pos - 17)
    Return $Start & StringLower($sFuncName) & " \" & @CRLF & $End
    EndFunc

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

    ;===============================================================================
    ;
    ; Function Name: _regread()
    ; Description: Reads a registry entry ( with a given standard )
    ; Parameter(s): $iKeyname - The registry key to read
    ; $iValuename - The value to read
    ; $iStandard - The standard that will be returned if registry entry does not exists [optional]
    ; Requirement(s): None
    ; Return Value(s): On Success - Returns the Registry Value, if @error occurres ( can't find key / unknown format ) the standard will be returned.
    ; On Failure - If no standard is set and can't read Key, the @error number from regread will be returned ( Helpfile ).
    ; Author(s): qon
    ;
    ;===============================================================================

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

    func _regread($sKeyname,$sValuename,$vStandard = "")
    Local $vValue
    Local $iError
    $vValue = Regread($sKeyname,$sValuename)
    $iError = @error
    If $iError <> 0 Then
    If $vStandard = "" Then
    Seterror($iError)
    Return ""
    EndIf
    Return $vStandard
    EndIf
    Return $vValue
    EndFunc

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

    Kann eben auch ne ganze .au3 Datei mit Funktionen durchgehen und macht sie alle blau.
    Musst SciTE danach neustarten

  • Binär und Binärstrings

    • qon
    • 16. April 2010 um 13:51
    Zitat von XovoxKingdom

    Ich hab auch etwas vorbereitet ^^ (meine Variante ist kürzer, aber ob sie schneller ist weiss ich nicht)

    Spoiler anzeigen
    [autoit]

    Func BinaryConvert($in, $mode = 1)
    Local $n[4] = [0, 0, 0, 0], $asc = 0
    Switch $mode
    Case 1
    $asc = Asc($in) - 48
    If $asc > 9 Then $asc -= 7
    For $i = 3 To 0 Step -1
    If Not (2 ^ $i > $asc) Then
    $asc -= 2 ^ $i
    $n[$i] = 1
    EndIf
    Next
    Return $n[3] & $n[2] & $n[1] & $n[0]
    Case 2
    $in = StringSplit($in, "", 2)
    For $i = 0 To 3
    If $in[$i] = 1 Then $asc += 2 ^ (3 - $i)
    Next
    If $asc > 9 Then Return Chr($asc + 55)
    Return $asc
    EndSwitch
    EndFunc ;==>BinaryConvert by XovoxKingdom

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

    MsgBox(0, BinaryConvert("1010", 2), BinaryConvert("A"))

    [/autoit]


    EDIT: Soo.. jetzt stimmt auch die Formatierung :D

    Alles anzeigen

    Deine Variante kann ja immer nur ein Zeichen in Binär umwandeln, bzw zurück :(

  • Binär und Binärstrings

    • qon
    • 15. April 2010 um 20:16
    Zitat von TheShadowAE

    Ich finde, da sind meine Funktionen [manche kürzer] eleganter :P

    Eleganter ist sie allemal,
    allerdings hatte ich auch vorher überlegt ob ichs nicht so machen will wie du, aber da schien mir meine Methode vom Aufbau her simpler ;)
    Mich würd halt mal interessieren was schnell ist, ich teste es vll morgen mal wenn ich zeit hab

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™