killmenext Posted August 9, 2009 Share Posted August 9, 2009 Hello, I am looking for a way to run my script on a window that is not focused, so I can still utilize the computer for other tasks while my script is running. Is this possible? Thanks, Killmenext Link to comment Share on other sites More sharing options...
egymma Posted August 9, 2009 Share Posted August 9, 2009 (edited) if you mean send keys to unactivated window then you should see ControlClick , ControlSend . good luck, Edited August 9, 2009 by egymma [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list] Link to comment Share on other sites More sharing options...
killmenext Posted August 9, 2009 Author Share Posted August 9, 2009 if you mean send keys to unactivated window then you should see ControlClick , ControlSend . good luck, I tried to look it up but I dont exactly understand the syntax of its usage. If I may, I will post the code and if you could demonstrate a little on how to actually use the code, I would be great appreciative. I will just follow your lead to complete the rest. the window name is "Darkfall Online" and it is darkfall.exe expandcollapse popup; Lesser Magic Leveling Macro With Weapon Refresh. ; Rewritten and Modified By MostHated ; Original by Ices ; 2009 Dim $Variable, $MM, $Rest, $MMhotkey, $SelfHealHotkey, $RestHotKey, $StaffHotkey, $OtherWeapon Global $Paused HotKeySet("`", "TogglePause") HotKeySet("{DEL}", "Terminate") $MM = ( "18" ) ; Number of Mana Missiles to fire $Rest = ( "100000" ) ; Amount of time to rest $MMhotkey = ( "5" ) ; Mana Missile hotkey $SelfHealHotkey = ( "1" ) ; Self Heal hotkey $RestHotKey = ( "0" ) ; Rest hotkey $Launch = ( "2" ) ; Including launch in sequence, 1 for yes 2 for no. $StaffHotkey = "7" $OtherWeapon = "8" If $Launch = 1 Then $LaunchHoyKey = ( "4" ) MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." ) WinWaitActive( "Darkfall Online" ) While 1 $Variable = 0 Sleep ( 2000 ) Send( "R" ) Sleep ( 500 ) Call( "Launch" ) Call( "HealSelf" ) Do Call( "ManaMissile" ) $Variable = $Variable + 1 Until $Variable = $MM Sleep( 500 ) Call( "Launch" ) Call( "HealSelf" ) Sleep( 2500 ) Call( "Rest" ) WEnd ElseIf $Launch = 2 Then MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." ) WinWaitActive( "Darkfall Online" ) While 1 $Variable = 0 Sleep ( 2000 ) Send( "R" ) Sleep ( 500 ) Call( "HealSelf" ) Do Call( "ManaMissile" ) $Variable = $Variable + 1 Until $Variable = $MM Sleep( 2500) Call( "Refreshweapon" ) Sleep( 5000 ) Call( "HealSelf" ) Sleep( 2500 ) Call( "Rest" ) WEnd Else MsgBox( 0, "Alert", "Error." ) Exit EndIf Func Refreshweapon( ) Sleep( 2500) Send( $OtherWeapon ) Sleep( 5000 ) Send( $StaffHotkey ) Sleep( 2500 ) EndFunc Func HealSelf( ) Sleep( 500 ) Send( $SelfHealHotkey ) Sleep( 500 ) MouseClick( "Left" ) Sleep( 2400 ) EndFunc Func ManaMissile( ) Sleep( 500 ) Send( $MMhotkey ) Sleep( 500 ) MouseClick( "Left" ) Sleep( 1500 ) EndFunc Func Rest( ) Sleep( 2000 ) Send( "R" ) Sleep( 500 ) Send( $RestHotKey ) Sleep( 500 ) MouseClick( "Left" ) Sleep( $Rest ) Send( "{SPACE}" ) Sleep( 500 ) EndFunc Func Launch( ) Sleep( 1000 ) Send( $LaunchHoyKey ) Sleep( 500 ) MouseClick( "Left" ) Sleep( 6000 ) EndFunc Func TogglePause( ) $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate( ) Exit 0 EndFunc Link to comment Share on other sites More sharing options...
killmenext Posted August 11, 2009 Author Share Posted August 11, 2009 Bump please. Link to comment Share on other sites More sharing options...
darthneo Posted August 12, 2009 Share Posted August 12, 2009 (edited) ControlClick: http://www.autoitscript.com/autoit3/docs/functions/ControlClick.htm ControlCommand: http://www.autoitscript.com/autoit3/docs/functions/ControlCommand.htm Function list: http://www.autoitscript.com/autoit3/docs/functions.htm Edited August 12, 2009 by darthneo 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