Sign in to follow this  
Followers 0
JRSmile

Desktop Dreamscene XP

14 posts in this topic

#NoTrayIcon
#include <WindowsConstants.au3>
#include <ie.au3>
HotKeySet("^o","open")
HotKeySet("^!{ESC}","GUI_close")
Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4)
$trepo = ControlGetPos("classname=Shell_TrayWnd", "", "ToolbarWindow322")
Global $GUI_MAIN = GUICreate("", @DesktopWidth, @DesktopHeight-$trepo[3], 0, 0,$WS_POPUP)
GUISetOnEvent(-3,"GUI_Close")
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
$GUIActiveX = GUICtrlCreateObj($oIE, -2, -2, @DesktopWidth+19, (@DesktopHeight-$trepo[3])+4)
_IENavigate ($oIE, "http://images.templatemonster.com/screenshots/22400/22432-st.html")
GUISetState(@SW_SHOW)
$hProgMan = WinGetHandle("Program Manager")
_SetParent($hProgMan, WinGetHandle($GUI_MAIN))

While 1
    Sleep(100)
WEnd

Func open()
    $go = InputBox("JRSmile's IE Desktop", "Enter the page you want to go to", "www.heise.de")
    _IENavigate ($oIE, $go)
EndFunc

Func GUI_Close()
    Exit
EndFunc

Func _SetParent($TitleC, $TitleP)
    Local $old_method = Opt("WinTitleMatchMode", 4)
    If WinExists($TitleC) And WinExists($TitleP) Then
        $HwndC = WinGetHandle($TitleC)
        $HwndP = WinGetHandle($TitleP)
        DLLCall("user32.dll", "str", "SetParent", "HWnd", $HWndP, "HWnd", $HWndC)
        If @error then
            Opt("WinTitleMatchMode", $old_method)
            return 0
        EndIf
       Opt("WinTitleMatchMode", $old_method)
        Return 1
    EndIf
EndFunc


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites



it can even show your desktop in list and detailed view.

#NoTrayIcon
#include <WindowsConstants.au3>
#include <ie.au3>
HotKeySet("^o","open")
Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4)
$trepo = ControlGetPos("classname=Shell_TrayWnd", "", "ToolbarWindow322")
Global $GUI_MAIN = GUICreate("", @DesktopWidth, @DesktopHeight-$trepo[3], 0, 0,$WS_POPUP)
GUISetOnEvent(-3,"GUI_Close")
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
$GUIActiveX = GUICtrlCreateObj($oIE, -2, -2, @DesktopWidth+19, (@DesktopHeight-$trepo[3])+4)
_IENavigate ($oIE, "about:blank")
GUISetState(@SW_SHOW)
$hProgMan = WinGetHandle("Program Manager")
_SetParent($hProgMan, WinGetHandle($GUI_MAIN))
_IENavigate ($oIE, "file://"& @DesktopDir)
While 1
    Sleep(100)
WEnd

Func open()
    _IENavigate ($oIE, "file://"& @DesktopDir)
EndFunc

Func GUI_Close()
    Exit
EndFunc

Func _SetParent($TitleC, $TitleP)
    Local $old_method = Opt("WinTitleMatchMode", 4)
    If WinExists($TitleC) And WinExists($TitleP) Then
        $HwndC = WinGetHandle($TitleC)
        $HwndP = WinGetHandle($TitleP)
        DLLCall("user32.dll", "str", "SetParent", "HWnd", $HWndP, "HWnd", $HWndC)
        If @error then
            Opt("WinTitleMatchMode", $old_method)
            return 0
        EndIf
       Opt("WinTitleMatchMode", $old_method)
        Return 1
    EndIf
EndFunc

if someone knows how to set a folder background image via folder.htt or desktop.ini for the desktop folder this would be really great.


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

thanks for this, but that mehtod does not work for the desktop folder... unfortunately :-(

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

btw here an aproach with 4 virtual desktops. just slide trough the toolbar (don't click).

#NoTrayIcon
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <Constants.au3>
#include <GuiToolbar.au3>
#include <ie.au3>

HotKeySet("^o","open")
Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4)
$trepo = ControlGetPos("classname=Shell_TrayWnd", "", "ToolbarWindow322")
Global $GUI_MAIN = GUICreate("", @DesktopWidth, @DesktopHeight-$trepo[3], 0, 0,$WS_POPUP)
GUISetOnEvent(-3,"GUI_Close")
GUISetBkColor(0xffffff,$GUI_MAIN)
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()

$hToolbar = _GUICtrlToolBar_Create($GUI_MAIN)
_GUICtrlToolbar_AddBitmap ($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)
Enum $idDesk1 = 1000, $idDesk2, $idDesk3, $idDesk4
_GUICtrlToolbar_AddButton ($hToolbar, $idDesk1, $STD_FILENEW)
_GUICtrlToolbar_AddButton ($hToolbar, $idDesk2, $STD_FILENEW)
_GUICtrlToolbar_AddButton ($hToolbar, $idDesk3, $STD_FILENEW)
_GUICtrlToolbar_AddButton ($hToolbar, $idDesk4, $STD_FILENEW)

_GUICtrlToolbar_SetStyleTransparent($hToolbar, 1)
$GUIActiveX = GUICtrlCreateObj($oIE, -2, 33, @DesktopWidth+19, (@DesktopHeight-$trepo[3])+4)
_IENavigate ($oIE, "about:blank")
$hProgMan = WinGetHandle("Program Manager")
_SetParent($hProgMan, WinGetHandle($GUI_MAIN))
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")

_IENavigate ($oIE, "file://"& @DesktopDir,0)
While 1
    Sleep(100)
WEnd

Func open()
    _IENavigate ($oIE, "file://"& @DesktopDir,0)
EndFunc


Func GUI_Close()
    Exit
EndFunc

Func _SetParent($TitleC, $TitleP)
    Local $old_method = Opt("WinTitleMatchMode", 4)
    If WinExists($TitleC) And WinExists($TitleP) Then
        $HwndC = WinGetHandle($TitleC)
        $HwndP = WinGetHandle($TitleP)
        DLLCall("user32.dll", "str", "SetParent", "HWnd", $HWndP, "HWnd", $HWndC)
        If @error then
            Opt("WinTitleMatchMode", $old_method)
            return 0
        EndIf
       Opt("WinTitleMatchMode", $old_method)
        Return 1
    EndIf
EndFunc

Func _WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
    #forceref $hWndGUI, $MsgID, $wParam
    Local $tNMHDR, $event, $hwndFrom, $code, $i_idNew, $dwFlags, $lResult, $idFrom, $i_idOld
    Local $tNMTOOLBAR, $tNMTBHOTITEM
    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hwndFrom = DllStructGetData($tNMHDR, "hWndFrom")
    $idFrom = DllStructGetData($tNMHDR, "IDFrom")
    $code = DllStructGetData($tNMHDR, "Code")
    Switch $hwndFrom
        Case $hToolbar
            Switch $code
                Case $TBN_HOTITEMCHANGE
                    $tNMTBHOTITEM = DllStructCreate($tagNMTBHOTITEM, $lParam)
                    $i_idOld = DllStructGetData($tNMTBHOTITEM, "idOld")
                    $i_idNew = DllStructGetData($tNMTBHOTITEM, "idNew")
                    $iItem = $i_idNew
                    $dwFlags = DllStructGetData($tNMTBHOTITEM, "dwFlags")
                    If BitAND($dwFlags, $HICF_LEAVING) = $HICF_LEAVING Then
                        ;
                    Else
                        Switch $i_idNew
                            Case $idDesk1
                                _IENavigate ($oIE, "file://"& @DesktopDir,0)
                            Case $idDesk2
                                _IENavigate ($oIE, "http://www.google.com",0)
                            Case $idDesk3
                                _IENavigate ($oIE, "http://www.earthlost.de",0)
                            Case $idDesk4
                                _IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9",0)
                        EndSwitch
                    EndIf
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>_WM_NOTIFY

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

Just a note, this doesn't work on Seven :)

You got the confirmation from me too that it doesn't work :party:


[size="2"]SFXMaker[/size] - The most complete switchless installer creator software[indent][/indent]

Share this post


Link to post
Share on other sites

ok will have to check for that.


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

On Vista.

Creative idea. I really like this, only problem is that you can't see your icons.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Hi!

Simple and good idea.

I try without problem on:

- Vista (ultimate + SP1 + SP2)

- Seven (ultimate RC1)

Otherwise: do you know how to change the Z-order of the "childed" windows, inside desktop?

Share this post


Link to post
Share on other sites

Re!

Strange, it didn't work for me.

1) I replaced the url by a local file (file:///C:/jb.htm)

2) My windows are not "sheep" versions. They are configured by/for me, and very optimized.

Perhaps these things explain the success on my computers.

Share this post


Link to post
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
Sign in to follow this  
Followers 0