Jump to content

Mini OS/Shell


Alek
 Share

Recommended Posts

so far its really bugy and you can only change the desktop image :rolleyes:

it has some bugs atm that im working on, like if you click on the window's tittel thingy thats on the bottom bar then the window will maximize over and over again and its very unstable

maybe i will make some programs for it, like wordpad and a internet browser :rambo:

on good side, i has some special effects like the windows fade in and out when you open and close them :x

Update

main Script

#include <miniOSfunctions.au3>

Opt("GUIOnEventMode", 1)

DirCreate(@ProgramFilesDir & "\Mini OS\Desktop")
DirCreate(@ProgramFilesDir & "\Mini OS\User")

Global $minwindow[999]
Global $ShowRightmenu[999]
Global $oldctrl[999]
Global $guiid[999]
Global $Menu_gui[999]
Global $Gui[999]
Global $GUI_CLOSE[999]
Global $GUI_MINIMIZE[999]
Global $Menu_gui_Button[999]
Global $oldbutton[999]
$Width = @DesktopWidth/1.1
$Hight = @DesktopHeight/1.1

$Showmenu = 0
$Showbuttonmenu = 0
$Guinumber = 1
$alrdyused = 0
$oldinput = ""
$x = 1
$test =""

$SYSTEM_POWER_STATUS = DLLStructCreate("byte;byte;byte;byte;int;int")
$test = DLLCall("kernel32.dll","int","GetSystemPowerStatus", "ptr",DllStructGetPtr($SYSTEM_POWER_STATUS))

$Main_Desktop = GUICreate("Alek's Mini OS",$Width,$Hight,-1,-1,$WS_POPUP,$WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
GUISetBkColor(0x888888)

$Desktopimage = GUICtrlCreatePic("",0,0,$Width,$Hight)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
ControlDisable($Main_Desktop,"",$Desktopimage)

$daasda = GUICtrlCreateLabel("",0,0,$Width,$Hight)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$Main_menu = GUICtrlCreateContextMenu($daasda)
$New_Folder = GUICtrlCreateMenuItem("New Folder",$Main_menu)
$Prpertiest = GUICtrlCreateMenuItem("Properties",$Main_menu)

GUICtrlCreateLabel("",0,$Hight-20,$Width,19)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlCreateLabel("",0,$Hight-19,$Width,18)
GUICtrlSetBkColor(-1,0xAAAAAA)

GUICtrlCreateLabel("",$Width-62,$Hight-22,62,22)
GUICtrlSetBkColor(-1,0x000000)
$Clock = GUICtrlCreateLabel(_NowTime(3),$Width-61,$Hight-21,60,20,$SS_CENTER)
GUICtrlSetBkColor(-1,0xCCCCCC)
GUIctrlSetFont(-1,10,800)

GUICtrlCreateLabel("",0,$Hight-22,62,22)
GUICtrlSetBkColor(-1,0x000000)
$Menu = GUICtrlCreateLabel("Menu",1,$Hight-21,60,20,$SS_CENTER)
GUICtrlSetBkColor(-1,0xCCCCCC)
GUIctrlSetFont(-1,10,800)

For $x = 1 to 9
    $minwindow[$x] = GUICtrlCreateLabel("",($x*100-35),$Hight-18,95,17,$SS_SUNKEN)
    GUICtrlSetBkColor(-1,0xCCCCCC)
    GUIctrlSetFont(-1,9,1600)
    GUICtrlSetState(-1,$GUI_HIDE)
Next

if  DLLStructGetData($SYSTEM_POWER_STATUS,3) <> 255 then 
    $battery = GUICtrlCreateProgress($Width-165,$Hight-19,100,18)
    GUICtrlSetData($battery,DLLStructGetData($SYSTEM_POWER_STATUS,3))
EndIf

GUISetState(@SW_SHOW,$Main_Desktop)

$Menu_gui_button[0] = GUICreate("",130,150,0,$Hight-200,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW+$WS_EX_MDICHILD,$Main_Desktop)
$Menu_gui_Button[1] = GUICtrlCreateLabel("Turn Off",0,150-22,130,22,$SS_SUNKEN)
GUIctrlSetFont(-1,10,800)

$Menu_gui_Button[2] = GUICtrlCreateLabel("Consol",0,150-44,130,22,$SS_SUNKEN)
GUIctrlSetFont(-1,10,800)

GUISetState(@SW_HIDE,$Menu_gui_button)
AdlibEnable("alwaysrun",100)

while 1
    $minfo = GUIGetCursorInfo()
    if IsArray($minfo) Then
        for $x = 1 to $Guinumber
            if _IsPressed("01") and $minfo[4] = $oldctrl[$x] Then
                Maximize($x)
            Elseif $minfo[4] = $minwindow[$x] and $oldctrl[$x] <> $minfo[4] then 
                GUICtrlSetBkColor($minwindow[$x],0x7777FF)
                $oldctrl[$x] = $minfo[4]
            Elseif $oldctrl[$x] <> $minfo[4] and $oldctrl[$x] <> 0 Then
                GUICtrlSetBkColor($minwindow[$x],0xCCCCCC)
                $oldctrl[$x]= 0
            EndIf
        Next
    EndIf
    $test = DLLCall("kernel32.dll","int","GetSystemPowerStatus", "ptr",DllStructGetPtr($SYSTEM_POWER_STATUS))
    GUICtrlSetData($battery,DLLStructGetData($SYSTEM_POWER_STATUS,3))
    if IsArray($minfo) Then
        for $x = 1 to 2
            if _IsPressed("01") and $minfo[4] = $oldbutton[$x] Then
                Do
                    sleep(10)
                Until _IsPressed("01") = 0
                GUICtrlSetBkColor($minfo[4],0xCCCCCC)
                $oldbutton[$x] = 0
                Showmenu(0)
                if $minfo[4] = $Menu_gui_Button[1] Then
                    Exit
                EndIf
                if $minfo[4] = $Menu_gui_Button[2] Then
                    ShellExecute("Consol.au3","",@ScriptDir,"run")
                EndIf
            Elseif $minfo[4] = $Menu_gui_Button[$x] and $oldbutton[$x] <> $minfo[4] then 
                GUICtrlSetBkColor($Menu_gui_Button[$x],0x7777FF)
                $oldbutton[$x] = $minfo[4]
            Elseif $oldbutton[$x] <> $minfo[4] and $oldbutton[$x] <> 0 Then
                GUICtrlSetBkColor($Menu_gui_Button[$x],0xCCCCCC)
                $oldbutton[$x] = 0
            EndIf
        Next
    EndIf
    Menucontrol()
WEndoÝ÷ Ø[§rبɢ#~éܶ*'±«·jëh×6#include <GUIConstants.au3>
#include <Misc.au3>
#include <Date.au3>
#include <Guilist.au3>

Func Showmenu($Type)
    if $Type = 1 then
        WinSetTrans($Menu_gui_button[0],"",0)
        GUISetState(@SW_SHOW,$Menu_gui_button[0])
        for $x = 25 to 250 step 25
            WinSetTrans($Menu_gui_button[0],"",$x)
            sleep(5)
        Next
        WinSetTrans($Menu_gui_button[0],"",254)
    elseif $Type = 0 Then
        for $x = 25 to 250 step 25
            WinSetTrans($Menu_gui_button[0],"",250-$x)
            sleep(10)
        Next
        WinSetTrans($Menu_gui_button[0],"",0)
        GUISetState(@SW_HIDE,$Menu_gui_button[0])
    EndIf
EndFunc

Func Menucontrol()
    $Minfo = GUIGetCursorInfo($Main_Desktop)
    if IsArray($Minfo) then
        If _IsPressed("01") and $Showbuttonmenu = 1 Then
            Showmenu(1)
            Do
                sleep(10)
            Until _IsPressed("01") = 0
            $Showbuttonmenu = 2
        Elseif $Showbuttonmenu = 2 and _IsPressed("01") Then
            $Showbuttonmenu = 0
            Showmenu(0)
            Do
                sleep(10)
            Until _IsPressed("01") = 0
        Elseif $Minfo[4] = $Menu and $Showbuttonmenu = 0 Then
            GUICtrlSetBkColor($Menu,0x7777FF)
            $Showbuttonmenu = 1
        Elseif $Minfo[4] <> $Menu and $Showbuttonmenu <> 0 then
            GUICtrlSetBkColor($Menu,0xCCCCCC)
            $Showbuttonmenu = 0
        EndIf
    EndIf
EndFunc

Func Propertiesgui()
    $Properties = creategui("Properties", 296, 257, 100, 100)

    $Group1 = GUICtrlCreateGroup("Bg color", 8, 24, 97, 97)
    Global $Input1 = GUICtrlCreateInput("", 16, 40, 75, 21)
    Global $Label1 = GUICtrlCreateLabel("", 16, 64, 75, 49, $SS_SUNKEN)

    $Group2 = GUICtrlCreateGroup("Bg Image", 112, 24, 177, 225)
    Global $Pic1 = GUICtrlCreatePic("", 120, 40, 161, 100, BitOR($SS_NOTIFY,$WS_GROUP))
    Global $List1 = GUICtrlCreateList("", 120, 144, 161, 97)
    GUICtrlSetOnEvent(-1,"Addbglist")

    $Add_image = GUICtrlCreateButton("Add Image", 8, 128, 97, 25, 0)
    GUICtrlSetOnEvent(-1,"addbg")

    $Apply = GUICtrlCreateButton("Apply", 8, 160, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"Applybg")

    $OK = GUICtrlCreateButton("Ok", 8, 192, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"ok")

    $Cancel = GUICtrlCreateButton("Cancel", 8, 224, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"deletegui")

    GUISetState(@SW_SHOW)

    $images = IniReadSection(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images")
    for $x = 1 to $images[0][0]
        if $images[$x][0] <> "Currentimage" then
            GUICtrlSetData($List1,$images[$x][0])
        EndIf
    Next
EndFunc

Func alwaysrun()
    if _NowTime(3) <> GUICtrlRead($Clock) then GUICtrlSetData($Clock,_NowTime(3))
EndFunc

Func Applybg()
    $Image = _GUICtrlListGetSelItemsText($List1)
    if $image[1] = "Background Color" then
        GUICtrlSetImage($Desktopimage,"")
        GUISetBkColor("0x" & GUICtrlRead($Input1),$Main_Desktop)
    elseif IsArray($Image) Then 
        GUICtrlSetImage($Desktopimage,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
    EndIf
    $Main_menu = GUICtrlCreateContextMenu($Desktopimage)
    $New_Folder = GUICtrlCreateMenuItem("New Folder",$Main_menu)
    $Prpertiest = GUICtrlCreateMenuItem("Properties",$Main_menu)
    GUICtrlSetOnEvent(-1,"Propertiesgui")
    IniWrite(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images","Currentimage",IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
EndFunc

Func Addbg()
    $Image = FileOpenDialog("Bg Image",@ProgramFilesDir & "\Mini OS\Desktop","(*.jpg;*.bmp;*.Gif)")
    if not @error Then
        $t = StringSplit($Image,"\")
        IniWrite(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$t[$t[0]],$Image)
        GUICtrlSetData($List1,$t[$t[0]])
        GUICtrlSetImage($Pic1,$Image)
        GuiCtrlSetState($Desktopimage,$GUI_DISABLE)
    EndIf
EndFunc

Func ok()
    $Image = _GUICtrlListGetSelItemsText($List1)
    if IsArray($image) Then GUICtrlSetImage($Desktopimage,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
    deletegui()
EndFunc

Func Addbglist()
    $Image = _GUICtrlListGetSelItemsText($List1)
    if IsArray($image) then
        if $image[1] = "Background Color" then 
            GUICtrlSetImage($Pic1,"")
            GUIctrlSetBkColor($Pic1,"0x" & GUICtrlRead($Input1))
        else
            GUICtrlSetImage($Pic1,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
        EndIf
    EndIf
EndFunc

Func deletegui()
    GUIDelete(@GUI_WinHandle)
    for $x = 1 to $Guinumber
        if $guiid[$x] = @GUI_WinHandle then
            GUICtrlSetState($minwindow[$x],$GUI_HIDE)
            $b = 1
            For $y = 1 to $Guinumber
                if $guiid[$y] <> @GUI_WinHandle then
                    GUICtrlSetPos($minwindow[$y],($b*100-35),$Hight-18)
                    $b = $b+1
                EndIf
            Next
        EndIf
    Next
    $Guinumber = $Guinumber-1
EndFunc

Func CloseminiOS()
    Exit
EndFunc

Func Minimizegui()
    GUISetState(@SW_HIDE,@GUI_WinHandle)
EndFunc

Func Maximize($ID)
    WinActivate($guiid[$ID])
    GUISetState(@SW_SHOW,$guiid[$ID])
EndFunc

Func Creategui($title,$sizex,$sizey,$posx,$posy)
    $Gui[$x] = GUICreate($title,$sizex,$sizey,$posx,$posy,$WS_POPUP+$WS_BORDER,$WS_EX_TOOLWINDOW)
    DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Gui[$x]), "hwnd", WinGetHandle($Main_Desktop))
    GUISetBkColor(0xFFFFFF)
    GUISetFont(10,600,0,"Comic Sans MS")
    GUICtrlCreateLabel($title,0,0,$sizex-40,20,$WS_BORDER,$GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1,0xCCCCCC)
    $GUI_MINIMIZE[$x] = GUICtrlCreateButton("_",$sizex-40,0,20,20)
    GUICtrlSetOnEvent(-1,"Minimizegui")
    $GUI_CLOSE[$x] = GUICtrlCreateButton("X",$sizex-20,0,20,20)
    GUICtrlSetOnEvent(-1,"Deletegui")
    
    GUICtrlSetData($minwindow[$Guinumber],"  " & $title)
    GUICtrlSetState($minwindow[$Guinumber],$GUI_SHOW)
    $guiid[$Guinumber] = WinGetHandle($Gui[$x])
    $Guinumber = $Guinumber+1
    $x = $x +1
EndFuncoÝ÷ Ø*'²oz»"¢}4×hºWeG­¢ØZH,X¯{lúè~âÊ^­«b¢v®¶­sb6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC°¢6æ6ÇVFRfÇC´Ö62æS2fwC°¢6æ6ÇVFRfÇCµ7G&æræS2fwC°¢4æ6ÇVFRfÇC´wVVFBæS2fwC° ¢b33cµfW'6öâÒã¢b33c´WFW"ÒgV÷C´ÆV²gV÷C° ¢b33c´f÷&ÓÒuT7&VFRgV÷C´6öç6öÂgV÷C²ÂS3"Â#SrÂ2ÂRÂÓÂ&Dõ"b33cµu5ôUõDôôÅtäDõrÂb33cµu5ôUõtäDõtTDtR¢b33c¶6öç6öÂÒuT7G&Ä7&VFTVFBgV÷C²gV÷C²ÂÂÂS3Â#3Â&"b33c´U5ôUDô45$ôÄÂÂb33c´U5õtåE$UEU$âÂb33cµu5õe45$ôÄÂÂb33c´U5õ$TDôäŤuT7G&Å6WDföçBÓÂÂCÂÂgV÷CµFW&ÖæÂgV÷C²¤uT7G&Å6WD6öÆ÷"ÓÃfc¤uT7G&Å6WD&´6öÆ÷"Óâb33c¶6öÖÖæBÒuT7G&Ä7&VFTçWBgV÷C²gV÷C²ÂÂ#3ÂCÂ#R¢b33c´WV7WFRÒuT7G&Ä7&VFT'WGFöâgV÷C´WV7WFRgV÷C²ÂCÂ#3Â#Â#R¤uT6WE7FFR5uõ4õr¤FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6WE&VçBgV÷C²ÂgV÷C¶væBgV÷C²ÂvävWDæFÆRb33c´f÷&ÓÂgV÷C¶væBgV÷C²ÂvävWDæFÆRgV÷C´ÆV²b33·2Öæõ2gV÷C² ¦Fð b33c¶ä×6rÒuTvWD×6r bvä7FfRb33c´f÷&ÓæBô5&W76VBgV÷C³BgV÷C²FVâ Fð 6ÆVW VçFÂô5&W76VBgV÷C³BgV÷C²Ò b33c¶ä×6rÒb33c´WV7WFP VæD` 7vF6b33c¶ä×6p 66Rb33c´uTôUdTåEô4Äõ4P W@ 66Rb33c´WV7WFP  buT7G&Å&VBb33c¶6öÖÖæBfÇC²fwC²gV÷C²gV÷C²FVà b33c·7G&ærÒ7G&æu7ÆBuT7G&Å&VBb33c¶6öÖÖæBÂgV÷C³ÒgV÷C² 7vF6b33c·7G&æu³Ð 66RgV÷C¶VÇgV÷C° ô6öç6öÇw&FRÂgV÷CµF22v÷&²â&öw&W2gV÷C² 66RgV÷C´&÷WBgV÷C° ô6öç6öÇw&FRÂgV÷C²ÒgV÷C² ô6öç6öÇw&FRÂgV÷CµfW'6öã¢gV÷C²fײb33cµfW'6öâ ô6öç6öÇw&FRÂgV÷C´ÖFR'¢gV÷C²fײb33c´WFW" ô6öç6öÅw&FRÂgV÷CµFæ·2Fó¢7&VFW"öbu&ògV÷C² ô6öç6öÇw&FRÂgV÷C²ÒgV÷C² 66RgV÷C´æfògV÷C° ô6öç6öÇw&FRÂgV÷C²ÒgV÷C² ô6öç6öÇw&FRÂgV÷C´¢gV÷C²fײFG&W73 bFG&W73"fÇC²fwC²gV÷C³ãããgV÷C²FVâô6öç6öÇw&FRÂgV÷C´Fç3¢gV÷C²fײFG&W73" bFG&W732fÇC²fwC²gV÷C³ãããgV÷C²FVâô6öç6öÇw&FRÂgV÷C´ôFç3¢gV÷C²fײFG&W732 bFG&W73BfÇC²fwC²gV÷C³ãããgV÷C²FVâô6öç6öÇw&FRÂgV÷C´ôFç3¢gV÷C²fײFG&W73B bFG&W73ÒgV÷C³ãããgV÷C²÷"FG&W73ÒgV÷C³#rãããgV÷C²FVâ ô6öç6öÅw&FRÂgV÷Cµ÷R&R&ö&W&Çæ÷B6öææV7FVBgV÷C² ô6öç6öÅw&FRÂgV÷C·FòçæWGv÷&²gV÷C² VæD` ô6öç6öÇw&FRÂgV÷C²ÒgV÷C² 66RgV÷C´6ö×WFW$æfògV÷C° b33c¶ÖV×7FG2ÒÖVÔvWE7FG2 ô6öç6öÅw&FRÂgV÷C²ÒgV÷C² ô6öç6öÅw&FRÂgV÷C´6ö×WFW"æÖS¢gV÷C²fײ6ö×WFW$æÖR ô6öç6öÅw&FRÂgV÷CµW6W&æÖS¢gV÷C²fײW6W$æÖR ô6öç6öÅw&FRÂgV÷C´÷W&Fær77FVÓ¢gV÷C²fײõ5ER ô6öç6öÅw&FRÂgV÷Cµ6W'f6R6³¢gV÷C²fײõ56W'f6U6² ô6öç6öÅw&FRÂgV÷C´'VÆC¢gV÷C²fײõ4'VÆB ô6öç6öÅw&FRÂgV÷C´ÆærC¢gV÷C²fײõ4Æær ô6öç6öÅw&FRÂgV÷CµF÷FÂÖVÖ÷'¢gV÷C²fײ&÷VæBb33c¶ÖV×7FG5³Òó#BÃfײgV÷C´¶"gV÷C² ô6öç6öÅw&FRÂgV÷C´ÖVÖ÷'âW6S¢gV÷C²fײ&÷VæBb33c¶ÖV×7FG5³ÒÒb33c¶ÖV×7FG5³%Òó#BÃfײgV÷C´¶"gV÷C² ô6öç6öÅw&FRÂgV÷C²ÒgV÷C² 66RgV÷CµFÖRgV÷C° ô6öç6öÅw&FRÄÔDfײgV÷C²ògV÷C²fײÔôâfײgV÷C²ÒgV÷C²fײ7G&æuG&ÔÆVgBT"Ã"fײgV÷C²gV÷C²fײõU"fײgV÷C³¢gV÷C²fײÔâfײgV÷C³¢gV÷C²fײ4T2 66RgV÷C´6ÆVâgV÷C° uT7G&Å6WDFFb33c¶6öç6öÂÂgV÷C²gV÷C² ô6öç6öÅw&FRÂgV÷C´æ6RæB6ÆVâgV÷C² 66RgV÷Cµ'VâgV÷C° bb33c·7G&æu³ÒfwC²FVà ô6öç6öÅw&FRÂgV÷Cµ7F'Fæs¢gV÷C²fײb33c·7G&æu³%Ò 'Vâb33c·7G&æu³%Ò VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢'VãÔfÆR÷&öw&ÒgV÷C² VæD` 66RgV÷CµGRgV÷C° ô6öç6öÅw&FRÂb33c·7G&æu³%Ò 66RgV÷C´Ö÷W6VÖ÷fRgV÷C° bb33c·7G&æu³ÒÒ"FVà b33c¶Ö÷fRÒõ7G&æt&WGvVVâb33c·7G&æu³%ÒÂgV÷Cµ²gV÷C²ÂgV÷CµÒgV÷C² b4'&b33c¶Ö÷fRFVà b33c¶6ö÷&G2Ò7G&æu7ÆBb33c¶Ö÷fU³ÒÂgV÷C³²gV÷C² bb33c¶6ö÷&G5³ÒÒ2FVâ Ö÷W6TÖ÷fRb33c¶6ö÷&G5³ÒÂb33c¶6ö÷&G5³%ÒÂb33c¶6ö÷&G5³5Ò VÇ6Vbb33c¶6ö÷&G5³ÒÒ"FVà Ö÷W6TÖ÷fRb33c¶6ö÷&G5³ÒÂb33c¶6ö÷&G5³%Ò VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢Ö÷W6VÖ÷fSÕ···7VVEÒgV÷C² VæD` VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢Ö÷W6VÖ÷fSÕ···7VVEÒgV÷C² VæD` VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢Ö÷W6VÖ÷fSÕ···7VVBÒgV÷C² VæD` 66RgV÷C´Æö6²gV÷C° bb33c·7G&æu³ÒÒ"FVà uT7G&Å6WDFFb33c¶6öç6öÂÂgV÷C²gV÷C² ô6öç6öÅw&FRÂgV÷Cµ75v÷&C¢gV÷C² b33c·77v÷&BÒb33c·7G&æu³%Ð uT7G&Å6WDFFb33c¶6öÖÖæBÂgV÷C²gV÷C² vÆR bô5&W76VBgV÷C³BgV÷C²FVà Fð 6ÆVW VçFÂô5&W76VBgV÷C³BgV÷C²Ò b33c·G'ÒuT7G&Å&VBb33c¶6öÖÖæB uT7G&Å6WDFFb33c¶6öÖÖæBÂgV÷C²gV÷C² uT7G&Å6WDFFb33c¶6öç6öÂÄuT7G&Å&VBb33c¶6öç6öÂfײb33c·G'fײ5$Äb bb33c·G'ÓÒb33c·77v÷&BFVà ô6öç6öÅw&FRÂgV÷CµVæÆö6¶ærgV÷C² WDÆö÷ VÇ6P ô6öç6öÅw&FRÂgV÷Cµw&öær77v÷&Bb333²gV÷C² ô6öç6öÅw&FRÂgV÷CµG'vã¢gV÷C² VæD` VæD` tVæ@ VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢Æö6³×77v÷&BgV÷C² VæD` 66RgV÷C´6öÖÖæG2gV÷C° ô6öç6öÅw&FRÂgV÷C²ÒgV÷C² ô6öç6öÅw&FRÂgV÷C´6öÖÖæG3¢gV÷C² ô6öç6öÅw&FRÂgV÷C´&÷WBfÇCµ6÷w2æfò&÷WBFR6öç6öÂfwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´æfòfÇCµ6÷w2ÆÂöb÷W"b33·2fwC²gV÷C² ô6öç6öÅw&FRÂgV÷CµFÖRfÇCµ6÷w2FÖRfwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´6ÆVâfÇCµ&VÖ÷fW2ÆÂFRFWBâFR6öç6öÂfwC²gV÷C² ô6öç6öÅw&FRÂgV÷CµGRfÇC´FG2FWBFòFR6öç6öÂfwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´Ö÷W6VÖ÷fRfÇC´Ö÷fW2FR7W'6÷"fwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´Æö6²fÇC´Æö6·2FR6öç6öÂfwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´6öÖÖæG2fÇCµ6÷w2F2Æ7BfwC²gV÷C² ô6öç6öÅw&FRÂgV÷C´çWBfÇC´7&VFW2çWF&÷fwC²gV÷C² ô6öç6öÅw&FRÂgV÷C²ÒgV÷C² 66RgV÷C·v'&æærgV÷C° bb33c·7G&æu³ÒÒ"FVà b33c¶×6rÒõ7G&æt&WGvVVâb33c·7G&æu³%ÒÂgV÷Cµ²gV÷C²ÂgV÷CµÒgV÷C² b33c¶×6rÒ7G&æu7ÆBb33c¶×6u³ÒÂgV÷C³²gV÷C² bb33c¶×6u³ÒÒ"FVà b33c¶×6rÒ×6t&÷CÂb33c¶×6u³%ÒÂb33c¶×6u³Ò VÇ6Vbb33c¶×6u³ÒÒFVà b33c¶×6rÒ×6t&÷CÂgV÷Cµv'&æærgV÷C²Âb33c¶×6u³Ò VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢v'&æær¶×6rµFFVÅÒgV÷C² VæD` VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢v'&æær¶×6rµFFVÅÒgV÷C² VæD` ô6öç6öÅw&FRÂgV÷Cµv'&æær&÷&WGW&æVC¢gV÷C²fײb33c¶×6r 66RgV÷C´çWBgV÷C° bb33c·7G&æu³ÒÒ"FVà b33c¶×6sÕõ7G&æt&WGvVVâb33c·7G&æu³%ÒÂgV÷Cµ²gV÷C²ÂgV÷CµÒgV÷C² b33c¶×6rÒ7G&æu7ÆBb33c¶×6u³ÒÂgV÷C³²gV÷C² bb33c¶×6u³ÒÒBFVà b33c¶×6rÒçWD&÷b33c¶×6u³%ÒÂb33c¶×6u³ÒÂb33c¶×6u³5ÒÂb33c¶×6u³EÒ VÇ6Tbb33c¶×6u³ÒÒ2FVà b33c¶×6rÒçWD&÷b33c¶×6u³%ÒÂb33c¶×6u³ÒÂb33c¶×6u³5Ò VÇ6Tbb33c¶×6u³ÒÒ"FVà b33c¶×6rÒçWD&÷b33c¶×6u³%ÒÂb33c¶×6u³Ò VÇ6Tbb33c¶×6u³ÒÒFVà b33c¶×6rÒçWD&÷gV÷CµVW7FöâgV÷C²Âb33c¶×6u³Ò VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢çWCÕµFWCµFFÆS´çWGFWC·77v÷&F6%ÒgV÷C² VæD` ô6öç6öÅw&FRÂgV÷C´çWF&÷&WGW&VæC¢gV÷C²fײb33c¶×6r VÇ6P ô6öç6öÅw&FRÂgV÷Cµ7çFWW'&÷#¢çWCÕµFWCµFFÆS´çWGFWC·77v÷&F6%ÒgV÷C² VæD` 66RVÇ6P ô6öç6öÇw&FRÂgV÷CµVæ¶æ÷r6öÖÖæC¢gV÷C²fײb33c·7G&æu³Ò VæE7vF6 uT7G&Å6WDFFb33c¶6öÖÖæBÂgV÷C²gV÷C² ôuT7G&ÄVFE67&öÆÂb33c¶6öç6öÂÂb33cµ445$ôÄÄ4$UB VæD` VæE7vF6§VçFÂb33c¶ä×6rÒb33c´uTôUdTåEô4Äõ4P ¤gVæ2ô6öç6öÇw&FRb33c·GRÂb33c·FWB bb33c·FWBÒgV÷C²ÒgV÷C²FVâb33c·FWBÒgV÷C²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒgV÷C° bb33c·GRÒFVâb33c·FWBÒgV÷C²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒgV÷C²fײ5$Äbfײb33c·FWBfײ5$ÄbfײgV÷C²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒgV÷C° uT7G&Å6WDFFb33c¶6öç6öÂÄuT7G&Å&VBb33c¶6öç6öÂfײ5$Äbfײb33c·FWB¤VæDgVæ0

Had to remove the desktop image function to make the setparent dllcall work

the only errors i get now is that some $var are posibble used befor declared

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Link to comment
Share on other sites

what i got for running

C:\Documents and Settings\dexxa\Desktop\minios.au3(94,34) : WARNING: $Input1: possibly used before declaration.
        if GUIGetMsg() = $Input1 Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(95,38) : WARNING: $Label1: possibly used before declaration.
            GUICtrlSetBkColor($Label1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(95,66) : ERROR: syntax error
            GUICtrlSetBkColor($Label1,"0x" & Guictrlread($Input1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(99,1) : ERROR: missing EndIf.
WEnd
^
C:\Documents and Settings\dexxa\Desktop\minios.au3(94,38) : REF: missing EndIf.
        if GUIGetMsg() = $Input1 Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(99,1) : ERROR: missing EndIf.
WEnd
^
C:\Documents and Settings\dexxa\Desktop\minios.au3(93,36) : REF: missing EndIf.
    if WinExists("Properties") Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(190,48) : WARNING: $List1: possibly used before declaration.
    $Image = _GUICtrlListGetSelItemsText($List1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(211,30) : WARNING: $Pic1: possibly used before declaration.
        GUICtrlSetImage($Pic1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3(154,61) : WARNING: $List1: declared global in function only. Prefer top of file.
    Global $List1 = GUICtrlCreateList("", 120, 144, 161, 97)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\dexxa\Desktop\minios.au3 - 3 error(s), 5 warning(s)
Link to comment
Share on other sites

Nooooooooooooooooooo

I can't believe! :rambo:

This is a joke... An OS wrote in a script language.

You are funny! Tell me another! :x

And... Where is the code of "boot loader"?

Added: your boot loader runs under windows? :rolleyes:

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

It's not an OS, it's a shell.

Yes. This is the point.

But why (why??????) calling it "OS"?

:rolleyes:

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Yes. This is the point.

But why (why??????) calling it "OS"?

:rolleyes:

its more a virtaul OS for windows :rambo:, i called it an OS because i dident know what else to call it

[font="Impact"]Never fear, I is here.[/font]

Link to comment
Share on other sites

Like AutoItKing said: shell

:rolleyes:

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

A virtual OS is way more complicated, it's running an OS, within an OS, you're just making an interface to the current OS, in this case Windows. It's a shell. I would like to see some more functionality in it too.

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

This is really interesting but it needs some more work.... Everything is so grey, maybe a little more colors?? And what about all the errors??

Ohh and this happens when i rightclick and press on "Properties"

C:\Documents and Settings\Ärkeskäggot\Mina dokument\Autoit\Mina Program\test32.au3 (178) : ==> Subscript used with non-Array variable.: 
for $x = 1 to $images[0][0] 
for $x = 1 to $images^ ERROR
Link to comment
Share on other sites

I haved to turn off some funcs to get rid of the errors:

#include <GUIConstants.au3>
#include <Misc.au3>
#include <Date.au3>
#include <Guilist.au3>
Opt("TrayAutoPause", 0)
Opt("GUIOnEventMode", 1)
DirCreate(@ProgramFilesDir & "\Mini OS\Desktop")
DirCreate(@ProgramFilesDir & "\Mini OS\User")

Global $minwindow[999]
Global $ShowRightmenu[999]
Global $oldctrl[999]
Global $guiid[999]
Global $Menu_gui[999]
Global $Gui[999]
Global $GUI_CLOSE[999]
Global $GUI_MINIMIZE[999]
Global $Input1
Global $label1
Global $Pic1
Global $List1
$Width = @DesktopWidth/1.01
$Hight = @DesktopHeight/1.1
$Showmenu = 0
$Showbuttonmenu = 0
$Guinumber = 1
$alrdyused = 0
$x = 1
$SYSTEM_POWER_STATUS = DLLStructCreate("byte;byte;byte;byte;int;int")
$test = DLLCall("kernel32.dll","int","GetSystemPowerStatus", "ptr",DllStructGetPtr($SYSTEM_POWER_STATUS))

$Main_Desktop = GUICreate("Alek's Mini OS",$Width,$Hight,-1,-1,-1,$WS_EX_TOOLWINDOW)
GUISetBkColor(0x888888)

$Desktopimage = GUICtrlCreatePic("",0,0,$Width,$Hight)
GUICtrlSetImage($Desktopimage,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images","Currentimage","Error"))

$Main_menu = GUICtrlCreateContextMenu($Desktopimage)
$New_Folder = GUICtrlCreateMenuItem("New Folder",$Main_menu)
$Prpertiest = GUICtrlCreateMenuItem("Properties",$Main_menu)
GUICtrlSetOnEvent(-1,"Propertiesgui")

GUICtrlCreateLabel("",0,$Hight-20,$Width,19)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlCreateLabel("",0,$Hight-19,$Width,18)
GUICtrlSetBkColor(-1,0xAAAAAA)

GUICtrlCreateLabel("",$Width-62,$Hight-22,62,22)
GUICtrlSetBkColor(-1,0x000000)
$Clock = GUICtrlCreateLabel(_NowTime(3),$Width-61,$Hight-21,60,20,$SS_CENTER)
GUICtrlSetBkColor(-1,0xCCCCCC)
GUIctrlSetFont(-1,10,800)

GUICtrlCreateLabel("",0,$Hight-22,62,22)
GUICtrlSetBkColor(-1,0x000000)
$Menu = GUICtrlCreateLabel("Menu",1,$Hight-21,60,20,$SS_CENTER)
GUICtrlSetBkColor(-1,0xCCCCCC)
GUIctrlSetFont(-1,10,800)

For $x = 1 to 9
    $minwindow[$x] = GUICtrlCreateLabel("",($x*100-35),$Hight-18,95,17,$SS_SUNKEN)
    GUICtrlSetBkColor(-1,0xCCCCCC)
    GUIctrlSetFont(-1,9,1600)
    GUICtrlSetState(-1,$GUI_HIDE)
Next

if  DLLStructGetData($SYSTEM_POWER_STATUS,3) <> 255 then
    $battery = GUICtrlCreateProgress($Width-165,$Hight-19,100,18)
    GUICtrlSetData($battery,DLLStructGetData($SYSTEM_POWER_STATUS,3))
EndIf
GUISetState(@SW_SHOW,$Main_Desktop)
$Menu_gui_button = GUICreate("",130,150,0,$Hight-182,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW+$WS_EX_MDICHILD,$Main_Desktop)
GUISetState(@SW_HIDE,$Menu_gui_button)
AdlibEnable("alwaysrun",100)

while 1
    $minfo = GUIGetCursorInfo($Main_Desktop)
    for $x = 1 to $Guinumber
        if _IsPressed("01") and $minfo[4] = $oldctrl[$x] Then
            Maximize($x)
        Elseif $minfo[4] = $minwindow[$x] and $oldctrl[$x] <> $minfo[4] then
            GUICtrlSetBkColor($minwindow[$x],0x7777FF)
            $oldctrl[$x] = $minfo[4]
        Elseif $oldctrl[$x] <> $minfo[4] and $oldctrl[$x] <> 0 Then
            GUICtrlSetBkColor($minwindow[$x],0xCCCCCC)
            $oldctrl[$x]= 0
        EndIf
    Next
    $test = DLLCall("kernel32.dll","int","GetSystemPowerStatus", "ptr",DllStructGetPtr($SYSTEM_POWER_STATUS))
    GUICtrlSetData($battery,DLLStructGetData($SYSTEM_POWER_STATUS,3))
    if WinExists("Properties") Then
        ;if GUIGetMsg() = $Input1 Then
            ;GUICtrlSetBkColor($Label1,"0x" & Guictrlread($Input1)
       ; EndIf
    EndIf
    Menucontrol()
WEnd

Func Showmenu($Type)
    if $Type = 1 then
        WinSetTrans($Menu_gui_button,"",0)
        GUISetState(@SW_SHOW,$Menu_gui_button)
        for $x = 25 to 250 step 25
            WinSetTrans($Menu_gui_button,"",$x)
            sleep(5)
        Next
        WinSetTrans($Menu_gui_button,"",254)
    elseif $Type = 0 Then
        for $x = 25 to 250 step 25
            WinSetTrans($Menu_gui_button,"",250-$x)
            sleep(10)
        Next
        WinSetTrans($Menu_gui_button,"",0)
        GUISetState(@SW_HIDE,$Menu_gui_button)
    EndIf
EndFunc

Func Menucontrol()
    $Minfo = GUIGetCursorInfo($Main_Desktop)
    if IsArray($Minfo) then
        If _IsPressed("01") and $Showbuttonmenu = 1 Then
            Showmenu(1)
            Do
                sleep(10)
            Until _IsPressed("01") = 0
            $Showbuttonmenu = 2
        Elseif $Minfo[4]= $Menu and $Showbuttonmenu = 2 and _IsPressed("01") Then
            $Showbuttonmenu = 0
            Showmenu(0)
            Do
                sleep(10)
            Until _IsPressed("01") = 0
        Elseif $Minfo[4] = $Menu and $Showbuttonmenu = 0 Then
            GUICtrlSetBkColor($Menu,0x7777FF)
            $Showbuttonmenu = 1
        Elseif $Minfo[4] <> $Menu and $Showbuttonmenu <> 0 then
            GUICtrlSetBkColor($Menu,0xCCCCCC)
            $Showbuttonmenu = 0
        EndIf
    EndIf
EndFunc

Func Propertiesgui()
    $Properties = creategui("Properties", 296, 257, 100, 100)

    $Group1 = GUICtrlCreateGroup("Bg color", 8, 24, 97, 97)
    Global $Input1 = GUICtrlCreateInput("", 16, 40, 75, 21)
    Global $Label1 = GUICtrlCreateLabel("", 16, 64, 75, 49, $SS_SUNKEN)

    $Group2 = GUICtrlCreateGroup("Bg Image", 112, 24, 177, 225)
    Global $Pic1 = GUICtrlCreatePic("", 120, 40, 161, 100, BitOR($SS_NOTIFY,$WS_GROUP))
    Global $List1 = GUICtrlCreateList("", 120, 144, 161, 97)
    GUICtrlSetOnEvent(-1,"Addbglist")

    $Add_image = GUICtrlCreateButton("Add Image", 8, 128, 97, 25, 0)
    GUICtrlSetOnEvent(-1,"addbg")

    $Apply = GUICtrlCreateButton("Apply", 8, 160, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"Applybg")

    $OK = GUICtrlCreateButton("Ok", 8, 192, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"ok")

    $Cancel = GUICtrlCreateButton("Cancel", 8, 224, 99, 25, 0)
    GUICtrlSetOnEvent(-1,"deletegui")

    GUISetState(@SW_SHOW)
    $lastgui = WinGetHandle("")
    GUISetState(@SW_HIDE)
    WinSetTrans($lastgui,"",0)
    GUISetState(@SW_SHOW)
    for $x = 1 to 25
        WinSetTrans(WinGetHandle(""),"",$x*10+5)
    ;Next
    ;$images = IniReadSection(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images")
    ;for $x = 1 to $images[0][0]
        ;if $images[$x][0] <> "Currentimage" then
         ;   GUICtrlSetData($List1,$images[$x][0])
        ;EndIf
    Next
EndFunc

Func alwaysrun()
    if _NowTime(3) <> GUICtrlRead($Clock) then GUICtrlSetData($Clock,_NowTime(3))
EndFunc

Func Applybg()
    $Image = _GUICtrlListGetSelItemsText($List1)
   ; if $image[1] = "Background Color" then
        GUICtrlSetImage($Desktopimage,"")
        GUISetBkColor("0x" & GUICtrlRead($Input1),$Main_Desktop)
    ;elseif IsArray($Image) Then
       ; GUICtrlSetImage($Desktopimage,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
    ;EndIf
    $Main_menu = GUICtrlCreateContextMenu($Desktopimage)
    $New_Folder = GUICtrlCreateMenuItem("New Folder",$Main_menu)
    $Prpertiest = GUICtrlCreateMenuItem("Properties",$Main_menu)
    GUICtrlSetOnEvent(-1,"Propertiesgui")

    ;IniWrite(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images","Currentimage",IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
EndFunc

Func Addbg()
    $Image = FileOpenDialog("Bg Image",@ProgramFilesDir & "\Mini OS\Desktop","(*.jpg;*.bmp;*.Gif)")
    if not @error Then
        $t = StringSplit($Image,"\")
        IniWrite(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$t[$t[0]],$Image)
        GUICtrlSetData($List1,$t[$t[0]])
        GUICtrlSetImage($Pic1,$Image)
        GuiCtrlSetState($Desktopimage,$GUI_DISABLE)
    EndIf
EndFunc

Func ok()
    $Image = _GUICtrlListGetSelItemsText($List1)
    if IsArray($image) Then GUICtrlSetImage($Desktopimage,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
    GUIDelete()
EndFunc

Func Addbglist()
    $Image = _GUICtrlListGetSelItemsText($List1)
    if IsArray($image) then
        if $image[1] = "Background Color" then
            GUICtrlSetImage($Pic1,"")
            GUIctrlSetBkColor($Pic1,"0x" & GUICtrlRead($Input1))
        else
            GUICtrlSetImage($Pic1,IniRead(@ProgramFilesDir & "\Mini OS\User\Options.ini","Bg Images",$Image[1],"Error"))
        EndIf
    EndIf
EndFunc

Func deletegui()
    for $x = 1 to 25
        WinSetTrans(@GUI_WinHandle,"",254-$x*10)
        sleep(10)
    Next
    GUIDelete(@GUI_WinHandle)
    for $x = 1 to $Guinumber
        if $guiid[$x] = @GUI_WinHandle then
            GUICtrlSetState($minwindow[$x],$GUI_HIDE)
            $b = 1
            For $y = 1 to $Guinumber
                if $guiid[$y] <> @GUI_WinHandle then
                    GUICtrlSetPos($minwindow[$y],($b*100-35),$Hight-18)
                    $b = $b+1
                EndIf
            Next
        EndIf
    Next
    $Guinumber = $Guinumber-1
EndFunc

Func CloseminiOS()
    Exit
EndFunc

Func Minimizegui()
    for $x = 1 to 25
        WinSetTrans(@GUI_WinHandle,"",254-$x*10)
        sleep(10)
    Next
    GUISetState(@SW_HIDE,@GUI_WinHandle)
EndFunc

Func Maximize($ID)
    GUISetState(@SW_SHOW,$guiid[$ID])
    for $x = 1 to 25
        WinSetTrans($guiid[$ID],"",$x*10+5)
        sleep(10)
    Next
EndFunc

Func Creategui($title,$sizex,$sizey,$posx,$posy)
    $Gui[$x] = GUICreate($title,$sizex,$sizey,$posx,$posy,$WS_POPUP+$WS_BORDER,$WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
    GUISetBkColor(0xFFFFFF)
    GUISetFont(10,600,0,"Comic Sans MS")
    GUICtrlCreateLabel($title,0,0,$sizex-40,20,$WS_BORDER,$GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1,0xCCCCCC)
    $GUI_MINIMIZE[$x] = GUICtrlCreateButton("_",$sizex-40,0,20,20)
    GUICtrlSetOnEvent(-1,"Minimizegui")
    $GUI_CLOSE[$x] = GUICtrlCreateButton("X",$sizex-20,0,20,20)
    GUICtrlSetOnEvent(-1,"Deletegui")
   
    GUICtrlSetData($minwindow[$Guinumber],"  " & $title)
    GUICtrlSetState($minwindow[$Guinumber],$GUI_SHOW)
    $guiid[$Guinumber] = WinGetHandle($Gui[$x])
    $Guinumber = $Guinumber+1
    $x = $x +1
EndFunc
Link to comment
Share on other sites

Yeah, you need to set up a filesystem and for starter applications put in notepad and things like that. Child windows will really help out here.

Good Luck!

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...