Search found 104 matches

by Flarebrass
13 May 2016, 06:35
Forum: Ask For Help
Topic: Script for vertical image search.
Replies: 1
Views: 659

Re: Script for vertical image search.

I think it's because you're using a regular equal sign, so the script may think you're trying to save a string instead of an expression. Here's where I'm talking about: ImageSearch, FoundX, FoundY, %StartX%, %StartY%, %EndX%, %EndY%, *10 C:\Users\Jacopo\Dropbox\PlotToMat\Up2.png If ErrorLevel = 0 { ...
by Flarebrass
13 May 2016, 06:26
Forum: Ask For Help
Topic: I need help with multiple line variables (specifically the clipboard)
Replies: 2
Views: 997

Re: I need help with multiple line variables (specifically the clipboard)

Does the paste fail, or is it simply skipping the newlines? 'r'n is the newline method that the documentation says to use. Also, make sure you're using clipboard := because it will find the continuation section on the next line; a regular equals sign will trick it into thinking that you want a blank...
by Flarebrass
05 May 2016, 05:30
Forum: Gaming
Topic: Help with specific game script
Replies: 13
Views: 3372

Re: Help with specific game script

ahk_class deals with the window, not the control. If WindowSpy isn't telling you the program's control and my script is giving a blank variable, then the control cannot be determined and you will need to use another method. You can try removing the control altogether and doing a ControlSend directl...
by Flarebrass
04 May 2016, 07:55
Forum: Ask For Help
Topic: (solved) how to resize and move multiple instances of an application?
Replies: 2
Views: 874

Re: how to resize and move multiple instances of an application?

A quick fix would be to use RunWait, "D:\MPC-HC\mpc-hc.exe" WinMove,,,0,0,600,500 to remove the conditional statement which makes the computer think that the first instance being active is the condition that the second non-existent window should be moved. It's moving too fast. You could go to the pr...
by Flarebrass
02 May 2016, 07:11
Forum: Gaming
Topic: need help on advnaced ImageSearch
Replies: 2
Views: 1413

Re: need help on advnaced ImageSearch

I think the best idea would be to do a PixelSearch to find the general color of the arrow, then using the *transN feature to find similar pixel colors. The letters look difficult to grab, so I would begin by finding the direction that the arrow is pointing and press the appropriate key from there.
by Flarebrass
02 May 2016, 06:44
Forum: Ask For Help
Topic: Problem with Right Click Menu
Replies: 1
Views: 744

Re: Problem with Right Click Menu

So everything works fine until you load up a script, then the right-click menu functionality bugs out. Does it restore when exiting the script? Is it permanent until a system restart? Which version of AHK are you running? 1.1.23.05 x64 is the current version for your system (unless you're trying x32...
by Flarebrass
02 May 2016, 05:20
Forum: Gaming
Topic: I need help for my script. (Newbie)
Replies: 4
Views: 1158

Re: I need help for my script. (Newbie)

You might find this thread useful: Make AHK work in most games
by Flarebrass
02 May 2016, 05:10
Forum: Ask For Help
Topic: dealing with multiple scripts
Replies: 7
Views: 1690

Re: dealing with multiple scripts

Then you will find SendMessage and OnMessage() to be the functions of choice to communicate between the scripts. The examples are great teaching tools, but I haven't messed with them so my syntax and logic will be wrong if I try to post something.
by Flarebrass
29 Apr 2016, 09:49
Forum: Gaming
Topic: Help with autohotkey for game
Replies: 3
Views: 1255

Re: Help with autohotkey for game

See Making AHK work in games for some additional tips.
by Flarebrass
29 Apr 2016, 09:46
Forum: Ask For Help
Topic: What am I doing wrong??
Replies: 8
Views: 1610

Re: What am I doing wrong??

I thought EnvAdd/EnvSub had to be explicitly called to work with dates. I'll have to start using that syntax!
by Flarebrass
29 Apr 2016, 08:27
Forum: Ask For Help
Topic: What am I doing wrong??
Replies: 8
Views: 1610

Re: What am I doing wrong??

lastChangeDate := 20160419 ;FormatTime, ld, lastChangeDate, yyyyMMdd ld := lastChangeDate ;MsgBox, The old date is %ld%. FormatTime, now, A_Now, yyyyMMdd MsgBox, % "There are " . DateDiff(ld, now) . " days." DateDiff(startdate, enddate) { return enddate-startdate } ExitApp enddate -= startdate is a...
by Flarebrass
29 Apr 2016, 07:01
Forum: Ask For Help
Topic: Trouble incrementing a global variable
Replies: 9
Views: 2539

Re: Trouble incrementing a global variable

I've always had problems with superglobal variables in many languages, and I remember having to debug one of my former AHK scripts for over 2 hours before finally turning the function into a label because it wouldn't recognize them. I guess I need to read up some more.
by Flarebrass
29 Apr 2016, 06:47
Forum: Ask For Help
Topic: dealing with multiple scripts
Replies: 7
Views: 1690

Re: dealing with multiple scripts

That would make it a bit more difficult since they are two separate scripts. If you combine them into the same script, you can easily use Critical as I've mentioned. If they are in two separate scripts, you'll need to use SendMessage and OnMessage() to communicate between the scripts. I try to make ...
by Flarebrass
29 Apr 2016, 06:20
Forum: Gaming
Topic: Help with specific game script
Replies: 13
Views: 3372

Re: Help with specific game script

-Do all of it even if it's in the background or minimalized without pulling it "on top". I avoided that because it's more complicated and requires you to do some personal research and testing to work. In a nutshell, we have to figure out the control type and name of your program, then tell AHK to f...
by Flarebrass
28 Apr 2016, 05:48
Forum: Ask For Help
Topic: Trouble incrementing a global variable
Replies: 9
Views: 2539

Re: Trouble incrementing a global variable

The issue is function scope. If you ran a label, you wouldn't need Global , but a function is like a subset of code which can allow for its own local variables. For a function to recognize an outside variable, you'll need to explicitly tell it to draw from the parent thread. I haven't messed with fu...
by Flarebrass
28 Apr 2016, 05:45
Forum: Ask For Help
Topic: dealing with multiple scripts
Replies: 7
Views: 1690

Re: dealing with multiple scripts

You're looking for the Critical command. Specify code as in the following:

Code: Select all

Numpad1::
Critical
;uninterruptable code here, will buffer keyboard input and mouse clicks
Critical Off
return
by Flarebrass
28 Apr 2016, 05:18
Forum: Gaming
Topic: Help with specific game script
Replies: 13
Views: 3372

Re: Help with specific game script

I would appreciate if you would let me know what you want for your script. My code works, but you're saying it doesn't, which means that your description is different from your desired behavior. Can you provide more details on how you want your script to work? Do you want to force DBVictory to becom...
by Flarebrass
27 Apr 2016, 09:06
Forum: Gaming
Topic: Help with specific game script
Replies: 13
Views: 3372

Re: Help with specific game script

The script I gave sends Up+Down only if DBVictory is the active window once every 5 minutes. If it sends Up+Down to other windows, then you should specify SetTitleMatchMode, 3 at the top of your script because there's unintended behavior. If you want to force-send Up+Down to the window "DBVictory" r...
by Flarebrass
26 Apr 2016, 07:01
Forum: Gaming
Topic: Help with specific game script
Replies: 13
Views: 3372

Re: Help with specific game script

Code: Select all

SetTimer, keys, 300000

F6::toggle := !toggle

keys:
if toggle
{
	IfWinActive, DBVictory
		Send, {Up}{Down}
}
return
Do you want this to force DBVictory to become active? Or just check if it's the active window then send Up+Down if it is?
by Flarebrass
26 Apr 2016, 06:42
Forum: Gaming
Topic: I need help for my script. (Newbie)
Replies: 4
Views: 1158

Re: I need help for my script. (Newbie)

CoordMode only needs to be specified at the beginning of your script to affect the entire script. If you want to switch CoordMode styles mid-script and then revert styles later on, then you can specify CoordMode at each change. You also need brackets in AHK since it doesn't recognize indentations l...

Go to advanced search