forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Screensaver for VDS utilities...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Aug 09, 2002 4:55 am    Post subject: Screensaver for VDS utilities... Reply with quote

I've had some problems with VDS programs preventing
screensavers from kicking in, particularly ones that use
WINDOWS SEND or WINDOW CLICK, but also some that
just pop up an INFO window.

Apparently Windows sees these as keystrokes/clicks as
being done by the user, soooooooo.........

Here's a screensaver that requires you to push a button
with the mouse to stop it. OK, I know the button moves,
but it's a BIG button and it moves slow... Wink

I added a default dummy button (named "Dud") so that
a stray ENTER keystroke sent won't stop it. If you just
can't catch the button ( Razz ), you can hit TAB then ENTER
to stop it.

Compile the code to an exe, then copy it to your Windows
folder with the the ".EXE" extension renamed to ".SCR".
Code:

rem -- Windows sends these parameters to the screensaver:
rem -- If the display properties window is open, Windows
rem -- constantly calls the screensaver with "/p 2212",
rem -- which is probably for the small screensaver display.
rem -- Preview button= "/p"
rem -- Settings button= "/c"
rem -- Normally sends "/s" when starting the screensaver.

rem -- Allow only 1 instance of program --
if @winexists("Mac's Blank Screensaver")
   EXIT
end

rem -- No setup parameter --
TITLE "By Mac"
if @equal(%1, "/c")
   INFO There are no other settings...@tab()
   EXIT
end

rem -- Kill the "/p 2212" parameter.
if @equal(%1, "/p")
   if %2
      EXIT
   end
end

OPTION SCALE, 96
OPTION DECIMALSEP, "."
OPTION PRIORITY, IDLE
%w = @sysinfo(SCREENWIDTH)
%h = @sysinfo(SCREENHEIGHT)

DIALOG CREATE,"Mac's Blank Screensaver",0,0,%w,%h,NOTITLE,ONTOP
  DIALOG ADD,STYLE,Style1,Wingdings,72,C,BLACK,$00333333
  DIALOG ADD,TEXT,T1,0,0,%w,%h,,,Style1
  DIALOG ADD,BUTTON,Dud,0,0,0,0,,,DEFAULT
  DIALOG ADD,BUTTON,B1,0,@diff(@div(%w,2),100),200,100,"N",,Style1
DIALOG SHOW

rem -- Move mouse cursor off screen --
if @not(@greater(@mousepos(X),%w))@not(@greater(@mousepos(Y),%h))
   WINDOW CLICK,"Mac's Blank Screensaver",%w,%h
end

%x = 0
REPEAT
  if @greater(1, %x)
     %%dir = 1
  end
  if @greater(%x, @diff(%h, 100))
     %%dir = ""
  end
  if %%dir
     %x = @sum(%x,5)
  else
     %x = @diff(%x,5)
  end
  DIALOG SETPOS,B1,%x
  WAIT ".1"
UNTIL @equal(@event(), "B1BUTTON")
EXIT

Cheers, Mac

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group