bisherige Scripts

DAFLO programming Forum
Verfügbare Informationen zu "bisherige Scripts"

  • Qualität des Beitrags: 0 Sterne
  • Beteiligte Poster: WolfMKIII
  • Forum: DAFLO programming Forum
  • Forenbeschreibung: Forum für die Mitglieder der Programmierer-Gruppe DAFLO programming
  • aus dem Unterforum: Autoit
  • Antworten: 1
  • Forum gestartet am: Samstag 05.08.2006
  • Sprache: deutsch
  • Link zum Originaltopic: bisherige Scripts
  • Letzte Antwort: vor 17 Jahren, 7 Monaten, 20 Tagen, 9 Stunden, 6 Minuten
  • Alle Beiträge und Antworten zu "bisherige Scripts"

    Re: bisherige Scripts

    WolfMKIII - 07.09.2006, 09:22

    bisherige Scripts
    Hier sind einmal meine bisherigen Sachen, alle mit GUI
    CD-Steuerung: Code: #include <guiconstants.au3>

    $statd = 0
    $state = 0
    $statf = 0
    $statg = 0
    $stath = 0
    $stati = 0
    $statj = 0
    $statk = 0

    $D = Drivegettype("d:\")
    $E = Drivegettype("e:\")
    $F = Drivegettype("f:\")
    $G = Drivegettype("g:\")
    $H = Drivegettype("h:\")
    $I = Drivegettype("i:\")
    $J = Drivegettype("j:\")
    $K = Drivegettype("k:\")

    $Guihandle = Guicreate("CD-Steuerung",200,200)
    $ButtonOpen = GuictrlcreateButton ("Open",80,5,40,25)
    $Buttonclose = GuictrlcreateButton ("Close",80,35,40,25)

    if $D = "CDROM" then
       $checkboxd = guictrlcreatecheckbox("D:\",5,150,35,20)
    endif
    if $E = "CDROM" then
       $checkboxe = guictrlcreatecheckbox("E:\",45,150,35,20)
    endif
    if $F = "CDROM" then
       $checkboxf = guictrlcreatecheckbox("F:\",95,150,35,20)
    endif
    if $G = "CDROM" then
       $checkboxg = guictrlcreatecheckbox("G:\",135,150,35,20)
    endif
    if $H = "CDROM" then
       $checkboxh = guictrlcreatecheckbox("H:\",5,175,35,20)
    endif
    if $I = "CDROM" then
       $checkboxi = guictrlcreatecheckbox("I:\",45,175,35,20)
    endif
    if $J = "CDROM" then
       $checkboxj = guictrlcreatecheckbox("J:\",95,175,35,20)
    endif
    if $K = "CDROM" then
       $checkboxk = guictrlcreatecheckbox("K:\",135,175,35,20)
    endif

    Guisetstate()

    While 1
       $msg = GUIGetMsg()
       if $msg = $Buttonopen then
          if $d = "cdrom" then
             $statd = guictrlread($checkboxd)
          endif
          if $e = "cdrom" then
             $state = guictrlread($checkboxe)
          endif
          if $f = "cdrom" then
             $statf = guictrlread($checkboxf)
          endif
          if $g = "cdrom" then
             $statg = guictrlread($checkboxg)
          endif
          if $h = "cdrom" then
             $stath = guictrlread($checkboxh)
          endif
          if $i = "cdrom" then
             $stati = guictrlread($checkboxi)
          endif
          if $j = "cdrom" then
             $statj = guictrlread($checkboxj)
          endif
          if $k = "cdrom" then
             $statk = guictrlread($checkboxk)
          endif
          if $statd = 1 then
             cdtray("D:","open")
          endif
          if $state = 1 then
             cdtray("E:","open")
          endif
          if $statf = 1 then
             cdtray("F:","open")
          endif
          if $statg = 1 then
             cdtray("G:","open")
          endif
          if $stath = 1 then
             cdtray("H:","open")
          endif
          if $stati = 1 then
             cdtray("I:","open")
          endif
          if $statj = 1 then
             cdtray("J:","open")
          endif
          if $statk = 1 then
             cdtray("K:","open")
          endif
       endif
       if $msg = $Buttonclose then
          if $d = "cdrom" then
             $statd = guictrlread($checkboxd)
          endif
          if $e = "cdrom" then
             $state = guictrlread($checkboxe)
          endif
          if $f = "cdrom" then
             $statf = guictrlread($checkboxf)
          endif
          if $g = "cdrom" then
             $statg = guictrlread($checkboxg)
          endif
          if $h = "cdrom" then
             $stath = guictrlread($checkboxh)
          endif
          if $i = "cdrom" then
             $stati = guictrlread($checkboxi)
          endif
          if $j = "cdrom" then
             $statj = guictrlread($checkboxj)
          endif
          if $k = "cdrom" then
             $statk = guictrlread($checkboxk)
          endif
          if $statd = 1 then
             cdtray("D:","closed")
          endif
          if $state = 1 then
             cdtray("E:","closed")
          endif
          if $statf = 1 then
             cdtray("F:","closed")
          endif
          if $statg = 1 then
             cdtray("G:","closed")
          endif
          if $stath = 1 then
             cdtray("H:","closed")
          endif
          if $stati = 1 then
             cdtray("I:","closed")
          endif
          if $statj = 1 then
             cdtray("J:","closed")
          endif
          if $statk = 1 then
             cdtray("K:","closed")
          endif
       endif
       If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Wend
    teilweise ein wenig unkonventionell aber es läuft

    Memorycheck: Code: #include <GUIConstants>

    $array = memgetstats()

    Guicreate("Memory Stats",250,200)
    $radio1 = Guictrlcreateradio("MB",5,160,40,20)
    $radio2 = Guictrlcreateradio("KB",200,160,40,20)
    $array[1] = $array[1] / 1024
    $array[2] = $array[2] / 1024
    $array[3] = $array[3] / 1024
    $array[4] = $array[4] / 1024
    $array[5] = $array[5] / 1024
    $array[6] = $array[6] / 1024

    $array1 = Stringsplit($array[1],".")
    $array2 = Stringsplit($array[2],".")
    $array3 = Stringsplit($array[3],".")
    $array4 = Stringsplit($array[4],".")
    $array5 = Stringsplit($array[5],".")
    $array6 = Stringsplit($array[6],".")

    $guictrl0 = Guictrlcreatelabel("Percentage of memory in use: " & $array[0] & " %",5,5,170,15)
    $guictrl1 = Guictrlcreatelabel("Total physical RAM: " & $array1[1] & " MB",5,20,170,15)
    $guictrl2 = Guictrlcreatelabel("Needed physical RAM: " & $array1[1] - $array2[1] & " MB",5,35,170,15)
    $guictrl3 = Guictrlcreatelabel("Available physical RAM: " & $array2[1] & " MB",5,50,190,15)
    $guictrl4 = Guictrlcreatelabel("Total Pagefile: " & $array3[1] & " MB",5,65,170,15)
    $guictrl5 = guictrlcreatelabel("Needed Pagefile: " & $array3[1] - $array4[1] & " MB",5,80,170,15)
    $guictrl6 = Guictrlcreatelabel("Available Pagefile: " & $array4[1] & " MB",5,95,170,15)
    $guictrl7 = Guictrlcreatelabel("Total virtual: " & $array5[1] & " MB",5,110,170,15)
    $guictrl8 = Guictrlcreatelabel("Needed virtual: " & $array5[1] - $array6[1] & " MB",5,125,170,15)
    $guictrl9 = Guictrlcreatelabel("Available virtual: " & $array6[1] & " MB",5,140,170,15)
    Guictrlsetstate($radio1,$gui_checked)
    GUISetState ()

    while 1
       $stateradio1 = Guictrlread($radio1)
       $stateradio2 = Guictrlread($radio2)

       $array = memgetstats()

       if $stateradio1 = 1 then
          $array[1] = $array[1] / 1024
          $array[2] = $array[2] / 1024
          $array[3] = $array[3] / 1024
          $array[4] = $array[4] / 1024
          $array[5] = $array[5] / 1024
          $array[6] = $array[6] / 1024

          $array1 = Stringsplit($array[1],".")
          $array2 = Stringsplit($array[2],".")
          $array3 = Stringsplit($array[3],".")
          $array4 = Stringsplit($array[4],".")
          $array5 = Stringsplit($array[5],".")
          $array6 = Stringsplit($array[6],".")

          Guictrlsetdata($guictrl0,"Percentage of memory in use: " & $array[0] & " %")
          Guictrlsetdata($guictrl1,"Total physical RAM: " & $array1[1] & " MB")
          Guictrlsetdata($guictrl2,"Needed physical RAM: " & $array1[1] - $array2[1] & " MB")
          Guictrlsetdata($guictrl3,"Available physical RAM: " & $array2[1] & " MB")
          Guictrlsetdata($guictrl4,"Total Pagefile: " & $array3[1] & " MB")
          guictrlsetdata($guictrl5,"Needed Pagefile: " & $array3[1] - $array4[1] & " MB")
          Guictrlsetdata($guictrl6,"Available Pagefile: " & $array4[1] & " MB")
          Guictrlsetdata($guictrl7,"Total virtual: " & $array5[1] & " MB")
          Guictrlsetdata($guictrl8,"Needed virtual: " & $array5[1] - $array6[1] & " MB")
          Guictrlsetdata($guictrl9,"Available virtual: " & $array6[1] & " MB")

          $msg = Guigetmsg()
          if $msg = $Gui_Event_Close then exit 0
       endif
       if $stateradio2 = 1 then
          guictrlsetdata($guictrl0,"Percentage of memory in use: " & $array[0] & " %")
          guictrlsetdata($guictrl1,"Total physical RAM: " & $array[1] & " KB")
          guictrlsetdata($guictrl2,"Needed physical RAM: " & $array[1] - $array[2] & " KB")
          guictrlsetdata($guictrl3,"Available physical RAM: " & $array[2] & " KB")
          guictrlsetdata($guictrl4,"Total Pagefile: " & $array[3] & " KB")
          guictrlsetdata($guictrl5,"Needed Pagefile: " & $array[3] - $array[4] & " KB")
          guictrlsetdata($guictrl6,"Available Pagefile: " & $array[4] & " KB")
          guictrlsetdata($guictrl7,"Total virtual: " & $array[5] & " KB")
          guictrlsetdata($guictrl8,"Needed virtual: " & $array[5] - $array[6] & " KB")
          guictrlsetdata($guictrl9,"Available virtual: " & $array[6] & " KB")

          $msg = Guigetmsg()
          if $msg = $Gui_Event_Close then exit 0
       endif
    wend
    Eine Stopuhr: Code: #include <GUIconstants>

    $y = 0
    $x = 0
    $seccount = 0
    $mincount = 0
    $hourcount = 0
    $msec = @sec

    $Guihandle = Guicreate ("Timer",130,150)
    $guilabel1 = guictrlcreatelabel("Counted Time: " & $hourcount & ":" & $mincount & ":" & $seccount,5,5,120,15)
    $guibuttonstart = guictrlcreatebutton("Start the Timer",25,40,85,25)
    $guibuttonpause = guictrlcreatebutton("Pause the Timer",25,80,85,25)
    $guibuttonstop = guictrlcreatebutton("Stop the Timer",25,120,85,25)
    guisetstate()

    while 1
       while $y <> 10
          sleep(10)
          $y = $y + 1
       wend
       $msg = guigetmsg()
       if $msg = $guibuttonstart then
          $x = 1
       endif
       if $msg = $guibuttonstop then
          $x = 0
          $seccount = 0
          $mincount = 0
          $hourcount = 0
       endif
       if $msg = $guibuttonpause then
          $x = 0
       endif
       if $x = 1 then
          if $msec <sec>= 60 then
             $mincount = $mincount + 1
             $seccount = 0
          endif
          if $mincount >= 60 then
             $hourcount = $hourcount + 1
             $mincount = 0
          endif
       endif
       guictrlsetdata($guilabel1,"Counted Time: " & $hourcount & ":" & $mincount & ":" & $seccount)
       if $msg = $GUI_EVENT_CLOSE then exit 0
    wend

    Ein tool um Fenster transparent zu machen

    Code: #include <Guiconstants.au3>
    $x = 5
    $wintitle = wingettitle("")
    $len = stringlen($wintitle)
    if $len > 8 then
       $wintitlecut = Stringleft($wintitle,8)
       $wintitlecut = $wintitle & "..."
    endif
    $guihandle = guicreate("Windowtransparency",240,180)
    $guilabel1 = guictrlcreatelabel("Actual Window: " & $wintitle ,5,5,140,15)
    $guibutton = guictrlcreatebutton("Do It!",90,150,50,23)
    $guidetect = guictrlcreatebutton("Detect a Window",60,105,110,23)
    $guilabel2 = guictrlcreatelabel("How transparent should the window become (Range: 1 - 100)?" & @CRLF & "A less number means more transparency, so be careful",5,22,220,50)
    $guislider = guictrlcreateslider(5,84,220,17)
    guisetstate ()
    while 1
       $msg = guigetmsg ()
       if $msg = $guidetect then
          while $x >= 0
             sleep(1000)
             guictrlsetdata($guidetect,"Detect a Window (" & $x & ")")
             $x = $x - 1
          wend
          $wintitle = wingettitle("")
          $len = stringlen($wintitle)
          if $len > 8 then
             $wintitlecut = Stringleft($wintitle,8)
             $wintitlecut = $wintitlecut & "..."
          endif
          $x = 5
          guictrlsetdata($guidetect,"Detect a Window")
          guictrlsetdata($guilabel1,"Actual Window: " & $wintitlecut)
       endif
       if $msg = $guibutton then
          If winexists($wintitle) then
             $trans = guictrlread($guislider)
             $trans = number($trans)
             $trans = 255 / 100 * $trans
             $trans = round($trans,0)
             winsettrans($wintitle,"",$trans)
          else
             msgbox(0,"","The actual Window doesn't exist anymore")
          endif
       endif
       if $msg = $GUI_EVENT_CLOSE then exit 0
    wend

    thx Daos



    Mit folgendem Code, können Sie den Beitrag ganz bequem auf ihrer Homepage verlinken



    Weitere Beiträge aus dem Forum DAFLO programming Forum

    Welches Linux ist das Beste für den privaten Anwender? - gepostet von daos06 am Freitag 08.12.2006
    Neuer Forum - aufbau. - gepostet von daos06 am Montag 04.09.2006
    Super Extra: Nur für Mitglieder: GOOGLE MAIL! - gepostet von daos06 am Sonntag 06.08.2006



    Ähnliche Beiträge wie "bisherige Scripts"

    Bisherige Urlaubs-Touren der Roller - Rebellen. - rollerrebell (Freitag 15.12.2006)
    Bisherige Card für Special Show am 25.06.06 - Vince McMahon (Mittwoch 21.06.2006)
    ÄVLB: Bisherige Rechtsgrundlage - Uwe Gerber (Mittwoch 22.11.2006)
    Bisherige Mannschaften - Pia Pohlmann (Montag 30.04.2007)
    Bisherige E-mails - Sah-Lenn (Freitag 18.05.2007)
    Scripts für viele Fachbereiche!!! - haustiger (Donnerstag 02.02.2006)
    scripts.. - Anonymous (Mittwoch 06.12.2006)
    Über Bots und Scripts ;) - MonteChristo (Dienstag 22.08.2006)
    bisherige Deko: - stekal (Donnerstag 30.06.2005)
    bisherige Gruppe - Shandria (Dienstag 18.10.2005)