1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Option Explicit
'rend un script wsh visible sur la barre de tâches
'utilise le composant dynamicwrapperx pour accéder à l'api win32
'omen999 juillet 2010
Dim oWrap,n,hWnd
Set oWrap = CreateObject("DynamicWrapperX") 'instancie l'objet wrapper
oWrap.Register "USER32.DLL","FindWindowA","i=ss","r=h" 'handle de la fenêtre du script
oWrap.Register "USER32.DLL","SetWindowTextA","i=hs","r=l" 'ajout d'un titre
oWrap.Register "USER32.DLL","MoveWindow","i=hlllll","r=l" 'ajout d'un titre
oWrap.Register "USER32.DLL","ShowWindow","i=hu","r=l" 'visible dans la barrre des tâches
hWnd=oWrap.FindWindowA("WSH-Timer","")
oWrap.SetWindowTextA hWnd,"omen999®"
oWrap.MoveWindow hWnd,-123,0,123,34,0
oWrap.ShowWindow hWnd,6
' mettre le code du script ici (remplacer la boucle demo ci-dessous)
n=1
While n=1
WScript.Sleep 100
Wend |
Partager