Toolbar für Stickware

  • hä?

    der source steht doch da?!....


    ->

    Spoiler anzeigen
    [autoit]

    ;**************************************************************************
    ;
    ; Erstellt durch Thorsten Klimt 14.08.2007
    ;
    ;**************************************************************************

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

    ;----------------------Initialisierung------------------------------
    #include
    #include
    #include

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

    $dir=StringLeft(@ScriptDir,3)
    dim $app_name[1]
    dim $app_ico[1]
    dim $app_path[1]
    dim $app_but[1]
    ;-----------------------optionale Apps---------------------------------------------
    $file = FileOpen($dir & "port_apps\Shiva\settings.inf", 0)
    $b=10
    While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    Select
    case $b=0
    _ArrayAdd($app_name,$line)
    $b=1
    case $b=1
    _ArrayAdd($app_ico,$line)
    $b=2
    case $b=2
    _ArrayAdd($app_path,$line)
    $b=0
    case $b=10
    $max_x=$line
    $b=11
    Case $b=11
    $posx=$line
    $b=12
    Case $b=12
    $posy=$line
    $b=0
    EndSelect

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

    Wend
    _ArrayDelete($app_name,0)
    _ArrayDelete($app_path,0)
    _ArrayDelete($app_ico,0)

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

    $zahl1=UBound($app_path)

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

    ;--------------------Maße Initilisieren1---------------------------

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

    $button=21
    $ab=4
    $top=2
    $min_y=25
    ;---------------------------------------------
    $left=340
    $min_x=340
    if $max_x<$min_x Then
    $max_x=$min_x
    EndIf
    $x=$left+$zahl1*($button+$ab)
    $lf=1
    if $x>$max_x Then
    $lf=Ceiling($x/$max_x)
    $x=$max_x
    EndIf
    $y=$lf*$min_y

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

    ;--------------------------GUI erstellen mit Standardschaltflächen---------------------------------
    $space=""
    For $i=0 to $max_x/6.1
    $space=$space & chr(32)
    Next
    $name="hiva 1.0 " & chr(169) & " by DesasterTec"
    AutoItSetOption("TrayAutoPause",0)

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

    $leiste=GUICreate($name,$x,$y,$posx,$posy,$GUI_SS_DEFAULT_GUI,$WS_EX_ACCEPTFILES)
    GUISetState (@SW_SHOW)
    winsetontop($leiste,"",1)
    opt("TrayOnEventMode",1)
    TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE,"minmax")
    TraySetClick(8)

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

    $in=GUICtrlCreateInput("",2,$top,180,$button)
    GUICtrlSetState(-1,$GUI_DROPACCEPTED)

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

    $clr=GUICtrlCreateButton("Clear",186,$top,40,$button)

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

    $browse_b=GUICtrlCreateButton("",229,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\open.ico")
    GUICtrlSetTip(-1,"Browse")

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

    $config=GUICtrlCreateButton("",254,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\edit2.ico")
    GUICtrlSetTip(-1,"Properties")

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

    $autoit=GUICtrlCreateButton("",290,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoit.ico",-1)
    GUICtrlSetTip(-1,"AutoIt")

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

    $back=GUICtrlCreateButton("",315,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\backup.ico",-1)
    GUICtrlSetTip(-1,"ShivaBackup")

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

    ;---------------------Apps aus der Inf Datei erstellen------------------------------
    $min=0

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

    for $i=0 to $zahl1-1
    if $left+$button+$ab>$max_x then
    $left=$ab
    $top=$top+$min_y
    EndIf
    $app_path[$i]=$dir & $app_path[$i]
    $app_but[$i]=GUICtrlCreateButton("",$left,$top,$button,$button,$BS_ICON)
    if not fileexists($app_path[$i]) then
    $app_ico[$i]="port_apps\Shiva\ico\disable.ico"
    $app_name[$i]=$app_name[$i] & " (Disabled)"
    endif
    GUICtrlSetImage(-1,$dir & $app_ico[$i],-1)
    GUICtrlSetTip(-1,$app_name[$i])
    $left=$left+$button+$ab
    $max=$app_but[$i]
    if $min=0 then
    $min=$max
    endif
    _ArrayAdd($app_but,"")
    next
    _ArrayDelete($app_but,Ubound($app_but)-1)

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

    ;----------------Events zuweisen------------------------------------
    while 1
    $msg = GUIGetMsg()
    $file=GUICtrlRead($in)
    if $file<>"" then
    $file=" " & chr(34) & $file & chr(34)
    endif
    if $msg=$autoit then
    autoit("AutoIt",$file,$dir)
    endif
    if $msg=$config then
    run($dir & "port_apps\Shiva\config.exe")
    endif
    if $msg=$GUI_EVENT_CLOSE then
    Exit
    endif
    if $msg=$GUI_EVENT_MINIMIZE then
    winsetstate($name,"",@SW_HIDE)
    endif
    if $msg=$clr then
    GUICtrlSetData($in,"")
    endif
    if $msg=$back then
    Run("wscript " & $dir & "port_apps\Shiva\Backup\ShivaBackup.vbs")
    endif
    if $msg=$browse_b then
    $browse=FileOpenDialog("Open",@MyDocumentsDir,"All (*.*)" )
    GUICtrlSetData($in,$browse)
    endif
    if $msg>=$min and $msg<=$max then
    for $j=0 to $zahl1-1
    if $msg=$app_but[$j] then
    if not fileexists($app_path[$j]) then
    msgbox (48,"Fehler",$app_path[$j] & " existiert nicht!")
    else
    run($app_path[$j] & $file)
    endif
    GUICtrlSetData($in,"")
    endif
    next
    endif

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

    Sleep(10)
    Wend

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

    ;------------------------Funktionen-----------------------------------------

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

    func minmax()
    $stat=WinGetState($name)
    if $stat=7 then
    winsetstate($name,"",@SW_HIDE)
    else
    winsetstate($name,"",@SW_SHOW)
    winactivate($name)
    endif
    endfunc

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

    func autoit($a_name,$a_file,$dir)
    $button=21
    $a_left=10
    $a_top=10
    $a_ab=30
    $a_feld=GUICreate($a_name,130,140)
    GUISetState (@SW_SHOW)
    GUISetIcon($dir & "port_apps\Shiva\ico\autoit.ico",-1,$a_feld)
    $a_run=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoitRun.ico",-1)
    GUICtrlCreateLabel("Run Script",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_info=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoit.ico",-1)
    GUICtrlCreateLabel("Window Info",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_help=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\Help.ico",-1)
    GUICtrlCreateLabel("Help",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_exe=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoitScript2Exe.ico",-1)
    GUICtrlCreateLabel("Script2Exe",$a_left+$button+5,$a_top+5)
    while 1
    $a_msg = GUIGetMsg()
    select
    case $a_msg=$a_run
    run($dir & "port_apps\autoit-v3\autoit3.exe " & $a_file)
    case $a_msg=$a_info
    run($dir & "port_apps\autoit-v3\au3info.exe")
    case $a_msg=$a_help
    run($dir & "port_apps\autoit-v3\autoit3help.exe")
    case $a_msg=$a_exe
    run($dir & "port_apps\autoit-v3\Aut2Exe\Aut2Exe.exe")
    endselect
    if $a_msg>0 or $a_msg=$GUI_EVENT_CLOSE then
    GUIDelete($a_feld)
    exitloop
    endif
    Sleep(10)
    Wend
    endfunc

    [/autoit]


    </Array.au3></Constants.au3></GUIConstants.au3>

  • ok klar kein problem

    kann ich verstehen


    [autoit]

    ;----------------------Initialisierung------------------------------
    #include <GUIConstants.au3>
    #include <Constants.au3>
    #include <Array.au3>

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

    $dir=StringLeft(@ScriptDir,3)
    dim $app_name[1]
    dim $app_ico[1]
    dim $app_path[1]
    dim $app_but[1]
    ;-----------------------optionale Apps---------------------------------------------
    $file = FileOpen($dir & "port_apps\Shiva\settings.inf", 0)
    $b=10
    While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    Select
    case $b=0
    _ArrayAdd($app_name,$line)
    $b=1
    case $b=1
    _ArrayAdd($app_ico,$line)
    $b=2
    case $b=2
    _ArrayAdd($app_path,$line)
    $b=0
    case $b=10
    $max_x=$line
    $b=11
    Case $b=11
    $posx=$line
    $b=12
    Case $b=12
    $posy=$line
    $b=0
    EndSelect

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

    Wend
    _ArrayDelete($app_name,0)
    _ArrayDelete($app_path,0)
    _ArrayDelete($app_ico,0)

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


    $zahl1=UBound($app_path)

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

    ;--------------------Maße Initilisieren1---------------------------

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

    $button=21
    $ab=4
    $top=2
    $min_y=25
    ;---------------------------------------------
    $left=340
    $min_x=340
    if $max_x<$min_x Then
    $max_x=$min_x
    EndIf
    $x=$left+$zahl1*($button+$ab)
    $lf=1
    if $x>$max_x Then
    $lf=Ceiling($x/$max_x)
    $x=$max_x
    EndIf
    $y=$lf*$min_y

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

    ;--------------------------GUI erstellen mit Standardschaltflächen---------------------------------
    $space=""
    For $i=0 to $max_x/6.1
    $space=$space & chr(32)
    Next
    $name="hiva 1.0 " & chr(169) & " by DesasterTec"
    AutoItSetOption("TrayAutoPause",0)

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

    $leiste=GUICreate($name,$x,$y,$posx,$posy,$GUI_SS_DEFAULT_GUI,$WS_EX_ACCEPTFILES)
    GUISetState (@SW_SHOW)
    winsetontop($leiste,"",1)
    opt("TrayOnEventMode",1)
    TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE,"minmax")
    TraySetClick(8)

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

    $in=GUICtrlCreateInput("",2,$top,180,$button)
    GUICtrlSetState(-1,$GUI_DROPACCEPTED)

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

    $clr=GUICtrlCreateButton("Clear",186,$top,40,$button)

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

    $browse_b=GUICtrlCreateButton("",229,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\open.ico")
    GUICtrlSetTip(-1,"Browse")

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

    $config=GUICtrlCreateButton("",254,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\edit2.ico")
    GUICtrlSetTip(-1,"Properties")

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

    $autoit=GUICtrlCreateButton("",290,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoit.ico",-1)
    GUICtrlSetTip(-1,"AutoIt")

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

    $back=GUICtrlCreateButton("",315,$top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\backup.ico",-1)
    GUICtrlSetTip(-1,"ShivaBackup")

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

    ;---------------------Apps aus der Inf Datei erstellen------------------------------
    $min=0

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

    for $i=0 to $zahl1-1
    if $left+$button+$ab>$max_x then
    $left=$ab
    $top=$top+$min_y
    EndIf
    $app_path[$i]=$dir & $app_path[$i]
    $app_but[$i]=GUICtrlCreateButton("",$left,$top,$button,$button,$BS_ICON)
    if not fileexists($app_path[$i]) then
    $app_ico[$i]="port_apps\Shiva\ico\disable.ico"
    $app_name[$i]=$app_name[$i] & " (Disabled)"
    endif
    GUICtrlSetImage(-1,$dir & $app_ico[$i],-1)
    GUICtrlSetTip(-1,$app_name[$i])
    $left=$left+$button+$ab
    $max=$app_but[$i]
    if $min=0 then
    $min=$max
    endif
    _ArrayAdd($app_but,"")
    next
    _ArrayDelete($app_but,Ubound($app_but)-1)

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

    ;----------------Events zuweisen------------------------------------
    while 1
    $msg = GUIGetMsg()
    $file=GUICtrlRead($in)
    if $file<>"" then
    $file=" " & chr(34) & $file & chr(34)
    endif
    if $msg=$autoit then
    autoit("AutoIt",$file,$dir)
    endif
    if $msg=$config then
    run($dir & "port_apps\Shiva\config.exe")
    endif
    if $msg=$GUI_EVENT_CLOSE then
    Exit
    endif
    if $msg=$GUI_EVENT_MINIMIZE then
    winsetstate($name,"",@SW_HIDE)
    endif
    if $msg=$clr then
    GUICtrlSetData($in,"")
    endif
    if $msg=$back then
    Run("wscript " & $dir & "port_apps\Shiva\Backup\ShivaBackup.vbs")
    endif
    if $msg=$browse_b then
    $browse=FileOpenDialog("Open",@MyDocumentsDir,"All (*.*)" )
    GUICtrlSetData($in,$browse)
    endif
    if $msg>=$min and $msg<=$max then
    for $j=0 to $zahl1-1
    if $msg=$app_but[$j] then
    if not fileexists($app_path[$j]) then
    msgbox (48,"Fehler",$app_path[$j] & " existiert nicht!")
    else
    run($app_path[$j] & $file)
    endif
    GUICtrlSetData($in,"")
    endif
    next
    endif

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

    Sleep(10)
    Wend

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

    ;------------------------Funktionen-----------------------------------------

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

    func minmax()
    $stat=WinGetState($name)
    if $stat=7 then
    winsetstate($name,"",@SW_HIDE)
    else
    winsetstate($name,"",@SW_SHOW)
    winactivate($name)
    endif
    endfunc

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

    func autoit($a_name,$a_file,$dir)
    $button=21
    $a_left=10
    $a_top=10
    $a_ab=30
    $a_feld=GUICreate($a_name,130,140)
    GUISetState (@SW_SHOW)
    GUISetIcon($dir & "port_apps\Shiva\ico\autoit.ico",-1,$a_feld)
    $a_run=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoitRun.ico",-1)
    GUICtrlCreateLabel("Run Script",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_info=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoit.ico",-1)
    GUICtrlCreateLabel("Window Info",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_help=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\Help.ico",-1)
    GUICtrlCreateLabel("Help",$a_left+$button+5,$a_top+5)
    $a_top=$a_top+$a_ab
    $a_exe=GUICtrlCreateButton("",$a_left,$a_top,$button,$button,$BS_ICON)
    GUICtrlSetImage(-1,$dir & "port_apps\Shiva\ico\autoitScript2Exe.ico",-1)
    GUICtrlCreateLabel("Script2Exe",$a_left+$button+5,$a_top+5)
    while 1
    $a_msg = GUIGetMsg()
    select
    case $a_msg=$a_run
    run($dir & "port_apps\autoit-v3\autoit3.exe " & $a_file)
    case $a_msg=$a_info
    run($dir & "port_apps\autoit-v3\au3info.exe")
    case $a_msg=$a_help
    run($dir & "port_apps\autoit-v3\autoit3help.exe")
    case $a_msg=$a_exe
    run($dir & "port_apps\autoit-v3\Aut2Exe\Aut2Exe.exe")
    endselect
    if $a_msg>0 or $a_msg=$GUI_EVENT_CLOSE then
    GUIDelete($a_feld)
    exitloop
    endif
    Sleep(10)
    Wend
    endfunc

    [/autoit]