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

Beiträge von PainTain

  • Ftp Updater

    • PainTain
    • 11. März 2013 um 22:40

    Aus dieser Beschreibung (und eventueller Austausch von PNs) könnte/würde ich etwas daraus machen, da mir derzeit Idee für irgendetwas anderes fehlt. :D
    Ich habe keine irsinnig hohen Preisvorstellungen, ich bin Hobbyentwickler und würde es aus Spaß/Interesse machen (aber gegen eine (kleine) Bezahlung spricht nichts, alles weitere per PN.)

    Ich habe zwar demnächst Arbeiten in der Schule anstehen, allerdings lässe sich da irgendwo Zeit machen. ;)

    Mfg

  • RegWrite - Pfad zu Programm

    • PainTain
    • 11. März 2013 um 18:11

    Schau dir einfach mal die "RegWrite"-Funktion in der Hilfe an. ;)
    (Damit beziehe ich mich auf den 2., 3., und 4. Parameter)

    [autoit]

    RegWrite("HKCU\Control Panel\Desktop", "SCRNSAVE.EXE", "REG_SZ", "C:\\WINDOWS\\system32\\ssmypics.scr")

    [/autoit]

    (REG_SZ sollte stimmen, falls nicht, ersetzt ihn mit dem Typ, der in der Registry steht ;))

    Mfg

  • Shell Excute Geht nicht

    • PainTain
    • 7. März 2013 um 17:35

    Du musst dich zwischen "GUiGetMsg" oder GUIEventMode entscheiden.

    Lies dir mal die Hilfeseite zu GUISetOnEvent durch ;)

    Mfg

  • AutoIt Compiler (Project Perseus)

    • PainTain
    • 19. Februar 2013 um 22:18

    Gibt es schon in etwa einen ungefähren Termin, wann du die erste Version zum Download bereit stellst?

    Mfg

  • String teilen | StringReplace

    • PainTain
    • 18. Februar 2013 um 20:06
    Zitat von Andy

    Freunde der Nacht....wie soll denn StringReplace() funktionieren, wenn die falschen Variablen verwendet werden?

    [autoit]

    Global $String = "Test1 – TEst2"
    Local $text2 = StringReplace($String, '–', "-",1,0) ; Hier 4. Parameter 0 (siehe Hilfe)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $text2 = ' & $text2 & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit]


    Uups, ist mir garnicht aufgefallen :S

  • String teilen | StringReplace

    • PainTain
    • 18. Februar 2013 um 19:06

    Das liegt sehr wahrscheinlich am 4. Parameter.

    Probier mal das:

    [autoit]

    Global $String = "Test1 – TEst2"
    Local $text2 = StringReplace($text, '–', "-",1,0) ; Hier 4. Parameter 0 (siehe Hilfe)

    [/autoit]

    Mfg

  • StringInStr Funktioniert nicht richtig

    • PainTain
    • 17. Februar 2013 um 14:16

    Da muss ich Andy zustimmen!
    Wenn etwas nicht funktionieren mag, mit ConsoleWrite debuggen und rumprobieren und nicht gleich sagen, das die Funktion fehlerhaft ist.

    Ich habe mit "StringInStr" schon öfters gearbeitet und noch nie Probleme damit gehabt.

    Mfg

  • Funktion Gesucht !

    • PainTain
    • 16. Februar 2013 um 22:21

    Probier mal das hier:

    [autoit]

    WinActivate("Install Treiber")
    $sLog = _GetLog()
    ConsoleWrite($sLog)

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

    Func _GetLog()
    Local $sLog = ""
    $iLines = ControlCommand("Install Treiber", "", ControlGetHandle("Install Treiber", "", ",TMemo3"), "GetLineCount", "")
    For $i = 1 To $iLines
    $sLog &= ControlCommand("Install Treiber", "", ControlGetHandle("Install Treiber", "", ",TMemo3"), "GetLine", $i) & @CRLF
    Next
    Return $sLog
    EndFunc

    [/autoit]

    Ansonsten probier mal

    [autoit]

    WinGetText

    [/autoit]

    an ;)

    Mfg

  • RosettaCode Sammelthread

    • PainTain
    • 16. Februar 2013 um 00:01
    Zitat von minx

    Hä, wieso? 2/2 ist 1. 1/2 ist 0.5. 0.5/2 sind 0.25. Das hört eigentlich nicht wirklich auf. Theoretisch müsste es unendlich laufen. Bei mir hört es bei -4,x•10^324 auf.


    Okay bin grad ein wenig verwirred, harte Woche :S
    Jedenfalls:
    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Empty_string
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    $sEmptyString = ""

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

    If $sEmptyString <> "" Then
    MsgBox(0, "Rosetta Code", "String is not empty!")
    Else
    MsgBox(0, "Rosetta Code", "String is empty!")
    EndIf

    [/autoit]

    Mfg

  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 23:52
    Zitat von Christoph54

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Loops/While
    Beteiligte: Christoph54
    Skript:

    Spoiler anzeigen
    [autoit]

    Local $i = 1024

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

    While $i > 0
    ConsoleWrite($i & @LF)
    $i /= 2
    WEnd

    [/autoit]

    So jetzt hab ich keinen Bock mehr... :D

    Alles anzeigen


    Hast du das Skript mal ausgeführt?
    Hatte haargenau das gleiche geschrieben, allerdings kamen seltsame Ergebnisse raus (zumindest für mich, hätte ja 512, 256, 128, 64, 32, 16, 8, 4, 2, 0 erwartet =/).

  • If...Then Mehrere Statements per Zeile

    • PainTain
    • 15. Februar 2013 um 23:43
    Zitat von Trolleule1337

    Sehr kreativ, aber wie würdest du das hier in eine Zeile zaubern?

    [autoit]

    If $curElement = "" Then $e += 1 & ContinueLoop

    [/autoit]


    Dir bleibt wohl nichts anderes als ;)

    [autoit]

    If $curElement = "" Then
    $e +=1
    ContinueLoop
    EndIf

    [/autoit]

    Mfg

  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 21:05

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Mouse_position
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    Opt("MouseCoordMode", 0)

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

    $aPos = MouseGetPos()
    ConsoleWrite("X: " & $aPos[0] & @CRLF & "Y: " & $aPos[1] & @CRLF)

    [/autoit]
  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 20:46

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Read_a_file_line_by_line
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    #include <File.au3>

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

    $hFile = FileOpen("input.txt")
    For $i = 1 To _FileCountLines("input.txt")
    ConsoleWrite(FileReadLine($hFile, $i))
    Next

    [/autoit]
  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 20:33

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/File_size
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    ;# Workingdir
    $sSizeWorkingDir = FileGetSize(@WorkingDir & "\input.txt")
    ;# Rootdir
    $sSizeRootDir = FileGetSize(@HomeDrive & "\input.txt")
    ;# Output
    MsgBox(0, "Result", "Size of 'input.txt' at working dir: " & $sSizeWorkingDir & @CRLF & "Size of 'input.txt' at root dir: " & $sSizeRootDir)

    [/autoit]


    Noch eins :D

  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 20:27

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Delete_a_file
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    #RequireAdmin
    ;# Workingdir
    FileDelete(@WorkingDir & "\input.txt")
    DirRemove(@WorkingDir & "\docs\")
    ;# Rootdir
    FileDelete(@HomeDrive & "\input.txt")
    DirRemove(@HomeDrive & "\docs\")

    [/autoit]


    Mfg

    P.S. BinDannMalWeg: Dein Create_a_File - Skript benötigt ein '#RequireAdmin' unter Vista/7 um auf '@HomeDrive' zu schreiben ;)

  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 19:55
    Zitat von minx

    PainTain

    Ich finde, Standard UDFs sollten benutzt werden. Immerhin gehören sie ja zum Funktionsumfang der Sprache (siehe andere AutoIt-Beispiele).


    Okay habs umgeschrieben ;)

    Mfg

  • RosettaCode Sammelthread

    • PainTain
    • 15. Februar 2013 um 19:48

    Art: Neu-Implementierung
    Task: http://rosettacode.org/wiki/Repeat_a_string
    Beteiligte: PainTain
    Skript:

    Spoiler anzeigen
    [autoit]

    $sString = InputBox("RepeatString Example", "This string will be repeated 5 times!")
    MsgBox(0, "_RepeatString Example", "Result: " & RepeatString($sString, 5))

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

    Func RepeatString($sString, $iHowOften) ;// Ich weiß, gibst schon in der String.au3 - UDF ;)
    Local $sResult = ""
    For $i = 1 To $iHowOften
    $sResult &= $sString
    Next
    Return $sResult
    EndFunc

    [/autoit]

    Spoiler anzeigen
    [autoit]

    #include <String.au3>

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

    $sString = InputBox("_StringRepeat Example", "This string will be repeated 5 times!")
    MsgBox(0, "_StringRepeat Example", "Result: " & _StringRepeat($sString, 5))

    [/autoit]
  • If...Then Mehrere Statements per Zeile

    • PainTain
    • 15. Februar 2013 um 19:25

    Einzige Möglichkeit wäre wohl:

    [autoit]

    If $curElement = "" Then
    $e +=1
    ContinueLoop
    EndIf

    [/autoit]

    Anders ist es nicht möglich, soweit ich weiß ;)

    Mfg
    (War das überhaupt eine Frage?)

  • [SciTE] Send To aPaste

    • PainTain
    • 13. Februar 2013 um 19:58

    So,
    wie gesagt, hier ist meine Variante :D

    \AutoIt3\SciTE\aPaste\apaste.au3 speichern
    [autoit]

    #cs
    Send to aPaste
    aPaste by minx @ autoit.de
    http://apaste.square7.ch/

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

    Creator: PainTain @ autoit.de
    Idea from i2c's "Send to Pastebin"
    #ce

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

    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Array.au3>
    #include <EditConstants.au3>

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

    HotKeySet("{ESC}", "_ExitFadeOff")

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

    Local $asEntites[6] = ["","","","","",""]

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

    $hGUI = GUICreate("Send to aPaste", 660, 202, 192, 125)
    GUICtrlCreateLabel("ID", -100, -100, 4, 4)
    GUICtrlCreateGroup("To Send", 16, 8, 185, 185)
    $idRadioCurSciTE = GUICtrlCreateRadio("Current SciTE Source", 32, 32, 145, 25)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $idRadioOwnText = GUICtrlCreateRadio("Other text:", 32, 120, 129, 25)
    $idBtnPasteText = GUICtrlCreateButton("Paste some text :)", 32, 152, 155, 25)
    $idRadioCurSel = GUICtrlCreateRadio("Current Selection", 32, 80, 113, 17)
    GUICtrlSetState($idBtnPasteText, $GUI_DISABLE)
    GUICtrlCreateGroup("Settings", 224, 8, 337, 185)
    GUICtrlCreateLabel("Syntax:", 240, 64, 42, 17)
    $idComboSyntax = GUICtrlCreateCombo("AutoIt", 355, 64, 185, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
    GUICtrlSetData(-1, "BASH|C|C++|CSS|HTML 4.01 strict|Java|JavaScript|mIRC|Perl|PHP|Plain text|Python|Ruby on Rails|Ruby|SQL|TCL|XML|xorg.conf|----------------------------|ABAP|ActionScript|ActionScript 3|Ada|Apache|AppleScript|Apt sources.list|ASM|ASP|AutoIt|AviSynth|BASH|Basic4GL|Brainfuck|BibTex|BlitzBasic|BNF|Boo|C|C for Macs|CADDCL|CADLisp|CFDG|ColdFusion|CIL|CMake|COBOL|C++ (with QT extensions)|C++|C#|CSS|D|DCS|Delphi|Diff-output|DIV|DOS|dot|Eiffel||Erlang|Fo|Fortran|FreeBasic|Genero|GNU Gettext .po/.pot|glSlang|GML|GNUPlot|Groovy|Haskell|HQ9+|HTML 4.01 strict|Unoidl|INI|InnoScript|INTERCAL|IO|Java|Java 5|JavaScript|KiXtart|KLone with C|KLone with C++|LaTex|Generic Lisp|Locomotive Basic|LOLcode|@Formula/@Command|LotusScript|Lightwave Script|Linden Script|LUA|Motorola 68000 Assembler|GNU make|Matlab|mIRC|Modula-3|Microchip Assembler|MXML|MySQL|NSIS|Oberon-2|Objective-C|Objective Caml|OOo Basic|Oracle 11i|Oracle 8|Pascal||PErl||PHP|PIC16 Assembler|Pixel Bender|Plain text|Oracle 9.2 PL/SQL|Povray|PowerShell|Progress|Prolog|Property|ProvideX|Python|QuickBASIC|Ruby on Rails|Rebol|Microsoft REGEDIT|Robots.txt|Ruby|SAS|Scala|Scheme|SciLab|sdlBasic|Smalltalk|Smarty|SQL|TCL|Tera Term Macro|thinBasic|T-SQL|TypoScript|Visual Basic|Visual Basic .NET|Verilog|VHDL|Vim|Visual FoxPro|Visual Prolog|Whitespace|WinBatch|XML|xorg.conf|Axapta/Dynamics Ax X++|ZiLOG Z80 Assembler")
    GUICtrlCreateLabel("Title:", 240, 96, 63, 17)
    $idInputTitle = GUICtrlCreateInput("", 355, 96, 185, 21)
    GUICtrlCreateLabel("Paste expiration:", 240, 128, 85, 17)
    $idInputPasteExpiration = GUICtrlCreateInput("", 355, 128, 185, 25, BitOR($ES_LEFT, $ES_AUTOHSCROLL, $ES_NUMBER))
    GUICtrlCreateLabel(" Private?", 236, 164, 63, 17)
    $idComboPrivate = GUICtrlCreateCombo("No", 356, 161, 185, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
    GUICtrlSetData(-1, "Yes")
    GUICtrlCreateLabel("Author Name:", 240, 32, 69, 17)
    $idInputAuthorName = GUICtrlCreateInput("", 356, 30, 185, 21)
    $idBtnSend = GUICtrlCreateButton("Send!", 584, 16, 59, 169)

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

    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUISetState(@SW_SHOW)

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

    While 1
    Switch GUIGetMsg()
    Case (Execute("1,60200 * 10^(-23)") - 4) ;)
    _ExitFadeOff()
    Case $idRadioOwnText
    GUICtrlSetState($idBtnPasteText, $GUI_ENABLE)
    Case $idBtnPasteText
    $asEntites[0] = _OwnText_GUI()
    Case $idBtnSend
    If BitAND(GUICtrlRead($idRadioOwnText), $GUI_CHECKED) And $asEntites[0] = "" Then
    MsgBox(16, "Send to aPaste", "Text cannot be empty!")
    Exit ;// Eventuell schönere Lösung
    ElseIf BitAND(GUICtrlRead($idRadioCurSciTE), $GUI_CHECKED) Then
    $asEntites[0] = FileRead($CmdLine[1])
    ElseIf BitAND(GUICtrlRead($idRadioCurSel), $GUI_CHECKED) Then
    $asEntites[0] = $CmdLine[2]
    EndIf
    $asEntites[1] = GUICtrlRead($idComboSyntax)
    $asEntites[2] = GUICtrlRead($idInputTitle)
    $asEntites[3] = GUICtrlRead($idInputPasteExpiration)
    $asEntites[4] = GUICtrlRead($idComboPrivate)
    $asEntites[5] = GUICtrlRead($idInputAuthorName)
    ;~ _ArrayDisplay($asEntites)
    _SendPaste($asEntites)
    _ExitFadeOff()
    EndSwitch
    WEnd

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

    Func _OwnText_GUI()
    $hGUI_OwnText = GUICreate("Send to aPaste ", 618, 385, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    $idEdit_OwnText_Text = GUICtrlCreateEdit("", 0, 0, 617, 337)
    $idBtn_OwnText_Ok = GUICtrlCreateButton("OK!", 8, 344, 291, 33)
    $idBtn_OwnText_Cancel = GUICtrlCreateButton("Cancel", 320, 344, 291, 33)
    GUISetState(@SW_SHOW)

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

    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($hGUI_OwnText)
    Return
    Case $idBtn_OwnText_Cancel
    GUIDelete($hGUI_OwnText)
    Return
    Case $idBtn_OwnText_Ok
    $sReturn = GUICtrlRead($idEdit_OwnText_Text)
    GUIDelete($hGUI_OwnText)
    Return $sReturn
    EndSwitch
    WEnd
    EndFunc

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

    Func _ExitFadeOff() ; Kleine Spielerei :D
    For $i = 255 To 0 Step -10
    WinSetTrans("Send to aPaste", "ID", $i)
    Sleep(15)
    Next
    Exit
    EndFunc

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

    Func _SendPaste(ByRef $asData) ;// 0 = Text, 1 = Syntax, 2 = Title, 3 = Expiration, 4 = Password, 5 = Name
    If $asData[4] = "No" Then
    $asData[4] = 0
    Else
    $asData[4] = 1
    EndIf

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

    $asData[1] = _Syntax($asData[1])

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

    $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    $oHTTP.Open("POST", "http://apaste.square7.ch/index.php/api/create", False)
    $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

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

    $oHTTP.Send("text=" & $asData[0] & "&title=" & $asData[2] & "&name=" & $asData[5] & "&private=" & $asData[4] & "&expire=" & $asData[3] & "&lang=" & $asData[1])

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

    $sLink = $oHTTP.ResponseText
    $asLinkSplitted = StringSplit($sLink, "/")
    _URLDisplay("http://apaste.square7.ch/index.php/view/" & $asLinkSplitted[$asLinkSplitted[0]])
    Return
    EndFunc

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

    Func _Syntax($sFullSyntaxName)
    Local $asSyntax[158][2] = [["autoit", "AutoIt"], _ ;Array made by i2c
    ["bash", "BASH"], _
    ["c", "C"], _
    ["cpp", "C++"], _
    ["css", "CSS"], _
    ["html4strict", "HTML 4.01 strict"], _
    ["java", "Java"], _
    ["javascript", "JavaScript"], _
    ["mirc", "mIRC"], _
    ["perl", "Perl"], _
    ["php", "PHP"], _
    ["text", "Plain text"], _
    ["python", "Python"], _
    ["rails", "Ruby on Rails"], _
    ["ruby", "Ruby"], _
    ["sql", "SQL"], _
    ["tcl", "TCL"], _
    ["whois", "WHOIS (RPSL format)"], _
    ["xml", "XML"], _
    ["xorg_conf", "xorg.conf"], _
    ["text", "Plain Text"], _
    ["abap", "ABAP"], _
    ["actionscript", "ActionScript"], _
    ["actionscript3", "ActionScript 3"], _
    ["ada", "Ada"], _
    ["apache", "Apache"], _
    ["applescript", "AppleScript"], _
    ["apt_sources", "Apt sources.list"], _
    ["asm", "ASM"], _
    ["asp", "ASP"], _
    ["autoit", "AutoIt"], _
    ["avisynth", "AviSynth"], _
    ["bash", "BASH"], _
    ["basic4gl", "Basic4GL"], _
    ["bf", "Brainfuck"], _
    ["bibtex", "BibTeX"], _
    ["blitzbasic", "BlitzBasic"], _
    ["bnf", "BNF"], _
    ["boo", "Boo"], _
    ["c", "C"], _
    ["c_mac", "C for Macs"], _
    ["caddcl", "CADDCL"], _
    ["cadlisp", "CADLisp"], _
    ["cfdg", "CFDG"], _
    ["cfm", "ColdFusion"], _
    ["cil", "CIL"], _
    ["cmake", "CMake"], _
    ["cobol", "COBOL"], _
    ["cpp-qt", "C++ (with QT extensions)"], _
    ["cpp", "C++"], _
    ["csharp", "C#"], _
    ["css", "CSS"], _
    ["d", "D"], _
    ["dcs", "DCS"], _
    ["delphi", "Delphi"], _
    ["diff", "Diff-output"], _
    ["div", "DIV"], _
    ["dos", "DOS"], _
    ["dot", "dot"], _
    ["eiffel", "Eiffel"], _
    ["email", "E-mail (mbox\eml\RFC format)"], _
    ["erlang", "Erlang"], _
    ["fo", "FO"], _
    ["fortran", "Fortran"], _
    ["freebasic", "FreeBasic"], _
    ["genero", "Genero"], _
    ["gettext", "GNU Gettext .po/.pot"], _
    ["glsl", "glSlang"], _
    ["gml", "GML"], _
    ["gnuplot", "GNUPlot"], _
    ["groovy", "Groovy"], _
    ["haskell", "Haskell"], _
    ["hq9plus", "HQ9+"], _
    ["html4strict", "HTML 4.01 strict"], _
    ["idl", "Unoidl"], _
    ["ini", "INI"], _
    ["inno", "Inno Script"], _
    ["intercal", "INTERCAL"], _
    ["io", "IO"], _
    ["java", "Java"], _
    ["java5", "Java 5"], _
    ["javascript", "JavaScript"], _
    ["kixtart", "KiXtart"], _
    ["klonec", "KLone with C"], _
    ["klonecpp", "KLone with C++"], _
    ["latex", "LaTeX"], _
    ["lisp", "Generic Lisp"], _
    ["locobasic", "Locomotive Basic"], _
    ["lolcode", "LOLcode"], _
    ["lotusformulas", "@Formula/@Command"], _
    ["lotusscript", "LotusScript"], _
    ["lscript", "Lightwave Script"], _
    ["lsl2", "Linden Script"], _
    ["lua", "LUA"], _
    ["m68k", "Motorola 68000 Assembler"], _
    ["make", "GNU make"], _
    ["matlab", "Matlab"], _
    ["mirc", "mIRC"], _
    ["modula3", "Modula-3"], _
    ["mpasm", "Microchip Assembler"], _
    ["mxml", "MXML"], _
    ["mysql", "MySQL"], _
    ["nsis", "NSIS"], _
    ["oberon2", "Oberon-2"], _
    ["objc", "Objective-C"], _
    ["ocaml-brief", "Objective Caml"], _
    ["oobas", "OOo Basic"], _
    ["oracle11", "Oracle 11i"], _
    ["oracle8", "Oracle 8"], _
    ["pascal", "Pascal"], _
    ["per", "Per (forms)"], _
    ["perl", "Perl"], _
    ["php-brief", "PHP (Brief version)"], _
    ["php", "PHP"], _
    ["pic16", "PIC16 Assembler"], _
    ["pixelbender", "Pixel Bender"], _
    ["text", "Plain text"], _
    ["plsql", "Oracle 9.2 PL/SQL"], _
    ["povray", "Povray"], _
    ["powershell", "PowerShell"], _
    ["progress", "Progress"], _
    ["prolog", "Prolog"], _
    ["properties", "Property"], _
    ["providex", "ProvideX"], _
    ["python", "Python"], _
    ["qbasic", "QuickBASIC"], _
    ["rails", "Ruby on Rails"], _
    ["rebol", "Rebol"], _
    ["reg", "Microsoft REGEDIT"], _
    ["robots", "Robots.txt"], _
    ["ruby", "Ruby"], _
    ["sas", "SAS"], _
    ["scala", "Scala"], _
    ["scheme", "Scheme"], _
    ["scilab", "SciLab"], _
    ["sdlbasic", "sdlBasic"], _
    ["smalltalk", "Smalltalk"], _
    ["smarty", "Smarty"], _
    ["sql", "SQL"], _
    ["tcl", "TCL"], _
    ["teraterm", "Tera Term Macro"], _
    ["thinbasic", "thinBasic"], _
    ["tsql", "T-SQL"], _
    ["typoscript", "TypoScript"], _
    ["vb", "Visual Basic"], _
    ["vbnet", "Visual Basic .NET"], _
    ["verilog", "Verilog"], _
    ["vhdl", "VHDL"], _
    ["vim", "Vim"], _
    ["visualfoxpro", "Visual FoxPro"], _
    ["visualprolog", "Visual Prolog"], _
    ["whitespace", "Whitespace"], _
    ["whois", "WHOIS (RPSL format)"], _
    ["winbatch", "WinBatch"], _
    ["xml", "XML"], _
    ["xorg_conf", "xorg.conf"], _
    ["xpp", "Axapta/Dynamics Ax X++"], _
    ["z80", "ZiLOG Z80 Assembler"]]

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

    If $sFullSyntaxName = "----------------------------" Then $sFullSyntaxName = "Plain text"
    $iIndex = _ArraySearch($asSyntax, $sFullSyntaxName)
    Return $asSyntax[$iIndex][1]
    EndFunc

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

    Func _URLDisplay($sLink)
    $hGUI_URL = GUICreate("Send To aPaste", 404, 153, 192, 124)
    $idURL = GUICtrlCreateInput($sLink, 16, 16, 369, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
    $idBtnCopy = GUICtrlCreateButton("Copy to Clipboard", 16, 56, 171, 33)
    $idBtnDownload = GUICtrlCreateButton("Download Paste", 216, 56, 171, 33)
    $idBtnOpen = GUICtrlCreateButton("Open in Browser", 16, 104, 371, 33)

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

    GUISetState(@SW_SHOW, $hGUI_URL)

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

    While 1
    Switch GUIGetMsg()
    Case -3
    Return
    Case $idBtnCopy
    ClipPut($sLink)
    Case $idBtnDownload
    $asLinkSplitted = StringSplit($sLink, "/")
    $sText = BinaryToString(InetRead("http://apaste.square7.ch/index.php/view/raw/" & $asLinkSplitted[$asLinkSplitted[0]]))
    $sPath = FileSaveDialog("Save Paste", "::{450D8FBA-AD25-11D0-98A8-0800361B1103}", "Alle (*.*)|Textdateien (*.txt)", 16)
    FileWrite($sPath & ".txt", $sText)
    Case $idBtnOpen
    ShellExecute($sLink)
    EndSwitch
    WEnd
    EndFunc

    [/autoit]


    (Bei Expiration ist die Zeit in Minuten anzugeben, für das Speichern für immer muss ich noch minx fragen wegen der API ;))

    SciTE --&gt; Options --&gt; &quot;Open User Options File&quot; (Am Ende einfügen)
    Code
    # 42 Send To aPaste by PainTain
    command.42.*="$(autoit3dir)\AutoIt3.exe" "$(SciteDefaultHome)\aPaste\apaste.au3" "$(FilePath)" "$(CurrentSelection)"
    command.name.42.*=Send to aPaste
    command.shortcut.42.*=Ctrl+Shift+Alt+Y


    Funktioniert mit der neuen aPaste-API :)

    Hoffe es gefällt euch :D
    (Auf Wunsch baue ich auch das Speichern der Einstellungwen in einer INI wie bei i2c's Variante :))

    Mfg

  • FTP-Datei Upload Problem !

    • PainTain
    • 13. Februar 2013 um 17:29

    Warum benutzt du nicht die Standard-UDF "FTPEx.au3"?
    Mit dieser hatte ich noch nie Probleme, weder mit .txt oder anderen Dateien.

    Ansonsten häng bitte mal die von dir verwendete UDF an! ;)

    Mfg

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™