Jump to content

Recommended Posts

Posted

Hi

Anyone knows if it is a way to make a script to exit after the "01" buttom is pressed 10 times?

I have been trying to find a better way, earlier i used:

Hotkeyset("{""}), "terminate")

func terminate()

exit

EndFunc

to exit but often it doesn't work.

Posted (edited)

not to sound confused nor a jerk here, but your code and post have the following issues:

1. There is no 01 key. There is a 1 and a 0, but not a 01.

2. If you are using _ispressed, then we need to see all your code, not just the snippit to see the problem.

3. You could use the following to solve your problem:

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc
Edited by Volly
Posted

I have been useing Hotkeyset before but sometimes the Hotkey does not respond.

CODE
#include <misc.au3>

Do

processclose("taskmgr.exe")

if _ispressed("01") Then

mousemove(1,1,0)

EndIf

until

The script is really simple and it's not finished, I have been trying to find a function that exit the script after i have clicked the left mousebutton a couple of times instead of useing keys to exit.

Is there a way to do it?

Posted (edited)

It's just a fun but enoying script,

it move the mouse to the upper right corner everytime left mouse button is pressed and blocks taskmanager.exe so it's hard to exit the script without knowing how to do it.

Edited by matumbo
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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