Jump to content

impossible test - my first program


sumkid
 Share

Recommended Posts

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
Link to comment
Share on other sites

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Ñ[
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
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...