TPaul81 Posted February 14, 2008 Share Posted February 14, 2008 (edited) Description:Different approach on boss screen applications.You need to have a screenshot of your desktop named cover.jpg in the same folder as the script for it to work.I use a screenshot of an open word document with business reports, lol.Works on Vista and XP fine.To Do:Mute sound while boss screen is active and restore it afterwards. Added. (My buddy's ScorpionXT suggestion, cause he does use it a lot for vids... )Add password Option.Known Bugs:- Pressing HOME while the boss screen is visible, will make removing the boss screen inaccessible. Pressing Ctrl + Alt +Esc does exit the script. Update: Fixed. - When Auto startup is selected, you have to manually copy the cover.jpg image for the boss screen in the startup folder. Update: Fixed. Script needs to be compiled and set fileinstall to the correct path of your cover.jpg .expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=Network.ico #AutoIt3Wrapper_outfile=BSScreen.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Comment=Boss Screen #AutoIt3Wrapper_Res_Description=Boss Screen hides your screen by using a previously taken snapshot. #AutoIt3Wrapper_Res_Fileversion=1.1.0.0 #AutoIt3Wrapper_Res_LegalCopyright=TPaul #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** Opt("GUIOnEventMode", 1) Opt("TrayIconHide", 0) Opt("TrayMenuMode",1) $settingsitem = TrayCreateMenu("Settings") $setautostart = TrayCreateItem("Autostart", $settingsitem) TrayCreateItem("") $aboutitem = TrayCreateItem("About") $exititem = TrayCreateItem("Exit") dim $coverOn dim $xBackGround = @DesktopWidth dim $yBackGround = @DesktopHeight dim $Looper1 = 1 dim $ScreenHide = 0 ;Pressing Ctrl - Alt - ESC exits the program HotKeySet("^!{ESC}", "Exit1") ;Pressing END clears the cover up screen HotKeySet("{END}", "Clear1") ;Pressing HOME splashes the cover up screen HotKeySet("{HOME}", "Cover1") Func Exit1() Exit EndFunc ;==>EXIT1 Func Clear1() If $ScreenHide = 1 Then GUIDelete($coverOn) Send("{VOLUME_MUTE}") $ScreenHide = 0 Sleep(100) EndIf EndFunc Func Cover1() If $ScreenHide = 0 Then $coverOn = GUICreate("Boss Screen v.1", @DesktopWidth, @DesktopHeight, 0, 0, 0x80000000 & 0x00040000) $BG_Default = GUICtrlCreatePic("cover.JPG", 0, 0, @DesktopWidth, @DesktopHeight, 0x0200) Send("{VOLUME_MUTE}") $ScreenHide = 1 GUISetState() Sleep(100) EndIf EndFunc Func AutostartOn() ;==> Startup functionality when script is compiled If Not FileExists(@StartupCommonDir & "\" & @ScriptName) Then FileCopy(@WorkingDir & "\" & @ScriptName, @StartupCommonDir & "\" & @ScriptName) EndIf EndFunc While $Looper1 <> 0 $msg = TrayGetMsg() Select Case $msg =0 Case $msg = $aboutitem Msgbox(64,"About:","Boss Screen v.1.1" & @CRLF & "Copyright TPaul - 2008") Case $msg = $exititem Exit Case $msg = $setautostart Call("AutostartOn") EndSelect $MOUSEPOS = MouseGetPos() Select Case $MOUSEPOS[0] = 0 And $ScreenHide=0 Call("Cover1") Case $MOUSEPOS[0] = 0 And $ScreenHide=1 Call("Clear1") EndSelect Sleep(100) WEnd Edited February 19, 2008 by TPaul81 My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
James Posted February 14, 2008 Share Posted February 14, 2008 When creating the GUI for the image add about 10px more just in case there are any traces of the GUI left Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
TPaul81 Posted February 14, 2008 Author Share Posted February 14, 2008 When creating the GUI for the image add about 10px more just in case there are any traces of the GUI left Tested it for almost a month with a nosy gf over my shoulder... No traces left, lol. My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
James Posted February 14, 2008 Share Posted February 14, 2008 But that isn't the same for everyone else. Why would you want to hide your screen from your GF hey? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
TPaul81 Posted February 14, 2008 Author Share Posted February 14, 2008 But that isn't the same for everyone else. Why would you want to hide your screen from your GF hey?BUSTED, hahahahahahahaha My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
Swift Posted February 14, 2008 Share Posted February 14, 2008 nice work...i changed it...a lil cuz bmp files are really accurate...and very good looking..so i saved it as a bmp...and changed it to: cover.bmp nice work Link to comment Share on other sites More sharing options...
Aassdd Posted February 17, 2008 Share Posted February 17, 2008 Swift is right, bmp is better when you can't save jpg images with 100% quality.... What if many programs (like paint) are blocked? You could add a hotkey to capture a quick screenshot with the _ScreenCapture command. PS: milas ellinika? Link to comment Share on other sites More sharing options...
TPaul81 Posted February 17, 2008 Author Share Posted February 17, 2008 Swift is right, bmp is better when you can't save jpg images with 100% quality.... What if many programs (like paint) are blocked? You could add a hotkey to capture a quick screenshot with the _ScreenCapture command.PS: milas ellinika?I chose .jpg as the demo image format for the code for a couple of reasons... First of all when loaded in the ram it has a smaller signature and at some time when I originally wrote the script, I did need the smaller signature. Then its easier for me to save a screenshot using .jpg with 80% compression which has a good look.PS: Nai, milao. My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
James Posted February 17, 2008 Share Posted February 17, 2008 bmp also makes big files! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
TPaul81 Posted February 17, 2008 Author Share Posted February 17, 2008 bmp also makes big files!My point exactly. And once this is loaded in the gui you you can see how much difference there is in the taskmanager in the ram usage. My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
James Posted February 17, 2008 Share Posted February 17, 2008 Yeah. If you are really so desperate to use .bmp try: Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc ;==>_ReduceMemory Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JustinReno Posted February 17, 2008 Share Posted February 17, 2008 For making it mute use SoundSetWaveVolume(0) and then to get it back SoundSetWaveVolume(100). Link to comment Share on other sites More sharing options...
WolfWorld Posted February 18, 2008 Share Posted February 18, 2008 Can we also use png ?? , because i felt png is the best for viewing and editing Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
TPaul81 Posted February 18, 2008 Author Share Posted February 18, 2008 (edited) Can we also use png ?? , because i felt png is the best for viewing and editingAutoIt doesnt support PNG images, as far as I know. Also PNG images arent the best for 2 reasons:1. PNG-24bit have the quality of uncompressed vectorised JPG = JPG 90%-100% QUALITY2. PNG-24bit are BIG BIG BIG FILES, almost as big as BMP.3. PNG-8bit are not even worth mentioning, since all they support are 256 colors max, just like a GIF, so the fake screen wouldnt look convincing.So, I'd suggest that if you dont like JPG's, use BMP and James' memory reduction function. Edited February 18, 2008 by TPaul81 My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
crzftx Posted February 18, 2008 Share Posted February 18, 2008 the jpg did use less RAM then the bmp. About 7% less. The jpg used 15.5 MB and the bmp used 16.6. It's really not enough to worry about. Link to comment Share on other sites More sharing options...
TPaul81 Posted February 18, 2008 Author Share Posted February 18, 2008 the jpg did use less RAM then the bmp. About 7% less. The jpg used 15.5 MB and the bmp used 16.6. It's really not enough to worry about.Depends on the size of the image. The .jpg im using is just 800k and the same .bmp is 3.4 mb. Which ones makes a difference? My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
JustinReno Posted February 18, 2008 Share Posted February 18, 2008 AutoIt doesnt support PNG images, as far as I know. Also PNG images arent the best for 2 reasons:1. PNG-24bit have the quality of uncompressed vectorised JPG = JPG 90%-100% QUALITY2. PNG-24bit are BIG BIG BIG FILES, almost as big as BMP.3. PNG-8bit are not even worth mentioning, since all they support are 256 colors max, just like a GIF, so the fake screen wouldnt look convincing.So, I'd suggest that if you dont like JPG's, use BMP and James' memory reduction function.1. PNG's don't have the quality of JPG, you have to be kidding?2. No they aren't, have you even looked at a PNG?This PNG is 133KB: Link to comment Share on other sites More sharing options...
Swift Posted February 18, 2008 Share Posted February 18, 2008 Very nice picture Justin...your desktop sucks And that png is EXTREMELY CLEAR for me. Link to comment Share on other sites More sharing options...
JustinReno Posted February 18, 2008 Share Posted February 18, 2008 I made it using the {PRINTSCREEN} button! Link to comment Share on other sites More sharing options...
TPaul81 Posted February 18, 2008 Author Share Posted February 18, 2008 I will try to explain, probably got misunderstood because english isnt my native language. 1.& 2. A png 24-bit is not compressed. A jpg is by definition compressed, thus we use the compression ratio of a jpg as a quality index. A jpg and a png containing the exact same image with the exact same dimensions would have different sizes and the png would be bigger. Try it in Adobe Photoshop. Because PNG's are not compressed they are bigger and THEY DO have better quality, which comes from their bigger size. My Scripts (so far)Myspace Layout EditorAnother Boss ScreenClipboard Collector Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now