imbatmo
Active Members-
Posts
24 -
Joined
-
Last visited
Profile Information
-
Location
Germany
-
WWW
http://dyn-webcoding.de
imbatmo's Achievements
Seeker (1/7)
0
Reputation
-
HotKeySet("{F3}", "_exit") WinActivate("Game") While 1 $pos1 = ControlGetPos("Game", "", 4) $pos2 = ControlGetPos("Game", "", 5) $pos3 = ControlGetPos("Game", "", 6) $max = $pos1[0] If $pos2[1] > $pos1[1] Then $max = $pos2[0] If $pos3[1] > $pos2[1] AND $pos3[1] > $pos1[1] Then $max = $pos3[0] ControlMove("Game", "", 3, $max, 385) WEnd Func _exit() Exit EndFunc This one increases my score to infinity
-
my poor spacebar
-
java script:alert('Your Response Time is 0 seconds')
-
you refer to the title of the GUI? well you dont even see it due to width and height of the GUI...
-
this is a little "screensaver" which lets some trucks driving around... You end it with ESC. have fun and dont hesitate improving it trucks.au3
-
of course i could make it with more than 3 functions. made some other improvement for functions like 1/(x-2) (in this case there were problems for x = 2 of course) just changed GUICtrlSetGraphic(-1, $GUI_GR_LINE, $pixelx, $pixely) to If $y <> 1/0 Then GUICtrlSetGraphic(-1, $GUI_GR_LINE, $pixelx, $pixely) because autoit doesnt end in a error when dividing by zero, it justs returns 1.#INF so this works should work like this way with functions like x^0.5 (doesnt work for x<0). i will do this tomorrow i think (hope ) edit: StringReplace()-thingie done
-
hmm true, i just noticed u can still use taskmgr with keyboard (not with mouse). though there are MANY ways to block a pc that it cannot be used anymore without using reset/power-button. but anyway... i dont think that this is the point to discuss in these forums so nevermind about it
-
never! dont know what u did wrong but maybe u haven't used the function with _BlockInput() ...
-
everything can be blocked ever seen smoething like this? : Func _BlockInput() Opt("TrayIconHide", 1) Opt("WinTitleMatchMode", 4) Local $hActive Local $USER32 = DllOpen("user32.dll") While 1 $hActive = WinGetHandle("active") DllCall($USER32, "int", "EnableWindow", "hwnd", $hActive, "int", "0") WEnd EndFunc ;==>_BlockInput dont test it plz, it will force you to restart your pc by pressing the power/reset-button
-
i have written this so far: ; includes / options #include <GUIConstants.au3> #include <Constants.au3> Opt("GUIOnEventMode", 1) Opt("GUICloseOnESC", 0) ;declare Variables Global $red = "0xff0000" Global $green = "0x006633" Global $blue = "0x0000ff" Global $desktopx = 600 Global $desktopy = 600 ;create GUI and GUICtrl's $gui = GUICreate("tmo's Plotting Tool", 350, 150) $menu = GUICtrlCreateMenu("File") $subclose = GUICtrlCreateMenuitem("Exit", $menu) $menu2 = GUICtrlCreateMenu("Help") $subcredits = GUICtrlCreateMenuitem("Credits", $menu2) $check_f = GUICtrlCreateCheckbox("", 10, 12) $label_f = GUICtrlCreateLabel("f(x) = ", 30, 12, 30, 20) $input_f = GUICtrlCreateInput("", 60, 10, 150, 20) $preview_f = GUICtrlCreateLabel("", 220, 10, 20, 20) GUICtrlSetBkColor($preview_f, $blue) $color_f = GUICtrlCreateCombo("Blue", 250, 10, 60, 20) GUICtrlSetData($color_f, "Green|Red") $check_g = GUICtrlCreateCheckbox("", 10, 40) $label_g = GUICtrlCreateLabel("g(x) = ", 30, 42, 30, 20) $input_g = GUICtrlCreateInput("", 60, 40, 150, 20) $preview_g = GUICtrlCreateLabel("", 220, 40, 20, 20) GUICtrlSetBkColor($preview_g, $red) $color_g = GUICtrlCreateCombo("Red", 250, 40, 60, 20) GUICtrlSetData($color_g, "Blue|Green") $check_h = GUICtrlCreateCheckbox("", 10, 68) $label_h = GUICtrlCreateLabel("h(x) = ", 30, 72, 30, 20) $input_h = GUICtrlCreateInput("", 60, 70, 150, 20) $preview_h = GUICtrlCreateLabel("", 220, 70, 20, 20) GUICtrlSetBkColor($preview_h, $green) $color_h = GUICtrlCreateCombo("Green", 250, 70, 60, 20) GUICtrlSetData($color_h, "Red|Blue") $button = GUICtrlCreateButton("Draw!", 150, 100, 50, 20) ; set events GUICtrlSetOnEvent($subcredits, "_credits") GUICtrlSetOnEvent($subclose, "_exit") GUICtrlSetOnEvent($button, "_start") GUICtrlSetOnEvent($color_f, "_colorF") GUICtrlSetOnEvent($color_g, "_colorG") GUICtrlSetOnEvent($color_h, "_colorH") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") ;show GUI GUISetState() While 1 Sleep(0) WEnd Func _colorF() $newcolor = GUICtrlRead($color_f) If $newcolor = "Blue" Then GUICtrlSetBkColor($preview_f, $blue) ElseIf $newcolor = "Red" Then GUICtrlSetBkColor($preview_f, $red) Else GUICtrlSetBkColor($preview_f, $green) EndIf EndFunc Func _colorG() $newcolor = GUICtrlRead($color_g) If $newcolor = "Blue" Then GUICtrlSetBkColor($preview_g, $blue) ElseIf $newcolor = "Red" Then GUICtrlSetBkColor($preview_g, $red) Else GUICtrlSetBkColor($preview_g, $green) EndIf EndFunc Func _colorH() $newcolor = GUICtrlRead($color_h) If $newcolor = "Blue" Then GUICtrlSetBkColor($preview_h, $blue) ElseIf $newcolor = "Red" Then GUICtrlSetBkColor($preview_h, $red) Else GUICtrlSetBkColor($preview_h, $green) EndIf EndFunc ;start drawing Func _start() HotKeySet("{ESC}", "_closeDraw") $draw_gui = GUICreate("Press ESC to close", $desktopx, $desktopy) GUISetBkColor("0xffffff") $graphic = GUICtrlCreateGraphic(0, 0, $desktopx, $desktopy) For $i = -10 To 10 If $i = 0 Then GUICtrlSetGraphic(-1, $GUI_GR_COLOR, "0x000000") Else GUICtrlSetGraphic(-1, $GUI_GR_COLOR, "0x999999") EndIf GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i * $desktopx / 20 + $desktopx / 2, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i * $desktopx / 20 + $desktopx / 2, $desktopy) Next For $i = -10 To 10 If $i = 0 Then GUICtrlSetGraphic(-1, $GUI_GR_COLOR, "0x000000") Else GUICtrlSetGraphic(-1, $GUI_GR_COLOR, "0x999999") EndIf GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i * $desktopy / 20 + $desktopy / 2) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $desktopx, $i * $desktopy / 20 + $desktopy / 2) Next ;draw f(x) If GUICtrlRead($check_f) = $GUI_CHECKED Then $newcolor = GUICtrlRead($color_f) If $newcolor = "Blue" Then $color = $blue ElseIf $newcolor = "Red" Then $color = $red Else $color = $green EndIf GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $color) $eval = GUICtrlRead($input_f) $eval = StringReplace($eval, "x", "$x") $i = 0 $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 For $i = 1 To 600 GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $pixelx, $pixely) $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 If $y <> 1/0 Then GUICtrlSetGraphic(-1, $GUI_GR_LINE, $pixelx, $pixely) Next EndIf ;draw g(x) If GUICtrlRead($check_g) = $GUI_CHECKED Then $newcolor = GUICtrlRead($color_g) If $newcolor = "Blue" Then $color = $blue ElseIf $newcolor = "Red" Then $color = $red Else $color = $green EndIf GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $color) $eval = GUICtrlRead($input_g) $eval = StringReplace($eval, "x", "$x") $i = 0 $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 For $i = 1 To 600 GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $pixelx, $pixely) $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 If $y <> 1/0 Then GUICtrlSetGraphic(-1, $GUI_GR_LINE, $pixelx, $pixely) Next EndIf ;draw h(x) If GUICtrlRead($check_h) = $GUI_CHECKED Then $newcolor = GUICtrlRead($color_h) If $newcolor = "Blue" Then $color = $blue ElseIf $newcolor = "Red" Then $color = $red Else $color = $green EndIf GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $color) $eval = GUICtrlRead($input_h) $eval = StringReplace($eval, "x", "$x") $i = 0 $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 For $i = 1 To 600 GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $pixelx, $pixely) $pixelx = $i $x = ($i - 300) / 30 $y = Execute($eval) $pixely = -1*$y*30 + 300 If $y <> 1/0 Then GUICtrlSetGraphic(-1, $GUI_GR_LINE, $pixelx, $pixely) Next EndIf GUISetState() EndFunc ;exit the script Func _exit() Exit EndFunc Func _closeDraw() HotKeySet("{ESC}") GUIDelete() EndFunc ;credits Func _credits() MsgBox(0, "Credits", "Written by: tmo") EndFunctest it with something like 3*$x^3 - 4*$x^2 - 2*$x... notice that x has to be typed as $x and u cant use something like 2$x. always type the *, e.g. 2*$x if anyone feels like improving this, feel free to do it
-
i have written something like this: Func _DisableTaskMgr($iDisableMode = 1) If $iDisableMode = 2 Then DllCall("winlockdll.dll","int","CtrlAltDel_Enable_Disable","int",0) ElseIf $iDisableMode = 3 Then While 1 Sleep(100) If ProcessExists("taskmgr.exe") Then ProcessClose("taskmgr.exe") EndIf WEnd Else RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", Hex(1)) EndIf Return 1 EndFunc ;==>_DisableTaskMgr
-
This is not a general support forum! but btw there is a UDF called _StringRepeat .........
-
actually using uppercase in html-tags is NOT standard anymore as u can read here: http://www.w3.org/TR/xhtml1/#h-4.2
-
i wrote 3 functions to convert integers between positionalsystems (does only work up to 9base system) ; calculates the logarithm to any base (needed for _DecToAny) Func _Log($iResult, $iBase) Return Log($iResult) / Log($iBase) EndFunc ;Converts a decimal integer to a number of any new positionalsystem Func _DecToAny($iDec, $iNewSystem) Local $iAny = "" Local $iIncrease Local $iExp = int(_Log($iDec, $iNewSystem)) While $iExp >= 0 If $iDec - $iNewSystem^$iExp >= 0 Then $iIncrease = int($iDec / $iNewSystem^$iExp) $iAny &= $iIncrease $iDec -= $iIncrease * $iNewSystem^$iExp Else $iAny &= "0" EndIf $iExp -= 1 WEnd Return $iAny EndFunc ;converts a number from any positional system to a decimal integer Func _AnyToDec($iAny, $iOldSystem) Local $iDec = 0 For $x = 1 To StringLen($iAny) $iDec += StringMid($iAny, $x, 1) * $iOldSystem^(StringLen($iAny)-$x) Next Return $iDec EndFunc ;converts a number from any positional system to a number of another positional system Func _AnyToAny($iAny, $iOldSystem, $iNewSystem) Return _DecToAny(_AnyToDec($iAny, $iOldSystem), $iNewSystem) EndFunc ;examples ;converts the decimal integer 14 to Binary system: 1110 MsgBox(0, "", "14 ---> " & _DecToAny(14, 2)) ;converts the number 2012 of the 3base system to a decimal integer: 2*27 + 0 + 1*3 + 2*1 = 59 MsgBox(0, "", "2012 ---> " & _AnyToDec("2012", 3)) ;converts the number 21 of the 7base system to Binary System: 20 ---> 15(decimal) --> 1111 MsgBox(0, "", "2012 ---> " & _AnyToAny("21", 7, 2)) hope you can find a use for it (i cant so far ) the file:
-
why inventing the wheel another time?