Jump to content
Sign in to follow this  
sumkid

impossible test - my first program

Recommended Posts

sumkid

While 1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
Select
   Case $iMsgBoxAnswer = 1;OK

   Case $iMsgBoxAnswer = 2;Cancel

       if $iMsgBoxAnswer = 1 Then
        EndIf
       if $iMsgBoxAnswer = 1 Then
       EndIf
EndSelect
WEnd

this will keep on popping up. to close it right click on the icon in the system tray and click exit and then click a button :)

and the code to enable the task manager again

While 1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "0")
Sleep(100)
Exit
WEnd

enjoy :P

Edited by sumkid

Share this post


Link to post
Share on other sites
Generator

Whats the use of this? :)

Share this post


Link to post
Share on other sites
sumkid

to annoy someone and/or get back at them :)

Share this post


Link to post
Share on other sites
idusy

While 1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
Select
   Case $iMsgBoxAnswer = 1;OK

   Case $iMsgBoxAnswer = 2;Cancel

       if $iMsgBoxAnswer = 1 Then
        EndIf
       if $iMsgBoxAnswer = 1 Then
       EndIf
EndSelect
WEnd

The script is much longer then it has to be.

While 1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1") ; Can easily be shortened and only disable while script is running.
Dim $iMsgBoxAnswer ; Unneeded
$iMsgBoxAnswer = MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
Select; Whole Select does nothing
   Case $iMsgBoxAnswer = 1;OK

   Case $iMsgBoxAnswer = 2;Cancel

       if $iMsgBoxAnswer = 1 Then ;These also do nothing; Can be removed.
        EndIf
       if $iMsgBoxAnswer = 1 Then
       EndIf
EndSelect
WEndoÝ÷ Ù)bqçZ×bqçZºÚ"µÍÚ[HBYØÙÜÑ^ÝÊÚÓYÜ^JH[ØÙÜÐÛÜÙJÚÓYÜ^JBÙÐÞ
MË ][ÝÒ[ÜÜÚXHÝ   ][ÝË  ][ÝÜÜÈÚÈÈZÙHH[ÜÜÚXHÝ    ][ÝÊBÑ[

Share this post


Link to post
Share on other sites
Nahuel

Sliced and diced:

While 1
If ProcessExists(TaskMgr.exe) Then ProcessClose(TaskMgr.exe)
MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
WEnd
haha, yeah... but you missed the quote marks on "TaskMgr.exe"

While 1
If ProcessExists("TaskMgr.exe") Then ProcessClose("TaskMgr.exe")
MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
WEnd

Share this post


Link to post
Share on other sites
idusy

haha, yeah... but you missed the quote marks on "TaskMgr.exe"

While 1
If ProcessExists("TaskMgr.exe") Then ProcessClose("TaskMgr.exe")
MsgBox(257,"Impossible Test","press ok to take the Impossible Test")
WEnd

Right. I've been away from my computer for three days, excuse my little syntax errors.

Also, I was bored...

Opt("TrayMenuMode",1)
$Ok=TrayCreateItem("OK to Take The Impossible Test")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
Do
MsgBox(257,"Impossible Test","Press OK to Take The Impossible Test")
Until TrayGetMsg() = $Ok

MsgBox(0,"Congratulations!","You win!")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "0")

Only problem is MsgBoxes pause the script, so the tray msg isn't registered right away (Or something.)

Edited by idusy

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  

×