ihenvyr Posted April 15, 2006 Share Posted April 15, 2006 HELLO everyone!! i have 3 scripts.. Keyboard script - hotkey which disable some keyboard keys mouse script - which has a mouse trap script Timer script - hotkey which has a start and countdown timer.. when timer gets zero, some keyboard keys will be disabled and mouse will be mousetrapped when you add time, keyboard keys will be enabled and mouse will be free to move again.. is it possible to merge all the 3 script? i have no experience about merging or joining script.. any ideas or advice.. for me to work with? here is my script: Timer script: expandcollapse popupHotKeySet("{HOME}", "add4Min") Dim $min = 0, $sec = 60, $start = False, $first_S = False, $finish_S = False Func add4Min() If $first_S = False Then $min += 4 $first_S = True $start = True ; script to enable mouse and keyboard Else $min += 4 $start = True EndIf $finish_S = False EndFunc While 1 If $finish_S = False Then If $start = True Then $sec -= 1 If $sec = 0 Then $sec = 59 If $min = 0 Then $finish_S = True ;script to disable mouse and keyboard EndIf $min -= 1 EndIf ToolTip('' & StringFormat('%i:%i', $min, $sec), 0, 0) Else ToolTip('' & StringFormat('%i:%i', 0, 0), 0, 0) EndIf Else ToolTip('' & StringFormat('%i:%i TIMED OUT', 0, 0), 0, 0) $first_S = False EndIf Sleep(1000) WEnd keyboard script: ;Other HotKeySet("a", "OtherA") HotKeySet("{UP}", "OtherUP") HotKeySet("{ENTER}", "OtherENTER") While 1 Sleep(10) WEnd ;Other Func OtherA() Send("") EndFunc Func OtherUP() Send("") EndFunc Func OtherENTER() Send("") EndFunc mouse script: #include <Misc.au3> HotKeySet("{PGUP}", "TerminateMouseTrap") While 1 _MouseTrap(100, 100, 100, 100) Sleep(100) WEnd Func TerminateMouseTrap() _MouseTrap() Exit EndFunc Umbrella Member Link to comment Share on other sites More sharing options...
exodius Posted April 15, 2006 Share Posted April 15, 2006 HELLO everyone!! i have 3 scripts..Keyboard script - hotkey which disable some keyboard keysmouse script - which has a mouse trap scriptTimer script - hotkey which has a start and countdown timer..when timer gets zero, some keyboard keys will be disabled and mouse will be mousetrappedwhen you add time, keyboard keys will be enabled and mouse will be free to move again..is it possible to merge all the 3 script?i have no experience about merging or joining script..any ideas or advice.. for me to work with? Since the bulk of your three individual scripts are clustered in functions anyways, you can just put them all in one script without interferring with each other. Then you just need to specify the criteria for each of those functions being called... If it makes it easier, you could put the criteria that exists in each individual script into their own respective functions.. Would make things easier to keep straight. Link to comment Share on other sites More sharing options...
ihenvyr Posted April 15, 2006 Author Share Posted April 15, 2006 (edited) criteria? i've search criteria on the help file, but i failed.. there is no specific example to begin with my/this script.. may be an example will be much helpful .. anybody here knows about merging/joining scripts? please help.. thanks for ur time.. Edited April 15, 2006 by ihenvyr Umbrella Member Link to comment Share on other sites More sharing options...
Simucal Posted April 15, 2006 Share Posted April 15, 2006 criteria? i've search criteria on the help file, but i failed..there is no specific example to begin with my/this script..omg, this has had me almost rolling on the ground. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 15, 2006 Share Posted April 15, 2006 omg, this has had me almost rolling on the ground. Hi, me too. Try this: expandcollapse popup#include <Misc.au3> HotKeySet("{PGUP}", "TerminateMouseTrap"); the backdoor for disableing the mouseTrap. HotKeySet("t", "add4Min") HotKeySet("{F2}", "end") Dim $min = 0, $sec = 60, $start = False, $first_S = False, $finish_S = False While 1 If $finish_S = False Then If $start = True Then $sec -= 1 If $sec = 0 Then $min -= 1 If $min = 0 Then $finish_S = True MouseTrap() HotKeySet("a", "doNothing") HotKeySet("{UP}", "doNothing") HotKeySet("{ENTER}", "doNothing") EndIf $sec = 59 EndIf ToolTip('TIME LEFT: ' & StringFormat('%i minute(s) and %i second(s)', $min, $sec), 0, 0) Else ToolTip('TIME LEFT: ' & StringFormat('%i minute(s) and %i second(s)', 0, 0), 0, 0) EndIf Else ToolTip('TIME LEFT: ' & StringFormat('%i minute(s) and %i second(s) - FINISHED!!!', 0, 0), 0, 0) $first_S = False EndIf Sleep(5) WEnd Func add4Min() TerminateMouseTrap() HotKeySet("a") HotKeySet("{UP}") HotKeySet("{ENTER}") If $first_S = False Then $min += 3 $first_S = True $start = True Else $min += 4 $start = True EndIf $finish_S = False EndFunc ;==>add4Min Func MouseTrap() _MouseTrap(100, 100, 100, 100) EndFunc ;==>MouseTrap Func TerminateMouseTrap() _MouseTrap() EndFunc ;==>TerminateMouseTrap Func doNothing() EndFunc ;==>doNothing Func end() Exit (0) EndFunc ;==>end Func OnAutoItExit() TerminateMouseTrap() EndFunc ;==>OnAutoItExit So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Confuzzled Posted April 18, 2006 Share Posted April 18, 2006 Since the bulk of your three individual scripts are clustered in functions anyways, you can just put them all in one script without interferring with each other. Then you just need to specify the criteria for each of those functions being called... If it makes it easier, you could put the criteria that exists in each individual script into their own respective functions.. Would make things easier to keep straight. From the user guide (Functions):User FunctionsUser functions are declared using the Func...EndFunc statements.Functions can accept parameters and return values as required. Yes, I know, not everybody has English (or AutoIT) as their first language. Maybe the translator should have translated criteria as parameter. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now