Jump to content

TriCk

Members
  • Posts

    4
  • Joined

  • Last visited

TriCk's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. It says Func _IsPressed($sHexKey, $vDLL = 'user32.dll') ERROR: _IsPressed() already defined from the file IsPressed_UDF. LINE: 288I also got an error with the "What you've done today" program you wrote.
  2. Hello, I am creating a key counter for a friend to measure actions per second, I've been stuck on this for quite some time and have been looking for some solutions. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> global $mouseCount global $keyCount global $isEnabled global $timeEnabled global $roundedKey global $roundedMouse global $roundedTotal global $Label1 ShowGUI() TimeEnabled() while 1 global $dll = DllOpen("user32.dll") if _IsPressed("01", $dll) or _IsPressed("02", $dll) then CountMouse() if _IsPressed("41", $dll) or _IsPressed("42", $dll) or _IsPressed("43", $dll) or _IsPressed("44", $dll) or _IsPressed("45", $dll) or _IsPressed("46", $dll) or _IsPressed("47", $dll) or _IsPressed("48", $dll) or _IsPressed("49", $dll) or _IsPressed("4A", $dll) or _IsPressed("4B", $dll) or _IsPressed("4C", $dll) or _IsPressed("4D", $dll) or _IsPressed("4E", $dll) or _IsPressed("4F", $dll) or _IsPressed("50", $dll) or _IsPressed("51", $dll) or _IsPressed("52", $dll) or _IsPressed("53", $dll) or _IsPressed("54", $dll) or _IsPressed("55", $dll) or _IsPressed("56", $dll) or _IsPressed("57", $dll) or _IsPressed("58", $dll) or _IsPressed("59", $dll) or _IsPressed("5A", $dll) then CountKey() WEnd Func Enabled() if $isEnabled = 0 Then $isEnabled = 1 TimeEnabled() else $isEnabled = 0 EndIf EndFunc Func TimeEnabled() Sleep(1000) $timeEnabled = $timeEnabled + 1 TimeEnabled() Average() EndFunc Func CountKey() if $isEnabled = 1 Then $keyCount = $keyCount + 1 EndIf EndFunc Func CountMouse() if $isEnabled = 1 Then $mouseCount = $mouseCount + 1 EndIf EndFunc Func Average() $keyAverage = $timeEnabled / $keyCount $mouseAverage = $timeEnabled / $mouseCount $totalAverage = ($keyCount + $mouseCount) / $timeEnabled $roundedKey = Round($keyAverage,0) $roundedMouse = Round($mouseAverage,0) $roundedTotal = Round($totalAverage,0) GUICtrlSetData($Label1, "KPS: " & $roundedKey & " MPS: " & $roundedMouse & " TPS: " & $roundedTotal) EndFunc Func ShowGUI() $Form1 = GUICreate("Key Counter by AlwaysUltra", 201, 101, 192, 124, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), 0) GUISetBkColor(0xC0C0C0) GUICtrlSetFont(-1, 10, 600, 0, "Segoe UI") GUICtrlSetColor(-1, 0xFF0000) $Label1 = GUICtrlCreateLabel("KPS: "&$roundedKey&" MPS: "& $roundedMouse & " TPS: " &$roundedTotal, 0, 8, 196, 17) $Button1 = GUICtrlCreateButton("Toggle", 0, 72, 75, 25) $Button2 = GUICtrlCreateButton("Exit", 120, 72, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button2 Exit Case $Button1 Enabled() EndSwitch WEnd EndFunc I tried switching up the function enabled by calling TimeEnabled() at the beginning of the program, but that didn't seem to work either. Thank you so much for reading over this, I appreciate it.
  3. Hello, first post here, I am writing my first script for a program and I am in need of help, I've looked at several posts but the only thing that I found that did work was to create events that called functions, however, it disables all case functions and switch functions which is a problem for the rest of the script. right now, if you click on say... Status Menu under Open. It will open it, great, however, then I'll try to press log out or INI Editor, it won't work. here is the script. I also do have all the correct dependencys. This post should now follow the rules, if it doesn't tell me why. Thanks! <Removed>
  4. Hello, first post here, I am writing my first script for a video game and I am in need of help, I've looked at several posts but the only thing that I found that did work was to create events that called functions, however, it disables all case functions and switch functions which is a problem for the rest of the script. right now, if you click on say... Status Menu under Open. It will open it, great, however, then I'll try to press log out or INI Editor, it won't work. here is the script. I also do have all the correct dependencys. Thanks! <Removed>
×
×
  • Create New...