WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Warning Notice for Game Players


;Here's one of my early scripts--when I find games on
;the network I compile this with the same icon and name
;as the game's executable, then copy it over the game.
;The next time the user tries to play, they get my 
;incredibly subtle warning.  I just used a tight While
;loop to close Task Manager as soon as it opens.

IntControl (12,2+8,"",0,0)                                 ;Prevent closing script or exiting windows until script is done
IntControl (1002,0,0,0,0)                                  ;Hide WinBatch Icon in tray

;Set box to popup, captionless mode without a system menu
BoxStyle=DllCall(StrCat(DirWindows(1),"User32.DLL"),long:"GetWindowLongA",long:DllHwnd(""),long:-16)&(~524288&8388608)
Box1=DllCall(StrCat(DirWindows(1),"User32.DLL"),long:"SetWindowLongA",long:DllHwnd(""),long:-16,long:BoxStyle)

;Draw display box
Button1=1
BoxesUp ("225,250,775,750",@NORMAL)
BoxCaption (1,"Notice")
IntControl (54,"Notice",1,0,0)                             ;Keep window on top
BoxTextColor (1,"255,255,255")
BoxTextFont (1,"Times New Roman",120,50,0|0)
BoxColor (1,"0,0,128",4)
BoxDrawRect (1,"1,1,1000,1000",2)
BoxDrawText (1,"1,100,1000,120",StrCat("Please note that games",@CRLF,"are not allowed on USBank",@CRLF,"equipment"),@FALSE,1)
BoxButtonDraw (1,Button1,"I understand and agree","350,800,650,950")

;Watch for Task Manager and close it if open
While BoxButtonStat (1,Button1)==@FALSE
   If WinState ("Notice")<>@NORMAL Then WinShow ("Notice")
   If WinExist ("~Task Manager") Then WinClose ("~Task Manager")
EndWhile
Exit

Article ID:   W16034
File Created: 2004:03:30:15:42:20
Last Updated: 2004:03:30:15:42:20