kostenloser Webspace werbefrei: lima-city


Autoit

lima-cityForumProgrammiersprachenSonstige Programmiersprachen

  1. Autor dieses Themas

    d*******t

    Finde AutoIt am einfachsten für den anfang :thumb: damit kann man schöne Sachen machen

    Was is eure meinung

    Arbeite gerade nämlich an einem win7 / Vista gadget Genarator

    http://imageshack.us/photo/my-images/594/unbenanntnb.png/

    http://imageshack.us/photo/my-images/441/unbenanntrdt.png/

    Beitrag zuletzt geändert: 30.12.2011 18:53:35 von dicecraft
  2. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

  3. Autoit ist ja schön und gut nur für den Gewerblichen zweig recht ungeeignet. Dein Projekt sieht nach einem Starter Projekt aus was auch vollkommen i.o ist. Jedoch würde ich das programm auf ca 150 Zeilen schätzen^^
  4. Autor dieses Themas

    d*******t

    Eigentlich sind es schon 654 Zeilen
  5. o.O Wie lange Scriptest du schon?
  6. Autor dieses Themas

    d*******t

    5 oder 6 Tage kann ja mal den Code posten

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <EditConstants.au3>
    #include <GDIPlus.au3>
    #include <GuiConstantsEx.au3>
    #include <GuiToolbar.au3>
    #include <ToolbarConstants.au3>
    #include <Constants.au3>
    #include <_zip.au3>
    #include <color.au3>
    #include<Array.au3>
    
    $fileclose = "bilder/Close.jpg"
    $fileClose_on = "bilder/Close_on.jpg"
    $fileMaximaze = "bilder/Maximaze.jpg"
    $FileMaximaze_on = "bilder/Maximaze_on.jpg"
    $fileMove = "bilder/move.jpg"
    $filesettings = "bilder/settings.jpg"
    $filestrich = "bilder/strich.jpg"
    $fileTrennstrich = "bilder/trenstrich.jpg"
    $filevorschau = "bilder/vorschau.jpg"
    $xml = "daten/gadget.xml"
    $copy = "daten/copy.jpg"
    
    $new = "Settings/new.ini"
    $neu = FileReadLine("Settings/name.ini",1)
    
    DirCreate('Bilder')
    DirCreate('Settings')
    
    $re1 = FileReadLine("Settings/name.ini")
    
    FileInstall("Close.jpg", $FileClose)
    FileInstall("Close_on.jpg",$Fileclose_on)
    FileInstall("Maximaze.jpg",$fileMaximaze)
    FileInstall("Maximaze_on.jpg",$FileMaximaze_on)
    FileINstall("move.jpg",$FileMove)
    FileInstall("settings.jpg",$filesettings)
    FileInstall("strich.jpg",$fileStrich)
    FileInstall("trenstrich.jpg",$fileTrennstrich)
    FileInstall("vorschau.jpg",$filevorschau)
    
    
    
    
    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Form1", 479, 105, 203, 161)
    $Input12 = GUICtrlCreateInput("Input1", 16, 32, 121, 21)
    $Button22 = GUICtrlCreateButton("Button1", 144, 24, 75, 25)
    $Label23 = GUICtrlCreateLabel("Name Der Minianwendung", 16, 8, 130, 17)
    #EndRegion ### END Koda GUI section ###
    
    Global $aSquere = 0
    
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Win7 / Vista Gadge Maker", 1100, 500, 186, 115)
    $Pic1 = GUICtrlCreatePic($fileclose,1078,65,21,21)
    $Pic2 = GUICtrlCreatePic($filestrich,1078,86,21,1)
    $Pic3 = GUICtrlCreatePic($fileMaximaze,1078,87,21,21)
    GUICtrlSetState($Pic3, $GUI_HIDE)
    $Pic6 = GUICtrlCreatePic($filestrich,1078,108,21,1)
    GUICtrlSetState($Pic6, $GUI_HIDE)
    $Pic4 = GUICtrlCreatePic($filesettings,1078,87,21,21)
    GUICtrlSetState($Pic4, $GUI_HIDE)
    $hinweis = GUICtrlCreateLabel('Diese vorschau entspricht nicht den angaben',954,290,140,40)
    GUICtrlSetFont($hinweis, 2, 400, 0, "MS Sans Serif")
    $trenvertikal = GUICtrlCreatePic('strich2.jpg',5,35,1090,2)
    GUICtrlSetState(-1, $GUI_DISABLE)
    ;--Toolbar
    Global $TBcnt = -1
    $new = XSkinToolBarButton(2)
    GUICtrlSetPos($new,10,5)
    GUICtrlSetTip($new, "Neu")
    $open = XSkinToolBarButton(7)
    GUICtrlSetPos($open,35,5)
    GUICtrlSetTip($open, "Speichern")
    $print = XSkinToolBarButton(28)
    GUICtrlSetPos($print,60,5)
    GUICtrlSetTip($print, "Schliesen")
    $close1 = XSkinToolBarButton(24)
    GUICtrlSetPos($close1,85,5)
    GUICtrlSetTip($close1, "Hilfe")
    ;--
    $MenuItem1 = GUICtrlCreateMenu("File")
    $MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
    $Pic8 = GUICtrlCreatePic($fileStrich,1078,130,21,1)
    GUICtrlSetState($Pic8, $GUI_HIDE)
    
    
    $Pic7 = GUICtrlCreatePic($fileMove,1078,87,21,21)
    $Pic5 = GUICtrlCreatePic($filevorschau,928,65,150,150)
    GUICtrlSetBkColor($pic5,0x40000000)
    $CheckBox1 = GUICtrlCreateRadio("Maximieren Erlauben",953,215,150,20)
    $CheckBox2 = GUICtrlCreateRadio("Einstellungen Erlauben",953,240,150,20)
    $CheckBox3 = GUICtrlCreateCheckbox("Beides Erlauben",953,265,150,20)
    $StandartEditor = GUICtrlCreateTab(8, 45, 820, 368)
    GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
    $TabSheet1 = GUICtrlCreateTabItem("Persönliche einstellungen/Bilder")
    $Edit3 = GUICtrlCreateEdit('',17,69,800, 340)
    GUICtrlSetState($Edit3, $GUI_HIDE)
    $Lable1 = GUICtrlCreateLabel("Name Deiner Minianwendung",15,75,140,30)
    
    
    $Input1 = GUICtrlCreateInput("Beispiel Gadget",15,100,100,20)
    $Lable2 = GUICtrlCreateLabel("Version",15,130,100,30)
    $Input2 = GUICtrlCreateInput("0.1",15,155,100,20)
    $Lable3 = GUICtrlCreateLabel("Name Des Autors",15,185,140,30)
    $Input3 = GUICtrlCreateInput("Dein Name",15,210,100,20)
    $Lable4 = GUICtrlCreateLabel("Deine Homepage",15,240,100,30)
    $Input4 = GUICtrlCreateInput("http://beispielseite.de/",15,265,100,20)
    $lable5 = GUICtrlCreateLabel("Copyright",15,300,100,20)
    $Input5 = GUICtrlCreateInput("2011",15,325,100,20, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
    $trenn1 = GUICtrlCreatePic($fileTrennstrich,198,68,2,341)
    $Lable7 = GUICtrlCreateLabel("Bitte eine Beschreibung deiner Minianwendung angeben",210,75,268,30)
    $edit1 = GUICtrlCreateEdit("Bitte beschreib die Funktion deiner Minianwendug hier.",210,100,268,180)
    $lable8 = GUICtrlCreateLabel("Bitte ein CopyRight Symbol auswälen.",210,300,240,30)
    $button1= GUICtrlCreateButton("Durchsuchen",210,325,80,25)
    $Input6 = GUICtrlCreateInput("C:\\",300,327,180,20)
    $lable10 = GUICtrlCreateLabel("Bitte ein Logo deiner Minianwendung angeben.",210,360,240,30)
    $button2= GUICtrlCreateButton("Durchsuchen",210,380,80,25)
    $Input7 = GUICtrlCreateInput("C:\\",300,382,180,20)
    $button3 = GUICtrlCreateButton("Speichern",730,380,80,25)
    $trenn2 = GUICtrlCreatePic($fileTrennstrich,500,68,2,341)
    $copy = GuictrlCreateButton("Copy.png",520,100,100,50)
    GUICtrlSetState($copy,$GUI_DISABLE)
    $logo = GUICtrlCreateButton("Logo.png",630,100,100,50)
    GUICtrlSetState($logo,$GUI_DISABLE)
    ;--
    $TabSheet2 = GUICtrlCreateTabItem('Einstellungen')
    
    
    ;--Flayout
    $Group = GUICtrlCreateGroup('',10,65,200,150)
    $input30 = GUICtrlCreateInput('http://seitenlink.de/',15,105,100,20)
    $lable30 = GUICtrlCreateLabel('Flyout',15,80,40,20)
    $Checkbox30 = GUICtrlCreateCheckbox('',190,75,15,15)
    $Hilfe = GUICtrlCreateButton('Hilfe',50,77,100,20)
    $lable31 = GUICtrlCreateLabel('Größe Des Flayout`S in Pixel',15,130,140,20)
    $input31 = GUICtrlCreateInput('300',15,155,100,20)
    $input32 = GUICtrlCreateInput('300',15,185,100,20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    ;---
    ;---Iframe
    $Group2 = GUICtrlCreateGroup('',250,65,200,150)
    $input33 = GUICtrlCreateInput('http://seitenlink.de/',255,105,100,20)
    $lable32 = GUICtrlCreateLabel('Iframe',255,80,40,20)
    $Checkbox31 = GUICtrlCreateCheckbox('',430,75,15,15)
    $Hilfe2 = GUICtrlCreateButton('Hilfe',295,77,100,20)
    $lable33 = GUICtrlCreateLabel('Größe Des Flayout`S in Pixel',255,130,140,20)
    $input34 = GUICtrlCreateInput('300',255,155,100,20)
    $input35 = GUICtrlCreateInput('300',255,185,100,20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    ;---
    ;---Text
    $Group3 = GUICtrlCreateGroup('',480,65,340,340)
    $Checkbox32 = GUICtrlCreateCheckbox('',800,75,15,15)
    $lable34 = GUICtrlCreateLabel('Einstellungs Text',500,80,100,20)
    GUICtrlCreateEdit('Hier kommt ein Einstellungs Text Rein was deine' &@CRLF& _ 
    'Einstellung bewirgt',500,100,300,300)
    ;---
    ;---Link
    $Group4 = GUICtrlCreateGroup('',10,230,200,150)
    $Checkbox33 = GUICtrlCreateCheckbox('',190,240,15,15)
    $lable35 = GUICtrlCreateLabel('Link in Der Einstellung',15,80,40,20)
    
    
    
    GUICtrlCreateTabItem("")
    GUICtrlSetState($TabSheet1,$GUI_SHOW)
    $edit2 = GUICtrlCreateEdit("Willkommen beim Win7/ Vista Gadget Genarator",0,420,1100,70,BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN),1)
    GUICtrlSetColor($edit2, 0x008000)
    $button27 =GUICtrlCreateButton("Profi Editor",1000,380,80,25)
    $button28 =GUICtrlCreateButton("Standart Editor",1000,380,80,25)
    GUICtrlSetState($button28, $GUI_HIDE)
    GUISetState(@SW_SHOW,$Form1)
    #EndRegion ### END Koda GUI section ###
    
    
    
    Check()
    Func Check()
    $Readnew = FileReadLine(@ScriptDir & "/Settings/new.ini",1)
    IF $Readnew = 'erfolgreicherstellt' Then
    GUISetState(@SW_HIDE,$Form2)
    Else
    GUISetState(@SW_SHOW,$Form2)
    GUISetState(@SW_HIDE,$Form1)
    EndIf
    If FileExists(@SCriptDir & "/daten/copy.png") = 1 then 
    GUICtrlSetState($copy,$GUI_ENABLE)
    EndIf
    If FileExists(@SCriptDir & "/daten/logo.png") = 1 then 
    GUICtrlSetState($logo,$GUI_ENABLE)
    EndIf
    If FileExists("Daten") = 0 Then
    GUICtrlSetState($Pic1, $GUI_DISABLE)
    GUICtrlSetState($Input1, $GUI_DISABLE)
    GUICtrlSetState($Input2, $GUI_DISABLE)
    GUICtrlSetState($Input3, $GUI_DISABLE)
    GUICtrlSetState($Edit1, $GUI_DISABLE)
    GUICtrlSetState($lable7, $GUI_DISABLE)
    GUICtrlSetState($lable8, $GUI_DISABLE)
    GUICtrlSetState($lable5, $GUI_DISABLE)
    GUICtrlSetState($lable4, $GUI_DISABLE)
    GUICtrlSetState($Button1, $GUI_DISABLE)
    GUICtrlSetState($Button2, $GUI_DISABLE)
    GUICtrlSetState($Button3, $GUI_DISABLE)
    GUICtrlSetState($Button27, $GUI_DISABLE)
    GUICtrlSetState($Input6, $GUI_DISABLE)
    GUICtrlSetState($Input7, $GUI_DISABLE)
    GUICtrlSetState($Input5, $GUI_DISABLE)
    GUICtrlSetState($Input6, $GUI_DISABLE)
    GUICtrlSetState($Input4, $GUI_DISABLE)
    EndIf
    
    IF FileExists(@SCriptDir & "/settings/" & $neu & ".ini") = 1 Then
    GUICtrlSetData($Input1,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",2))
    GUICtrlSetData($Input2,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",4))
    GUICtrlSetData($Input3,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",6))
    GUICtrlSetData($Input4,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",8))
    GUICtrlSetData($Input5,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",10))
    GUICtrlSetData($Input6,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",12))
    GUICtrlSetData($Input7,FileReadLine(@SCriptDir & "/settings/" & $neu & ".ini",14))
    GUICtrlSetData($Edit1,FileRead(@SCriptDir & "/settings/" & $neu & "_disc.ini"))
    
    If FileExists(@ScriptDir & '/settings/editor.ini') = 1 Then
    Profi()
    Else
    standart()
    EndIf
    
    EndIf
    EndFunc
    
    
    $zip = @ScriptDir & '/Daten.zip'
    _Zip_Create($zip)
    _Zip_AddItem('Daten.zip',@ScriptDir & '/Daten/copy.png')
    
    Update()
    Func Update()
    InetGet("http://dicecraft.lima-city.de/version.txt",@ScriptDir & '/daten/version.txt',1)
    If FileReadLine(@ScriptDir & '/daten/version.txt',1) = 'V0.1 Alpha2' Then
    Else
    $ms =  MsgBox(1+48,'Info','Willst du updaten')
    If $ms = 1 Then
    ShellExecuteWait("Http://www.dicecraft.lima-city.de")
    Else
    EndIf
    EndIf
    EndFunc
    
    Func Update2()
    InetGet("http://dicecraft.lima-city.de/version.txt",@ScriptDir & '/daten/version.txt',1)
    If FileReadLine(@ScriptDir & '/daten/version.txt',1) = 'V0.1 Alpha2' Then
    MsgBox(0,'Info','Du Besitzt bereits die Neuste Version')
    Else
    $ms =  MsgBox(1+48,'Info','Willst du updaten')
    If $ms = 1 Then
    ShellExecuteWait("Http://www.dicecraft.lima-city.de")
    Else
    EndIf
    EndIf
    EndFunc
    
    Func Save()
    $savaornot = MsgBox(1+48,"Info",@UserName & " Möchtest Du die Minianwendung speichern")
    IF $savaornot = 1 then
    FileOpen(@SCriptDir & "/settings/" & $neu & ".ini",2)
    FileOpen(@SCriptDir & "/settings/" & $neu & "_disc.ini" ,2)
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "Name_der_Minianwendung", GuiCtrlRead($Input1))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "Version", GuiCtrlRead($Input2))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "Name_autor", GuiCtrlRead($Input3))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini","Homepage", GuiCtrlRead($Input4))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "CopyRight", GuiCtrlRead($Input5))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "Pic1", GuiCtrlRead($Input6))
    IniWriteSection(@SCriptDir & "/settings/" & $neu & ".ini", "Pic2", GuiCtrlRead($Input7))
    FileWrite(@SCriptDir & "/settings/" & $neu & "_disc.ini" ,GuiCtrlRead($Edit1))
    Exit
    EndIf
    
    
    EndFunc
    
    Func XSkinToolBarCreate($XTitle, $tool_left, $tool_top, $tool_width, $tool_bkcolor = "")
    Local $Xh_ToolBar
    $Xh_ToolBar = GUICreate($XTitle, $tool_width, 24, $tool_left, $tool_top, $WS_POPUP, $WS_CLIPCHILDREN)
    If $tool_bkcolor <> "" Then GUISetBkColor($tool_bkcolor, $Xh_ToolBar)
    Return $Xh_ToolBar
    EndFunc
    
    Func XSkinToolBarButton($iNumber, $iDLL = "shell32.dll")
    Local $Xhadd, $TBBleft
    $TBcnt = $TBcnt + 1
    $TBBleft = $TBcnt * 24
    $Xhadd = GUICtrlCreateButton("", $TBBleft, 1, 24, 24, $BS_ICON)
    GUICtrlSetImage($Xhadd, $iDLL, $iNumber, 0)
    Return $Xhadd
    EndFunc
    
    Func XSkinToolBarSeparator()
    Local $TBBleft
    $TBcnt = $TBcnt + .5
    $TBBleft = $TBcnt * 24
    GUICtrlCreateLabel("", $TBBleft + 17, 2, 2, 22, $SS_ETCHEDVERT, $GUI_WS_EX_PARENTDRAG)
    EndFunc
    
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    If FileExists(@ScriptDir & '/settings/editor.ini') = 1 Then
    $savaornot = MsgBox(1+48,"Info",@UserName & ' Möchtest Du die Minianwendung speichern')
    IF $savaornot = 1 then
    FileOpen(@ScriptDir & '/daten/gadget.xml',2)
    FileWriteLine(@ScriptDir & '/daten/gadget.xml', GUICtrlRead($Edit3))
    Exit
    EndIf
    Else
    save()
    EndIf
    Case $Checkbox1 
    maxi()
    
    Case $pic5
    _GDIPlus_Startup()
    Search3()
    _GDIPlus_Shutdown()
    Case $button27
    profi()
    Case $Hilfe
    MsgBox(0,'Info','Als Flayout versteht man folgendes.' &@CRLF& _ 
    'Es wird ein Link in der Einstellungen der fertigen Minianwendung eingegben' &@CRLF& _ 
    'Anschliesend Mit ok bestätigt un mit einem Druck auf das Standart Bild wird ein' &@CRLF& _ 
    'Fenster Geöffnet welches den link Anzeigt so können z.B Internetseiten/YoutubeSeiten/Filme die im Internet Liegen angezeigt werden')
    Case $copy
    ShellExecuteWait(@ScriptDir & "\daten\copy.png")
    Case $logo
    ShellExecuteWait(@ScriptDir & "\daten\logo.png")
    Case $Button22
    Newproject()
    Case $CheckBox2
    settings()
    Case $CheckBox3
    beides()
    Case $button3
    xml()
    Case $new
    new()
    Case $button1
    _GDIPlus_Startup()
    Search()
    _GDIPlus_Shutdown()
    Case $button2
    _GDIPlus_Startup()
    Search2()
    _GDIPlus_Shutdown()
    Case $button28
    standart()
    
    
    EndSwitch
    WEnd
    
    
    Func maxi()
    $Read1 = GUICtrlRead($CheckBox1)
    If $Read1 = $GUI_CHECKED Then
    GUICtrlSetPos($Pic7,1078,109)
    GUICtrlSetState($Pic3, $GUI_SHOW)
    GUICtrlSetState($Pic6, $GUI_SHOW)
    GUICtrlSetState($Pic4, $GUI_HIDE)
    Else
    GUICtrlSetState($Pic4, $GUI_SHOW)
    GUICtrlSetState($Pic6, $GUI_SHOW)		
    GUICtrlSetState($Pic3, $GUI_HIDE)
    EndIf
    EndFunc
       
    Func settings()
    $Read2 = GUICtrlRead($CheckBox2)
    If $Read2 = $GUI_CHECKED Then
    GUICtrlSetPos($Pic7,1078,109)
    GUICtrlSetState($Pic4, $GUI_SHOW)
    GUICtrlSetState($Pic6, $GUI_SHOW)		
    GUICtrlSetState($Pic3, $GUI_HIDE)
    Else
    GUICtrlSetState($Pic3, $GUI_SHOW)
    GUICtrlSetState($Pic6, $GUI_SHOW)
    GUICtrlSetState($Pic4, $GUI_HIDE)
    EndIf
    EndFunc
    	  
    Func beides()
    $Read3 = GUICtrlRead($CheckBox3)
    If $Read3 = $GUI_CHECKED Then
    GUICtrlSetState($CheckBox1, $GUI_DISABLE)
    GUICtrlSetState($CheckBox2, $GUI_DISABLE)
    GUICtrlSetState($CheckBox1, $GUI_UNCHECKED)
    GUICtrlSetState($CheckBox2, $GUI_UNCHECKED)
    GUICtrlSetPos($Pic4,1078,109)
    GUICtrlSetState($Pic3, $GUI_SHOW)
    GUICtrlSetState($Pic6, $GUI_SHOW)
    GUICtrlSetState($Pic4, $GUI_SHOW)
    GUICtrlSetState($Pic8, $GUI_SHOW)
    GUICtrlSetPos($Pic7,1078,131)
    Else
    GUICtrlSetState($CheckBox1, $GUI_ENABLE)
    GUICtrlSetState($CheckBox2, $GUI_ENABLE)
    GUICtrlSetState($CheckBox1, $GUI_UNCHECKED)
    GUICtrlSetState($CheckBox2, $GUI_UNCHECKED)
    GUICtrlSetPos($Pic7,1078,87)
    GUICtrlSetPos($Pic4,1078,87)
    GUICtrlSetState($Pic3, $GUI_HIDE)
    GUICtrlSetState($Pic6, $GUI_HIDE)
    GUICtrlSetState($Pic4, $GUI_HIDE)
    GUICtrlSetState($Pic8, $GUI_HIDE)
    EndIf
    EndFunc
    	 
    Func xml()
    If FileExists($xml) = 1 then
    FileOpen($xml,2)
    Else
    FileOpen($xml)
    EndIf
    FileOpen($xml,1)
    FileWriteLine($xml,'<?xml version="1.0" encoding="utf-8" ?>' &@CRLF& _ 
    '<gadget>' &@CRLF& _
    '  <name>' & GUICtrlRead($Input1) & '</name>' &@CRLF& _ 
    '  <version>' & GUICtrlRead($Input2) & '</version>' &@CRLF& _ 
    '  <author name="' & GUICtrlRead($Input3) & '">' &@CRLF& _ 
    '    <info url="'& GUICtrlRead($Input4) &'"/>' &@CRLF& _
    '    <logo src="copy.png" />' &@CRLF& _
    '  </author>' &@CRLF& _
    '  <copyright>' & '"' & GUICtrlRead($Input5) & '"' & '</copyright>' &@CRLF& _
    '  <description>' & '"' & GUICtrlRead($Edit1) & ' Gemacht Mit dem Win7/Vista Gadget Creator' & '"' & '</description>' &@CRLF& _
    '<icons>' &@CRLF& _
    '    <icon src="logo.png"/>' &@CRLF& _
    ' </icons><hosts>' &@CRLF& _
    '   <host name="sidebar">' &@CRLF& _
    '     <base type="HTML" apiVersion="1.0.0" src="'& FileReadLine(@ScriptDir & '/Settings/name.ini',1)& '.html' & '" />' &@CRLF& _
    '     <permissions>Full</permissions>' &@CRLF& _
    '     <platform minPlatformVersion="1.0" />' &@CRLF& _
    '     <defaultImage src="drag.png"/>' &@CRLF& _
    '   </host>' &@CRLF& _
    ' </hosts>' &@CRLF& _
    '</gadget>')
    FileClose($xml)
    EndFunc	
    
    Func Search()
    $message = "Bitte ein Bild Asuwälen."
    $var = FileOpenDialog($message, @DesktopDir, "Bild (*.jpg;*.bmp;*.png)", 1 + 4 )
    If @error Then
    $error = MsgBox(48,"Info","Kein Bild Ausgewält")
    Else
    $hImage = _GDIPlus_ImageLoadFromFile($var)
    $width = _GDIPlus_ImageGetWidth($hImage)
    $height = _GDIPlus_ImageGetHeight($hImage)
    If $width and $height = 48 Then
    MsgBox(0,"",$width& 'px' & ' • ' &  $height & 'px')
    GUICtrlSetData($Input6,FileGetLongName($var))
    FileCopy($var, @ScriptDir & "/daten/copy.png",1)
    FileCopy($var, @ScriptDir & "/bilder/copy.jpg",1)
    GUICtrlSetData($Edit2,"")
    GUICtrlSetColor($edit2, 0x0026FF)
    GUICtrlSetData($Edit2,"Kopiert " & '"' & $var & '"' &@CRLF& _
    "Nach " & '"' & @ScriptDir & "/bilder/logo.jpg" & '"' &@CRLF& _
    'Kopieren Fertiggestellt!!')
    GUICtrlSetState($copy,$GUI_Enable)
    Else
    MsgBox(0,"Error","Error das bild muß 48x48 px betragen")
    GUICtrlSetData($Input6,"C:\\")
    GUICtrlSetState($copy,$GUI_DISABLE)
    GUICtrlSetData($Edit2,"")
    GUICtrlSetColor($edit2, 0xFF0000)
    GUICtrlSetData($Edit2,"Ein Fehler ist Aufgetreten !!!")
    EndIf
    EndIf
    
    
    EndFunc
    
    
    
    Func Search2()
    $message = "Bitte ein Bild Asuwälen."
    $var = FileOpenDialog($message, @DesktopDir, "Bild (*.jpg;*.bmp;*.png)", 1 + 4 )
    If @error Then
    $error = MsgBox(48,"Info","Kein Bild Ausgewält")
    Else
    $hImage = _GDIPlus_ImageLoadFromFile($var)
    $width = _GDIPlus_ImageGetWidth($hImage)
    $height = _GDIPlus_ImageGetHeight($hImage)
    If $width and $height = 150 Then
    MsgBox(0,"",$width& 'px' & ' • ' &  $height & 'px')
    GUICtrlSetData($Input7,FileGetLongName($var))
    GUICtrlSetData($Edit2,"")
    GUICtrlSetColor($edit2, 0x0026FF)
    GUICtrlSetData($Edit2,"Kopiert " & '"' & $var & '"' &@CRLF& _
    "Nach " & '"' & @ScriptDir & "/bilder/logo.jpg" & '"' &@CRLF& _
    'Kopieren Fertiggestellt!!')
    FileCopy($var, @ScriptDir & "/daten/logo.png",1)
    FileCopy($var, @ScriptDir & "/bilder/logo.jpg",1)
    GUICtrlSetState($logo,$GUI_ENABLE)
    Else
    MsgBox(0,"Error","Error das bild muß 150x150 px betragen")
    GUICtrlSetData($Input7,"C:\\")
    GUICtrlSetState($logo,$GUI_DISABLE)
    GUICtrlSetData($Edit2,"")
    GUICtrlSetColor($edit2, 0xFF0000)
    GUICtrlSetData($Edit2,"Ein Fehler ist Aufgetreten !!!")
    EndIf
    EndIf
    EndFunc
    
    Func new()
    
    If FileExists('Daten') = 1 Then
    $NeMsg = MsgBox(4+48,'Info','Info eine Unfertige Minianwendung Besteht bereits möchtest du sie löschen Das Projekt heist ' & FileReadLine(@ScriptDir & '/Settings/name.ini'))
    If $NeMsg = 6 Then
    FileRecycle('Daten')
    GUISetState(@SW_SHOW,$Form2)
    GUISetState(@SW_HIDE,$Form1)
    Else
    GUISetState(@SW_SHOW,$Form1)
    GUISetState(@SW_HIDE,$Form2)
    EndIf
    Else
    MsgBox(1,'Info','Ein neues Programm kann erstellt werden')
    GUISetState(@SW_SHOW,$Form2)
    GUISetState(@SW_HIDE,$Form1)
    EndIf
    EndFunc
    
    Func Newproject()
    
    $ir = GUICtrlRead($Input12)
    If $ir = '' Then
    MsgBox(0,"Info","Bitte einen Titel eingeben")
    Else
    FileOpen(@ScriptDir & '/Settings/name.ini',2)
    FileOpen(@ScriptDir & '/Settings/new.ini',2)
    FileOpen(@ScriptDir & '/Settings/log.ini',2)
    FileWriteLine(@ScriptDir & '/Settings/name.ini',GUICtrlRead($Input12))
    FileWriteLine(@ScriptDir & '/Settings/new.ini','erfolgreicherstellt')
    DirCreate("Daten")
    FileWriteLine(@ScriptDir & '/Settings/log.ini','Erstelle Projekt --->  ' & FileRead(@ScriptDir & '/Settings/name.ini'))
    GUISetState(@SW_SHOW,$Form1)
    GUISetState(@SW_HIDE,$Form2)
    login()
    EndIf
    EndFunc
    
    Func login()
    GUICtrlSetData($Edit2,FileRead(@ScriptDir & '/Settings/log.ini'))
    EndFunc
    
    Func profi()
    ;---Hide
    GUICtrlSetState($button27, $GUI_HIDE)
    GUICtrlSetState($Lable1, $GUI_HIDE)
    GUICtrlSetState($Input1, $GUI_HIDE)
    GUICtrlSetState($Lable2, $GUI_HIDE)
    GUICtrlSetState($Input2, $GUI_HIDE)
    GUICtrlSetState($Lable4, $GUI_HIDE)
    GUICtrlSetState($Lable3, $GUI_HIDE)
    GUICtrlSetState($Input3, $GUI_HIDE)
    GUICtrlSetState($Input4, $GUI_HIDE)
    GUICtrlSetState($lable5, $GUI_HIDE)
    GUICtrlSetState($Input5, $GUI_HIDE)
    GUICtrlSetState($trenn1, $GUI_HIDE)
    GUICtrlSetState($Lable7, $GUI_HIDE)
    GUICtrlSetState($edit1, $GUI_HIDE)
    GUICtrlSetState($lable8, $GUI_HIDE)
    GUICtrlSetState($button1, $GUI_HIDE)
    GUICtrlSetState($lable10, $GUI_HIDE)
    GUICtrlSetState($button2, $GUI_HIDE)
    GUICtrlSetState($Input7, $GUI_HIDE)
    GUICtrlSetState($Input6, $GUI_HIDE)
    GUICtrlSetState($button3, $GUI_HIDE)
    GUICtrlSetState($trenn2, $GUI_HIDE)
    GUICtrlSetState($copy, $GUI_HIDE)
    GUICtrlSetState($logo, $GUI_HIDE)
    GUICtrlSetState($Edit3, $GUI_Show)
    GUICtrlSetState($button28, $GUI_Show)
    GUICtrlSetData($Edit3, FileRead(@ScriptDir & '/daten/gadget.xml'))
    GUICtrlSetColor($Edit3, 0x001489)
    
    FileOpen(@ScriptDir & '/settings/editor.ini',2)
    FileWriteLine(@ScriptDir & '/settings/editor.ini','Profi')
    
    ;---Show
    EndFunc
    
    Func standart()
    GUICtrlSetState($button27, $GUI_Show)
    GUICtrlSetState($Lable1, $GUI_Show)
    GUICtrlSetState($Input1, $GUI_Show)
    GUICtrlSetState($Lable2, $GUI_Show)
    GUICtrlSetState($Input2, $GUI_Show)
    GUICtrlSetState($Lable4, $GUI_Show)
    GUICtrlSetState($Lable3, $GUI_Show)
    GUICtrlSetState($Input3, $GUI_Show)
    GUICtrlSetState($Input4, $GUI_Show)
    GUICtrlSetState($lable5, $GUI_Show)
    GUICtrlSetState($Input5, $GUI_Show)
    GUICtrlSetState($trenn1, $GUI_Show)
    GUICtrlSetState($Lable7, $GUI_Show)
    GUICtrlSetState($edit1, $GUI_Show)
    GUICtrlSetState($lable8, $GUI_Show)
    GUICtrlSetState($button1, $GUI_Show)
    GUICtrlSetState($lable10, $GUI_Show)
    GUICtrlSetState($button2, $GUI_Show)
    GUICtrlSetState($Input7, $GUI_Show)
    GUICtrlSetState($Input6, $GUI_Show)
    GUICtrlSetState($button3, $GUI_Show)
    GUICtrlSetState($trenn2, $GUI_Show)
    GUICtrlSetState($copy, $GUI_Show)
    GUICtrlSetState($logo, $GUI_Show)
    GUICtrlSetState($Edit3, $GUI_HIDE)
    GUICtrlSetState($button28, $GUI_HIDE)
    FileDelete(@ScriptDir & '/settings/editor.ini')
    EndFunc
    
    
    
    
    
    
    
    Func Search3()
    	$message = "Bitte ein Bild Asuwälen."
    	$var = FileOpenDialog($message, @DesktopDir, "Bild (*.jpg;*.bmp;*.png)", 1 + 4 )
    	If @error Then
    	$error = MsgBox(48,"Info","Kein Bild Ausgewält")
    Else
    	$hImage = _GDIPlus_ImageLoadFromFile($var)
    	$width = _GDIPlus_ImageGetWidth($hImage)
    	$height = _GDIPlus_ImageGetHeight($hImage)
    If $width and $height = 150 Then
    	$hImage = _GDIPlus_ImageLoadFromFile($var)
    	$sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
    	_GDIPlus_ImageSaveToFileEx($hImage,@ScriptDir & '/bilder/vorschau.jpg', $sCLSID)
    	_GDIPlus_ShutDown()
    	GUICtrlSetImage($pic5,@ScriptDir & '/bilder/vorschau.jpg')
    	FileCopy($var, @ScriptDir & "/daten/background.png",1)
    Else
    	MsgBox(0,'Info','Laut Windows soll das bild 150x150 Pixel betragen')
    	GUICtrlSetData($Edit2,"")
    	GUICtrlSetColor($edit2, 0xFF0000)
    	GUICtrlSetData($Edit2,"Ein Fehler ist Aufgetreten !!!")
    EndIf
    EndIf
    EndFunc


    Das Programm is nochnichmal zu hälfte fertig


    http://imageshack.us/photo/my-images/20/unbenannteg.png/

    Beitrag zuletzt geändert: 30.12.2011 21:32:08 von dicecraft
  7. Nagut nachdem ich den Code überflogen habe ist es doch schon i.o ^^ hatte nur das erste bild begutachtet. Übrigens gut ist das du dein Code teilst :)
  8. Autor dieses Themas

    d*******t

    Wird e OpenSource deshalb versuch ich es so gut wie möglich zu machen
  9. Nur so als tipp, du solltest dir angewöhnen On Event zu nutzen da es leistungs vorteilhafter ist. Wenn du mal aufwendige rechenoperationen machen musst dann wird die gui einfrieren also kannst du das ganze mit GUI event umgehen ;)
  10. Autor dieses Themas

    d*******t

    Beschäftige mich zwar schon lange mit Autoit hab aber keine Ahnung wie du das meinst
  11. Es gibt einen On event mode wenn du den setzt dann kannst du den einzelden elementen funktionen zuwesen die aufgerufen werden sollen wenn du sie betätigst!
  12. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

Dir gefällt dieses Thema?

Über lima-city

Login zum Webhosting ohne Werbung!