Jump to content

How Do I Get The Code To Perform Tasks While Minamized?


Arez
 Share

Recommended Posts

I wrote a program for Diablo II, but it always automatically maximizes the game:

If WinExists ("Diablo II") Then

WinActivate ("Diablo II")

WinWaitActive ("Diablo II")

$WinPos = WinGetPos ("Diablo II")

That's what I start it off with.

When you run the script, is there any way to make it do all the stuff without maximizing?

Also, when I use: Send("This is a test message") it always types it out. Is there any way to make it put the text in faster?

Thanks

Edited by Arez
Link to comment
Share on other sites

99% of it is mine.

Sorry I copy + pasted the six-second code you had

Since the 4 lines that you posted are 100% greenmachine's

http://www.autoitscript.com/forum/index.ph...ndpost&p=162736

then you must have written 396 lines of code for the other 99% to be yours.

Would you mind posting your wonderful D2 code?

I'm sure others will help you once you've shared.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Since the 4 lines that you posted are 100% greenmachine's

http://www.autoitscript.com/forum/index.ph...ndpost&p=162736

then you must have written 396 lines of code for the other 99% to be yours.

Would you mind posting your wonderful D2 code?

I'm sure others will help you once you've shared.

Hahaha you guys are a lot of fun.

I have this link that I need to put somewhere, so I might as well put it here....

http://www.autoitscript.com/forum/index.php?showtopic=7112

Link to comment
Share on other sites

learn2search

There are resources on clicking minimized windows designed specifically for Diablo II windows.

Also

ControlSend

--------------------------------------------------------------------------------

Sends a string of characters to a control.

ControlSend ( "title", "text", controlID, "string" [, flag])

Parameters

title The title of the window to access.

text The text of the window to access.

controlID The control to interact with. See Controls.

string String of characters to send to the control.

flag [optional] Changes how "keys" is processed:

flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.

flag = 1, keys are sent raw.

Return Value

Success: Returns 1.

Failure: Returns 0 if window/control is not found.

I AM ORCA!! A VERY POWERFUL WHALE!!!

Link to comment
Share on other sites

learn2search

There are resources on clicking minimized windows designed specifically for Diablo II windows.

Also

While that is a nice idea (to use control + anything), you'll hit a big snag when you try to access any Diablo II control ID, because THERE ARE NONE (hence the reason this is more difficult than a simple ControlClick).
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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