Sign in to follow this  
Followers 0
stev379

Screensaver pic

5 posts in this topic

I have an AutoIT GUI with a certain pic of my desktop. I'd like to do one of two things and would like the experts opinions on the best possible choice.

1) Create a screensaver of the desktop pic (in which case I need an app to create an .scr file...unless you all know a way to create an .scr without a third party app).

OR

2) Write the GUI script such that it will block all input (one should not be able to CTRL+ALT+DEL and go to Task Mgr and end the script process), but will allow me to unlock it with a password perhaps with a hotkey to bring up a password prompt...(not sure how to go about that just yet). Basically the same as Windows does when you lock the system and the screensaver starts.

...I hope there isn't a really simple answer for this I've missed. B)

Thanks!

Share this post


Link to post
Share on other sites



You might want to take a look at this Topic



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Just compile and rename to a .scr (.scr are just renamed .exe's :graduated: ) then rightclick on it and select "Install".

In your script you can use $CmdLineRaw to check if the Config button or what is pressed.

Just use the following script, compile it and rename to .scr:

MsgBox(0,"",$CmdLineRaw)

Now install it and do some things like clicking Config then a MsgBox will been show with de parameters.

So, when you press Config and it show:

/config

/cofing means that config is pressed so:

If $CmdLineRaw = "/config" Then
;pressed config
ElseIf $CmdLineRaw = "/preview"
;preview code
EndIf

This is only a example, i think /config is not the right parameter but i have no time to test it at the moment B) .

Just check it with the first code.

(This one:)

MsgBox(0,"",$CmdLineRaw)

Hope it help you :o .


Sorry for my English, I'm Dutch... =DMedia UDFINet Adv UDF

Share this post


Link to post
Share on other sites

Thanks for all the suggestions. Sorry so late with the reply. Got hung up with other tasks.

Anywho, I had forgotten to install the desktop.bmp file in my original attempt where I had tried renaming the .exe to .scr. When it was suggested above that I rename the .exe to an .scr, I retraced my steps and realized the FileInstall mistake I made.

This does just was I want.

#include <GUIConstants.au3>

FileInstall("Desktop.bmp", "C:\Windows")

$MainGUI = GUICreate("",@DesktopWidth,@DesktopHeight,0,0,$WS_POPUP,$WS_EX_TOPMOST)
$Desktop = GUICtrlCreatePic("C:\Windows\Desktop.bmp",0,0,@DesktopWidth,@DesktopHeight)
HotKeySet("{ESC}", "Terminate");disabled if BlockInput is enabled

GUISetState()

GUISetState()
BlockInput(1)

While 1
    Sleep(1000)
WEnd

Func Terminate();disabled if BlockInput is enabled
    Exit 0
EndFunc

BlockInput(0)

BigDod,

Thanks for the topic suggestion and link. I'm reviewing it for possible use and find it pretty interesting.

Thanks all!!

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