Jump to content

Screen Flicker


Recommended Posts

#include <GuiConstants.au3>

Func GoBlack()

$width = Width of your screen

$height = Height of your screen

GuiCreate("black screen", $width, $height, 0, 0, $WS_POPUP)

GuiSetState()

GuiSetBkColor(000000)

Sleep(1000)

EndFunc

And just call the function when you want

Link to comment
Share on other sites

I'm getting confused here, how do you call a function?

-Bob

Edit: Well, I know how to call a function with a hot key, but I just want it to happen during the program.

Edit 2: Actually, I have an idea.

Edit 3: How Do I close it so I can call it again if I want?

Edited by BobTheLeetHaxx0r
Photoshop User and Noob AutoIt user.
Link to comment
Share on other sites

There is something called helpfile but

#include <GuiConstants.au3>

MsgBox(0, "Func", "Now I'm gonna call a function")

GoBlack()

MsgBox(0, "End", "I called a function")

Func GoBlack()
$width = Width of your screen
$height = Height of your screen
GuiCreate("black screen", $width, $height, 0, 0, $WS_POPUP)
GuiSetState()
GuiSetBkColor(000000)
Sleep(1000)
EndFunc
Edited by Kreatorul
Link to comment
Share on other sites

there is a way to turn the monitor off then on, and it is used in Office Poltergeist...one moment please.......

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Ok,

put this at the top of your script:

Opt("WinTitleMatchMode", 4)
Global $DllHWND = WinGetHandle("classname=Progman")oÝ÷ Ù8Z¶¬¶(jÛazÚ)N§Êj{¬zØb²Ú-º¹â¶ßjëh×6DllCall("user32.dll", "int", "SendMessage", "hwnd", $DllHWND, "int", 274, "int", 61808, "int", 2)

There you go ;)

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Ok,

put this at the top of your script:

Opt("WinTitleMatchMode", 4)
Global $DllHWND = WinGetHandle("classname=Progman")oÝ÷ Ù8Z¶¬¶(jÛazÚ)N§Êj{¬zØb²Ú-º¹â¶ßjëh×6DllCall("user32.dll", "int", "SendMessage", "hwnd", $DllHWND, "int", 274, "int", 61808, "int", 2)

There you go ;)

Godleh!

Thanks both of you :lmao:

-Bob

Photoshop User and Noob AutoIt user.
Link to comment
Share on other sites

Ok,

put this at the top of your script:

Opt("WinTitleMatchMode", 4)
Global $DllHWND = WinGetHandle("classname=Progman")oÝ÷ Ù8Z¶¬¶(jÛazÚ)N§Êj{¬zØb²Ú-º¹â¶ßjëh×6DllCall("user32.dll", "int", "SendMessage", "hwnd", $DllHWND, "int", 274, "int", 61808, "int", 2)oÝ÷ Ù8^­ì¨º
?ªê-xz0r¶¬Â䱫­¢+Ø(í±­¸Íɸ)=ÁÐ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°Ð¤)±½°ÀÌØí±±!]9ô]¥¹Ñ!¹± ÅÕ½Ðí±Í͹µõAɽµ¸ÅÕ½Ðì¤()±±
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíM¹5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí±±!]9°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÈÜаÅÕ½Ðí¥¹ÐÅÕ½Ðì°ØÄàÀà°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°È¤()M±À ÄÔÀÀÀ¤()±±
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíM¹5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí±±!]9°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÈÜаÅÕ½Ðí¥¹ÐÅÕ½Ðì°ØÄàÀà°ÅÕ½Ðí¥¹ÐÅÕ½Ð찴Ĥ(oÝ÷ Ø   ݶ¬v¬mzË^u¨v§w
+Çâ®Ëmg¨½êò¢Ø^®Ø¦zØ^±ÊÞz{{()åzË-©÷±ç(Û'z÷«)ݲ¢wÇ­zËbµ©Ý±ç°«mìwb¶+÷Þ­éíy§!¶)!Ƨkzèv綺®¶­s`£¶&Æ6¶Vâ67&VVà¤÷BgV÷CµvåFFÆTÖF6ÖöFRgV÷C²ÂB¤vÆö&Âb33c´FÆÄtäBÒvävWDæFÆRgV÷C¶6Æ76æÖSÕ&övÖâgV÷C² ¤×6t&÷b33²b33²Âb33²b33²Âb33´vöærFòGW&â67&VVâöfbb33²³²F22FRöæÇFffW&Væ6Rââà  ¤FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6VæDÖW76vRgV÷C²ÂgV÷C¶væBgV÷C²Âb33c´FÆÄtäBÂgV÷C¶çBgV÷C²Â#sBÂgV÷C¶çBgV÷C²ÂcÂgV÷C¶çBgV÷C²Â" ¥6ÆVWS ¤FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6VæDÖW76vRgV÷C²ÂgV÷C¶væBgV÷C²Âb33c´FÆÄtäBÂgV÷C¶çBgV÷C²Â#sBÂgV÷C¶çBgV÷C²ÂcÂgV÷C¶çBgV÷C²ÂÓ

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

that's wierd...it works every time in office poltergeist...although of course they use variables, but that should make no difference...

here is the func directly from office poltergeist:

func screenFlicker()
  Opt("WinTitleMatchMode", 4)
  $WM_SYSCommand = 274
  $SC_MonitorPower = 61808
  $Power_On = -1
  $Power_Off = 2
  $X = 1
  $HWND = WinGetHandle("classname=Progman")
  DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off)
  DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_On)
endFunc

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

  • 4 months later...

or you could use

ON =

DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle("classname=Progman"), "int", 274, "int", 61808, "int", 2)

OFF =

DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle("classname=Progman"), "int", 274, "int", 61808, "int", -1)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...