Jump to content
Sign in to follow this  
Michel Claveau

Win-Background transparent (Vista only)

Recommended Posts

Michel Claveau

Hi!

Another little example for have an invisible windows (except controls).

But, it's only for Vista (or WS-2008 + Aero).

#include <WindowsConstants.au3>
#include <GUIConstants.au3>

$w = 400
$h = 260
$vert = 300
$hor = 300

$hgui = GUICreate("GUIE", $w, $h, $hor, $vert, $WS_POPUP,$WS_EX_LAYERED)
;$hgui = GUICreate("GUIE", $w, $h, $hor, $vert, "", $WS_EX_LAYERED)

$hgr=GUICtrlCreatePic("", -5,-5, $w+10, $h+10)
GuiCtrlSetState($hgr,$GUI_DISABLE)
$hg2=GUICtrlCreatePic("trans.gif", -5,-5, $w+10, $h+10)
GuiCtrlSetState($hg2,$GUI_DISABLE)

$bt1 = GUICtrlCreateButton("Bouton_1", 20, 20, 80, 25) 
$bt2 = GUICtrlCreateButton("Bouton_2", 140, 50, 80, 25) 
$bt3 = GUICtrlCreateButton("Bouton_3", 260, 80, 80, 25) 
$quit= GUICtrlCreateButton("Quit", 170, 190, 60, 25) 
$sai1= GUICtrlCreateInput("Valeur_par_défaut", 20, 140, 330)
$lab1= GUICtrlCreateLabel("Zone de saisie : ", 20, 140-22)

GUISetState(@SW_SHOW, $hgui)

$msg = ""
while 1
    sleep(12)
    $msg = GUIGetMsg()
    Select
        Case $msg=$GUI_EVENT_CLOSE or $msg=$quit
            ExitLoop
        Case $msg=$bt1 
            MsgBox(0,"Bouton_1","cliqué")
        Case $msg=$bt2 
            MsgBox(0,"Bouton_2","cliqué")
        Case $msg=$bt3
            MsgBox(0,"Bouton_3","cliqué")
    EndSelect
WEnd
Exit

The effect is very fun, when you launch the window directly on desktop : only buttons, input-fields & labels are visibles.

Warning, you need the file trans.gif (see attachment).

THERE IS REALLY AN ATTACHMENT! It's a file, named "trans.gif". It is a transparent square, of 100 X 100:

Edited by Michel Claveau

Share this post


Link to post
Share on other sites
EvAsion

If you can figure out how to add controls without creating new childs for each, tell me!

Const $DWM_BB_ENABLE = 0x00000001
Const $DWM_BB_BLURREGION = 0x00000002
Const $DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004
Const $DWM_EC_DISABLECOMPOSITION = 0x00000000
Const $DWM_EC_ENABLECOMPOSITION = 0x00000001
Const $DWM_TNP_RECTDESTINATION = 0x00000001
Const $DWM_TNP_RECTSOURCE = 0x00000002
Const $DWM_TNP_OPACITY = 0x00000004
Const $DWM_TNP_VISIBLE = 0x00000008
Const $DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010

#include<guiconstants.au3>

Global $DWMdll = Vista_DWMInitiate()

;Vista_SetComposition(0)
;msgbox(0,"","Status of vista desktop composition: "&Vista_GetComposition())
;Vista_SetComposition(1)
;msgbox(0,"","Status of vista desktop composition: "&Vista_GetComposition())

$Colorization = Vista_GetColorization()
$gui = GUICreate("DWM stuff",500,500)

GUISetBkColor($Colorization[0])
GUISetState()
GUICreate("CHILD",300,40,30,30,$WS_POPUP,$WS_EX_MDICHILD,$gui)
GUISetBkColor($GUI_BKCOLOR_TRANSPARENT)
$edit = GUICtrlCreateEdit("The background is the window colorization colour!",0,0,300,20)
GUISetState()

do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
Vista_SetBlurBehind($gui, 1)
GUICtrlSetData($edit,"This is with blur-behind enabled")
do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
Vista_SetBlurBehind($gui, 0)
GUICtrlSetData($edit,"This is with blur-behind disabled")
do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
#cs
Vista_SetBlurBehindRegion($gui, 1,0,0,50,25)
GUICtrlSetData($edit,"This is with blur-behind region enabled (not functional)")
do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
$newgui = GUICreate("PREVIEW",0,0,100,100,$WS_POPUP)
GUISetState()
Vista_CreateThumbnail($newgui,$gui)
do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
#ce

Func Vista_DWMInitiate()
    $dll = DllOpen("dwmapi.dll")
    return $dll
EndFunc

Func Vista_DWMEndSession()
    DllClose($DWMdll)
EndFunc

Func Vista_SetBlurBehind($hwnd,$on = 1)
    $Struct = DllStructCreate("dword;int;ptr;int")
    DllStructSetData($Struct,1,$DWM_BB_ENABLE)
    If $on = 1 Then
        DllStructSetData($Struct,2,"1")
    Else
        DllStructSetData($Struct,2,"0")
    EndIf
    DllStructSetData($Struct,3,"0")
    DllStructSetData($Struct,4,"1")
    $call = DllCall($DWMdll,"int","DwmEnableBlurBehindWindow","hwnd",$hWnd,"ptr",DllStructGetPtr($Struct))
EndFunc

Func Vista_SetBlurBehindRegion($hwnd,$on = 1,$left = 0,$right = 0,$top = 0,$bottom = 0)
    #cs
    $RectStruct = DllStructCreate("int;int;int;int")
        DllStructSetData($RectStruct,1,$left)
        DllStructSetData($RectStruct,1,$top)
        DllStructSetData($RectStruct,1,$right)
        DllStructSetData($RectStruct,1,$bottom)
        
    $call = DllCall($DWMdll,"int","DwmExtendFrameIntoClientArea","hwnd",$hwnd,"ptr",DllStructGetPtr($RectStruct))
    #ce
    
    $Struct = DllStructCreate("dword;int;ptr;int")
        DllStructSetData($Struct,1,BitOr($DWM_BB_ENABLE,$DWM_BB_BLURREGION))
        If $on = 1 Then
            DllStructSetData($Struct,2,"1")
        Else
            DllStructSetData($Struct,2,"0")
        EndIf
        DllStructSetData($Struct,3,"int "&$left &";int "&$right& ";int "&$top& ";int "& $bottom)
        DllStructSetData($Struct,4,"1")
        
    $call = DllCall($DWMdll,"int","DwmEnableBlurBehindWindow","hwnd",$hWnd,"ptr",DllStructGetPtr($Struct))
EndFunc

Func Vista_SetComposition($on = 0)
    If $on = 1 Then
        Dllcall($DWMdll,"int","DwmEnableComposition","uint",$DWM_EC_ENABLECOMPOSITION)
    Else
        Dllcall($DWMdll,"int","DwmEnableComposition","uint",$DWM_EC_DISABLECOMPOSITION)
    EndIf
EndFunc

Func Vista_GetComposition()
    $status = Dllcall($DWMdll,"int","DwmIsCompositionEnabled","int*","")
    return $status[1]
EndFunc

Func Vista_GetColorization()
    $Colorization = Dllcall($DWMdll,"int","DwmGetColorizationColor","dword*","0","int*","0")
    If @error Then 
        SetError(@error)
        Return 0
    EndIf
    Local $array[2]
    Local $colour = Hex($Colorization[1])
    $array[0] = "0x"&StringTrimLeft($colour,2)
    $array[1] = "0x"&StringTrimRight($colour,6) 
    Return $array
EndFunc

Func Vista_CreateThumbnail($destination,$source)
    $Rect1 = DllStructCreate("int;int;int;int")
        DllStructSetData($Rect1,1,0)
        DllStructSetData($Rect1,2,0)
        DllStructSetData($Rect1,3,500)
        DllStructSetData($Rect1,4,500)
    $Rect2 = DllStructCreate("int;int;int;int")
        DllStructSetData($Rect2,1,0)
        DllStructSetData($Rect2,2,0)
        DllStructSetData($Rect2,3,100)
        DllStructSetData($Rect2,4,100)
    
    $Struct = DllStructCreate("dword;ptr;ptr;byte;int;int")
    
    $Struct = DllStructCreate("dword;ptr;ptr;byte;int;int")
        DllStructSetData($Struct,1,BitOr($DWM_TNP_OPACITY,$DWM_TNP_RECTDESTINATION,$DWM_TNP_RECTSOURCE,$DWM_TNP_SOURCECLIENTAREAONLY,$DWM_TNP_VISIBLE))
        DllStructSetData($Struct,2,DllStructGetPtr($rect1))
        DllStructSetData($Struct,3,DllStructGetPtr($rect2))
        DllStructSetData($Struct,4,"255")
        DllStructSetData($Struct,5,"1")
        DllStructSetData($Struct,6,"1")
    
    $create = Dllcall($DWMdll,"ptr","DwmRegisterThumbnail","hwnd",$destination,"hwnd",$source,"ptr*","")
    $update = Dllcall($DWMdll,"ptr","DwmUpdateThumbnailProperties","hwnd",$create[1],"prt",DllStructGetPtr($Struct))
EndFunc
Edited by EvAsion

Share this post


Link to post
Share on other sites
Michel Claveau

Hi, Manadar!

This has been done before with GDI+, which also works on Windows XP.

I search, but I don't found any example, in pure Autoit, with, ou without, GDI+

Please, give an example, or a link. Thank in advance.

Share this post


Link to post
Share on other sites
Michel Claveau

(re)-Hi, Manadar!

Thanks for links.

But, it's not the same thing. The scripts, in the links, use a "mask". My example has no mask. Controls can be put anywhere on the windows, add or delete directly.

And, it's a very very easy code.

I think what you did not try my example (perhaps you have not Vista... ?)

Share this post


Link to post
Share on other sites
Michel Claveau

Re!

Same than 1rst example, with create/delete button (only for show it's possible).

#include <WindowsConstants.au3>
#include <GUIConstants.au3>

cregiftrans()

$w = 400
$h = 260
$vert = 300
$hor = 300

$hgui = GUICreate("GUIE", $w, $h, $hor, $vert, $WS_POPUP,$WS_EX_LAYERED)
;$hgui = GUICreate("GUIE", $w, $h, $hor, $vert, "", $WS_EX_LAYERED)

$hgr=GUICtrlCreatePic("", -5,-5, $w+10, $h+10)
GuiCtrlSetState($hgr,$GUI_DISABLE)
$hg2=GUICtrlCreatePic("trans.gif", -5,-5, $w+10, $h+10)
GuiCtrlSetState($hg2,$GUI_DISABLE)

$bt1 = GUICtrlCreateButton("Create button", 20, 20, 80, 25) 
$bt2 = GUICtrlCreateButton("Delete button", 140, 50, 80, 25) 
$bt3 = GUICtrlCreateButton("Bouton_3", 260, 80, 80, 25) 
$bt4 = -1
$quit= GUICtrlCreateButton("Quit", 170, 190, 60, 25) 
$sai1= GUICtrlCreateInput("Valeur_par_défaut", 20, 140, 330)
$lab1= GUICtrlCreateLabel("Zone de saisie : ", 20, 140-22)

GUISetState(@SW_SHOW, $hgui)

$msg = ""
while 1
    sleep(12)
    $msg = GUIGetMsg()
    Select
        Case $msg=$GUI_EVENT_CLOSE or $msg=$quit
            ExitLoop
        Case $msg=$bt1 
            $bt4 = GUICtrlCreateButton("Bouton_4", 20, 80, 80, 25) 
            MsgBox(0,"Bouton_1 (create)","cliqué")
        Case $msg=$bt2 
            GUICtrlDelete($bt4)
            MsgBox(0,"Bouton_2 (delete)","cliqué")
        Case $msg=$bt3
            MsgBox(0,"Bouton_3","cliqué")
        Case $msg=$bt4
            MsgBox(0,"Bouton_4","cliqué")
    EndSelect
WEnd
Exit

Func cregiftrans($fichierdest = "")
    If $fichierdest="" Then
        $fichierdest = @ScriptDir&"\trans.gif"
    EndIf
    If FileExists($fichierdest) Then
        Return
    EndIf
    $st = ""
    $st &= "47494638396164006400f700000000000000330000660000990000cc0000" 
    $st &= "ff0033000033330033660033990033cc0033ff0066000066330066660066" 
    $st &= "990066cc0066ff0099000099330099660099990099cc0099ff00cc0000cc" 
    $st &= "3300cc6600cc9900cccc00ccff00ff0000ff3300ff6600ff9900ffcc00ff" 
    $st &= "ff3300003300333300663300993300cc3300ff3333003333333333663333" 
    $st &= "993333cc3333ff3366003366333366663366993366cc3366ff3399003399" 
    $st &= "333399663399993399cc3399ff33cc0033cc3333cc6633cc9933cccc33cc" 
    $st &= "ff33ff0033ff3333ff6633ff9933ffcc33ffff6600006600336600666600" 
    $st &= "996600cc6600ff6633006633336633666633996633cc6633ff6666006666" 
    $st &= "336666666666996666cc6666ff6699006699336699666699996699cc6699" 
    $st &= "ff66cc0066cc3366cc6666cc9966cccc66ccff66ff0066ff3366ff6666ff" 
    $st &= "9966ffcc66ffff9900009900339900669900999900cc9900ff9933009933" 
    $st &= "339933669933999933cc9933ff9966009966339966669966999966cc9966" 
    $st &= "ff9999009999339999669999999999cc9999ff99cc0099cc3399cc6699cc" 
    $st &= "9999cccc99ccff99ff0099ff3399ff6699ff9999ffcc99ffffcc0000cc00" 
    $st &= "33cc0066cc0099cc00cccc00ffcc3300cc3333cc3366cc3399cc33cccc33" 
    $st &= "ffcc6600cc6633cc6666cc6699cc66cccc66ffcc9900cc9933cc9966cc99" 
    $st &= "99cc99cccc99ffcccc00cccc33cccc66cccc99ccccccccccffccff00ccff" 
    $st &= "33ccff66ccff99ccffccccffffff0000ff0033ff0066ff0099ff00ccff00" 
    $st &= "ffff3300ff3333ff3366ff3399ff33ccff33ffff6600ff6633ff6666ff66" 
    $st &= "99ff66ccff66ffff9900ff9933ff9966ff9999ff99ccff99ffffcc00ffcc" 
    $st &= "33ffcc66ffcc99ffccccffccffffff00ffff33ffff66ffff99ffffccffff" 
    $st &= "ff0d0d0d1a1a1a2828283535354343435050505d5d5d6b6b6b7878788686" 
    $st &= "86939393a1a1a1aeaeaebbbbbbc9c9c9d6d6d6e4e4e4f1f1f10000000000" 
    $st &= "000000000000000000000000000000000000000000000000000000000000" 
    $st &= "000000000000000000000000000000000000000000000000000000000000" 
    $st &= "0021f904090000d7002c00000000640064000008a100af091c48b0a0c183" 
    $st &= "08132a5cc8b0a1c38710234a9c48b1a2c58b18336adcc8b1a3c78f20438a" 
    $st &= "1c49b2a4c9932853aa5cc9b2a5cb973063ca9c49b3a6cd9b3873eadcc9b3" 
    $st &= "a7cf9f40830a1d4ab4a8d1a348932a5dcab4a9d3a750a34a9d4ab5aad5ab" 
    $st &= "58b36addcab5abd7af60c38a1d4bb6acd9b368d3aa5dcbb6addbb770e3ca" 
    $st &= "9d4bb7aeddbb78f3eaddcbb7afdfbf80030b1e4cb8b0e1c388132b5ecc58" 
    $st &= "7040003b" 
    
    $bin=""
    For $i=1 To StringLen($st) Step 2
        $c = StringMid($st,$i,2)
        $bin &= Chr(Dec($c))
    Next
    $f = FileOpen($fichierdest,18)
    FileWrite($f,$bin)
    FileClose($f)
    
EndFunc
Edited by Michel Claveau

Share this post


Link to post
Share on other sites
ProgAndy

No, he's right :) Th example he posted was just with an additional window for showing the Background and an other window for the Controls which is transparent :P

This example even doesn't need an image:

http://www.autoitscript.com/forum/index.ph...st&p=512145


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
Michel Claveau

Hi, ProgAndy!

You are right.

OK.

Sorry for trouble. :)

But, my example is different way, very easy.

Share this post


Link to post
Share on other sites
Michel Claveau

Re!

Another example, with an animation from IE (yet for Vista only).

I hope than super-ProgAndy can do the same thing with XP...

.

#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <IE.au3>
#include <GUIConstants.au3>
#include <GuiEdit.au3>

cregiftrans()
Sleep(100)

$w = 600
$h = 400
$x = 30
$y = 30

$w = @DesktopWidth+20
$h = @DesktopHeight+50
$x = -10
$y = -40

$ajx=30
$ajy=60

;$hgui = GUICreate("GUIE", $w, $h, $x, $y, $WS_POPUP,$WS_EX_LAYERED)
$hgui = GUICreate("GUIE-Vista", $w, $h, $x, $y, -1, $WS_EX_LAYERED)

$hgr=GUICtrlCreatePic("", -5,-5, $w+10, $h+10, $SS_WHITEFRAME )
GuiCtrlSetState($hgr,$GUI_DISABLE)
$oie=_IECreateEmbedded()
$GUIActiveX=GUICtrlCreateObj($oie, -5, -5, $w+10, $h+10)
_IENavigate($oie, @ScriptDir &'\txt-3D-tourne.htm')
GuiCtrlSetState($GUIActiveX,$GUI_DISABLE)

$bt1 = GUICtrlCreateButton("Cre Bt_4",  20+$ajx, 20+$ajy, 70, 25) 
$bt2 = GUICtrlCreateButton("Del Bt_4",  90+$ajx, 20+$ajy, 70, 25) 
$bt3 = GUICtrlCreateButton("Bouton_3", 160+$ajx, 20+$ajy, 70, 25) 
$bt4 = -999
$quit= GUICtrlCreateButton("Quit",   320+$ajx, 20+$ajy, 70, 25) 
$lab1= GUICtrlCreateLabel("Zone de saisie : ", 20+$ajx, 60+$ajy)
$sai1= GUICtrlCreateInput("VALEUR PAR DEFAUT", 106+$ajx, 60+$ajy, 240)
GUICtrlSetState(-1, $GUI_FOCUS)
GUISetState(@SW_SHOW, $hgui)

$msg = ""
$nb=1800
while 1
    sleep(12)
    $nb-=1
    If $nb<0 Then
        ExitLoop
    EndIf
    $msg = GUIGetMsg()
    Select
        Case $msg=$GUI_EVENT_CLOSE or $msg=$quit
            ExitLoop
        Case $msg=$bt1 
            $bt4 = GUICtrlCreateButton("Bouton_4", 230+$ajx, 20+$ajy, 70, 25) 
            MsgBox(0,"Bouton_1 (create)","cliqué")
        Case $msg=$bt2 
            GUICtrlDelete($bt4)
            $bt4=-999
            MsgBox(0,"Bouton_2 (delete)","cliqué")
            GUISetState($GUI_FOCUS,$sai1)
        Case $msg=$bt3
            MsgBox(0,"Bouton_3","cliqué")
        Case $msg=$bt4
            MsgBox(0,"Bouton_4","cliqué")
    EndSelect
WEnd
Sleep(10)
$obj = 0
Exit



Func cregiftrans($fichierdest = "")
    If $fichierdest="" Then
        $fichierdest = @ScriptDir&"\txt-3D-tourne.htm"
    EndIf
    If FileExists($fichierdest) Then
        Return
    EndIf
    $st = ""
    $st &= "3c48544d4c3e0d0a3c786d6c3a6e616d657370616365206e733d2275726e" 
    $st &= "3a736368656d61732d6d6963726f736f66742d636f6d3a766d6c22207072" 
    $st &= "656669783d227622202f3e0d0a3c7374796c653e0d0a765c3a2a207b2062" 
    $st &= "65686176696f723a2075726c282364656661756c7423564d4c293b207d0d" 
    $st &= "0a3c2f7374796c653e0d0a3c484541443e0d0a3c2f484541443e0d0a0d0a" 
    $st &= "3c424f4459206267436f6c6f723d23464646464646207363726f6c6c3d6e" 
    $st &= "6f203e0d0a0d0a0d0a3c2f424f44593e0d0a0d0a3c7363726970743e0d0a" 
    $st &= "766172207069633d6e6577204172726179282222290d0a0d0a0d0a3c212d" 
    $st &= "2d2d3e0d0a3c212d2d2d3e0d0a3c212d2d2d3e0d0a3c212d2d2d2d2d2d2d" 
    $st &= "2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d206d65737361676520746f75726e61" 
    $st &= "6e74202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3e0d0a7661" 
    $st &= "72206d6573736167653d6e65772041727261792822426f6e6a6f75722021" 
    $st &= "222c22566f696ce0206365222c22717565206c276f6e222c227065757420" 
    $st &= "6661697265222c2261766563204175746f69742c222c22496e7465726e65" 
    $st &= "742d4578706c6f7265722c222c226574205669737461222c222022290d0a" 
    $st &= "2f2f206c6120706f6c6963650d0a76617220666e743d22617269616c2062" 
    $st &= "6c61636b220d0a0d0a2f2f206c6172676575722064752074657874650d0a" 
    $st &= "76617220666f726d77696474683d3430300d0a0d0a2f2f20636f756c6575" 
    $st &= "7220646520766f74726520746578746520656e2033440d0a766172206669" 
    $st &= "6c6c636f6c6f723d2223393937373131220d0a0d0a2f2f20e97061697373" 
    $st &= "65757220646573206c65747472657320656e2033440d0a76617220626163" 
    $st &= "6b64657074683d31340d0a0d0a2f2f206c61207669746573736520646520" 
    $st &= "726f746174696f6e0d0a7661722073706565643d360d0a0d0a2f2f204e65" 
    $st &= "207269656e206d6f64696669657220656e20646573736f75732064652063" 
    $st &= "65747465206c69676e650d0a766172206f7061636974793d22393025220d" 
    $st &= "0a7661722066696c6c747970653d226672616d65220d0a7661722073746f" 
    $st &= "706166746572646973706c61793d66616c736520202f2f2066616c736520" 
    $st &= "3d20626f75636c650d0a76617220636972636c656d61726b3d22220d0a76" 
    $st &= "617220695f616e676c65313d300d0a76617220695f7069633d300d0a7661" 
    $st &= "7220695f6d6573736167653d300d0a76617220706f736c6566743d300d0a" 
    $st &= "76617220706f73746f703d300d0a766172207061676577696474680d0a76" 
    $st &= "617220706167656865696768740d0a766172206c6f6e676573746d657373" 
    $st &= "6167653d300d0a76617220656d70747973706163653d2220220d0a766172" 
    $st &= "20666c6167737461727465643d66616c73650d0a0d0a766172206f706572" 
    $st &= "613d6e6176696761746f722e757365724167656e742e6d61746368282f4f" 
    $st &= "706572612f290d0a766172206965353d646f63756d656e742e676574456c" 
    $st &= "656d656e74427949642626646f63756d656e742e616c6c2626216f706572" 
    $st &= "613f313a300d0a0d0a666f722028693d303b693c3d6d6573736167652e6c" 
    $st &= "656e6774682d313b692b2b29207b0d0a2020202020202020696620286d65" 
    $st &= "73736167655b695d2e6c656e6774683e6c6f6e676573746d657373616765" 
    $st &= "29207b0d0a202020202020202020202020202020206c6f6e676573746d65" 
    $st &= "73736167653d6d6573736167655b695d2e6c656e6774680d0a2020202020" 
    $st &= "2020207d0d0a20202020202020206c6f6e676573746d6573736167652b3d" 
    $st &= "340d0a7d0d0a0d0a666f722028693d303b693c3d6d6573736167652e6c65" 
    $st &= "6e6774682d313b692b2b29207b0d0a202020202020202076617220656d70" 
    $st &= "747973706163653d22220d0a202020202020202076617220695f656d7074" 
    $st &= "7973706163653d286c6f6e676573746d6573736167652d6d657373616765" 
    $st &= "5b695d2e6c656e677468292f320d0a2020202020202020666f7220286969" 
    $st &= "3d303b69693c3d695f656d70747973706163653b69692b2b29207b0d0a20" 
    $st &= "202020202020202020202020202020656d70747973706163652b3d636972" 
    $st &= "636c656d61726b0d0a20202020202020207d0d0a20202020202020206d65" 
    $st &= "73736167655b695d3d656d70747973706163652b2220222b6d6573736167" 
    $st &= "655b695d2b2220222b656d70747973706163650d0a7d0d0a0d0a66756e63" 
    $st &= "74696f6e20696e6974666f726d2829207b0d0a2020202020202020706167" 
    $st &= "6577696474683d646f63756d656e742e626f64792e636c69656e74576964" 
    $st &= "74680d0a2020202020202020706167656865696768743d646f63756d656e" 
    $st &= "742e626f64792e636c69656e744865696768740d0a202020202020202070" 
    $st &= "6f736c6566743d287061676577696474682d666f726d7769647468292f32" 
    $st &= "0d0a2020202020202020706f73746f703d706167656865696768742f320d" 
    $st &= "0a2020202020202020646f63756d656e742e676574456c656d656e744279" 
    $st &= "4964282772656374696427292e7374796c652e6c6566743d706f736c6566" 
    $st &= "740d0a2020202020202020646f63756d656e742e676574456c656d656e74" 
    $st &= "42794964282772656374696427292e7374796c652e746f703d706f73746f" 
    $st &= "700d0a20202020202020207072656c6f616428290d0a7d0d0a0d0a66756e" 
    $st &= "6374696f6e207072656c6f61642829207b0d0a2020202020202020766172" 
    $st &= "20695f7072656c6f61643d300d0a2020202020202020666f722028693d30" 
    $st &= "3b693c3d7069632e6c656e6774682d313b692b2b29207b0d0a2020202020" 
    $st &= "202020202020202020202076617220696d677265663d6576616c2822646f" 
    $st &= "63756d656e742e6e222b69290d0a20202020202020202020202020202020" 
    $st &= "69662028696d677265662e636f6d706c65746529207b695f7072656c6f61" 
    $st &= "642b2b7d0d0a20202020202020207d0d0a20202020202020206966202869" 
    $st &= "5f7072656c6f61643e3d7069632e6c656e6774682d3129207b0d0a202020" 
    $st &= "2020202020202020202020202077696e646f772e7374617475733d224d69" 
    $st &= "6368656c20436c617665617520496e666f726d617469717565220d0a2020" 
    $st &= "20202020202020202020202020206368616e6765666f726d28290d0a2020" 
    $st &= "2020202020207d0d0a2020202020202020656c7365207b0d0a2020202020" 
    $st &= "20202020202020202020207661722074696d65723d73657454696d656f75" 
    $st &= "7428227072656c6f61642829222c323030290d0a20202020202020207d0d" 
    $st &= "0a7d0d0a0d0a66756e6374696f6e206368616e6765666f726d2829207b0d" 
    $st &= "0a2020202020202020695f616e676c65312b3d73706565640d0a20202020" 
    $st &= "2020202069662028695f616e676c65313d3d33363029207b695f616e676c" 
    $st &= "65313d307d0d0a202020202020202069662028695f616e676c65313d3d32" 
    $st &= "353229207b0d0a20202020202020202020202020202020695f7069632b2b" 
    $st &= "0d0a20202020202020202020202020202020695f6d6573736167652b2b0d" 
    $st &= "0a2020202020202020202020202020202069662028695f7069633e3d7069" 
    $st &= "632e6c656e67746829207b695f7069633d307d0d0a202020202020202020" 
    $st &= "2020202020202069662028695f6d6573736167653e3d6d6573736167652e" 
    $st &= "6c656e67746829207b695f6d6573736167653d307d0d0a20202020202020" 
    $st &= "202020202020202020646f63756d656e742e676574456c656d656e744279" 
    $st &= "4964282766696c6c696427292e7372633d7069635b695f7069635d0d0a20" 
    $st &= "202020202020202020202020202020646f63756d656e742e676574456c65" 
    $st &= "6d656e744279496428277465787470617468696427292e737472696e673d" 
    $st &= "6d6573736167655b695f6d6573736167655d0d0a20202020202020202020" 
    $st &= "202020202020666c6167737461727465643d747275650d0a202020202020" 
    $st &= "20207d0d0a2020202020202020646f63756d656e742e676574456c656d65" 
    $st &= "6e74427949642827657874727573696f6e696427292e726f746174696f6e" 
    $st &= "616e676c653d302b222c222b695f616e676c65310d0a2020202020202020" 
    $st &= "6966202873746f706166746572646973706c617920262620695f6d657373" 
    $st &= "6167653d3d3020262620666c61677374617274656429207b0d0a20202020" 
    $st &= "202020202020202020202020646f63756d656e742e676574456c656d656e" 
    $st &= "744279496428277465787470617468696427292e737472696e673d22220d" 
    $st &= "0a20202020202020207d0d0a2020202020202020656c7365207b0d0a2020" 
    $st &= "20202020202020202020202020207661722074696d65723d73657454696d" 
    $st &= "656f757428226368616e6765666f726d2829222c3230290d0a2020202020" 
    $st &= "2020207d0d0a7d0d0a0d0a66756e6374696f6e20676f2829207b0d0a0973" 
    $st &= "657454696d656f75742822696e6974666f726d2829222c31290d0a7d0d0a" 
    $st &= "0d0a6966202869653529207b0d0a2020202020202020646f63756d656e74" 
    $st &= "2e777269746528273c6469762069643d227072656c6f6164696d61676573" 
    $st &= "22207374796c653d22706f736974696f6e3a6162736f6c7574653b6c6566" 
    $st &= "743a2d3570783b746f703a2d3570783b7669736962696c6974793a686964" 
    $st &= "64656e223e27290d0a2020202020202020666f722028693d303b693c3d70" 
    $st &= "69632e6c656e6774682d313b692b2b29207b0d0a20202020202020202020" 
    $st &= "202020202020646f63756d656e742e777269746528273c696d6720737263" 
    $st &= "3d22272b7069635b695d2b2722206e616d653d226e272b692b2722207769" 
    $st &= "6474683d31206865696768743d313e27290d0a20202020202020207d0d0a" 
    $st &= "2020202020202020646f63756d656e742e777269746528273c2f6469763e" 
    $st &= "27290d0a2020202020202020646f63756d656e742e777269746528273c76" 
    $st &= "3a63757276652069643d2272656374696422207374726f6b657765696768" 
    $st &= "743d2232707422207374796c653d22706f736974696f6e3a6162736f6c75" 
    $st &= "74653b222066726f6d3d22302c302220746f3d22272b666f726d77696474" 
    $st &= "682b272c302e31223e27290d0a2020202020202020646f63756d656e742e" 
    $st &= "777269746528273c763a657874727573696f6e2069643d22657874727573" 
    $st &= "696f6e696422206f6e3d22747275652220747970653d2270657273706563" 
    $st &= "746976652220636f6c6f723d22272b66696c6c636f6c6f722b2722206261" 
    $st &= "636b64657074683d22272b6261636b64657074682b272220646966667573" 
    $st &= "6974793d22322e3522206d6574616c3d2274727565222f3e27290d0a2064" 
    $st &= "6f63756d656e742e777269746528273c763a66696c6c2069643d2266696c" 
    $st &= "6c696422206f7061636974793d22272b6f7061636974792b272220636f6c" 
    $st &= "6f723d22272b66696c6c636f6c6f722b272220747970653d22272b66696c" 
    $st &= "6c747970652b2722207372633d22272b7069635b305d2b27222f3e27290d" 
    $st &= "0a2020202020202020646f63756d656e742e777269746528273c763a7061" 
    $st &= "74682074657874706174686f6b3d2274222f3e27290d0a20202020202020" 
    $st &= "20646f63756d656e742e777269746528273c763a74657874706174682069" 
    $st &= "643d227465787470617468696422206f6e3d227422207374796c653d2266" 
    $st &= "6f6e742d66616d696c793a5c27272b666e742b275c273b22206669747061" 
    $st &= "74683d22742220737472696e673d22272b6d6573736167655b695f6d6573" 
    $st &= "736167655d2b27222f3e27290d0a2020202020202020646f63756d656e74" 
    $st &= "2e777269746528273c2f763a63757276653e27290d0a2020202020202020" 
    $st &= "77696e646f772e6f6e6c6f61643d676f0d0a2020207d0d0a3c2f73637269" 
    $st &= "70743e0d0a0d0a0d0a3c212d2d2d3e0d0a3c212d2d2d3e0d0a3c212d2d2d" 
    $st &= "3e0d0a3c212d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d207465" 
    $st &= "787465202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3e0d0a3c" 
    $st &= "44495620616c69676e3d63656e7465723e0d0a3c62723e3c62723e3c6272" 
    $st &= "3e3c62723e3c62723e3c62723e3c62723e3c62723e3c62723e0d0a3c2f46" 
    $st &= "4f4e543e0d0a3c2f4449563e0d0a0d0a3c2f424f44593e3c2f48544d4c3e" 
    $st &= "0d0a" 
    
    $bin=""
    For $i=1 To StringLen($st) Step 2
        $c = StringMid($st,$i,2)
        $bin &= Chr(Dec($c))
    Next
    $f = FileOpen($fichierdest,18)
    FileWrite($f,$bin)
    FileClose($f)
    
EndFunc
Edited by Michel Claveau

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.