Search found 104 matches
- 13 May 2016, 06:35
- Forum: Ask for Help (v1)
- Topic: Script for vertical image search. Topic is solved
- Replies: 1
- Views: 851
Re: Script for vertical image search. Topic is solved
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 { ...
- 13 May 2016, 06:26
- Forum: Ask for Help (v1)
- Topic: I need help with multiple line variables (specifically the clipboard)
- Replies: 2
- Views: 1271
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...
- 05 May 2016, 05:30
- Forum: Gaming Help (v1)
- Topic: Help with specific game script
- Replies: 13
- Views: 4189
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...
- 04 May 2016, 07:55
- Forum: Ask for Help (v1)
- Topic: (solved) how to resize and move multiple instances of an application?
- Replies: 2
- Views: 1061
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...
- 02 May 2016, 07:11
- Forum: Gaming Help (v1)
- Topic: need help on advnaced ImageSearch
- Replies: 2
- Views: 1716
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.
- 02 May 2016, 06:44
- Forum: Ask for Help (v1)
- Topic: Problem with Right Click Menu
- Replies: 1
- Views: 870
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...
- 02 May 2016, 05:20
- Forum: Gaming Help (v1)
- Topic: I need help for my script. (Newbie)
- Replies: 4
- Views: 1440
Re: I need help for my script. (Newbie)
You might find this thread useful: Make AHK work in most games
- 02 May 2016, 05:10
- Forum: Ask for Help (v1)
- Topic: dealing with multiple scripts
- Replies: 7
- Views: 1926
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.
- 29 Apr 2016, 09:49
- Forum: Gaming Help (v1)
- Topic: Help with autohotkey for game
- Replies: 3
- Views: 1584
Re: Help with autohotkey for game
See Making AHK work in games for some additional tips.
- 29 Apr 2016, 09:46
- Forum: Ask for Help (v1)
- Topic: What am I doing wrong??
- Replies: 8
- Views: 1865
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!
- 29 Apr 2016, 08:27
- Forum: Ask for Help (v1)
- Topic: What am I doing wrong??
- Replies: 8
- Views: 1865
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...
- 29 Apr 2016, 07:01
- Forum: Ask for Help (v1)
- Topic: Trouble incrementing a global variable
- Replies: 9
- Views: 3424
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.
- 29 Apr 2016, 06:47
- Forum: Ask for Help (v1)
- Topic: dealing with multiple scripts
- Replies: 7
- Views: 1926
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 ...
- 29 Apr 2016, 06:20
- Forum: Gaming Help (v1)
- Topic: Help with specific game script
- Replies: 13
- Views: 4189
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...
- 28 Apr 2016, 05:48
- Forum: Ask for Help (v1)
- Topic: Trouble incrementing a global variable
- Replies: 9
- Views: 3424
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...
- 28 Apr 2016, 05:45
- Forum: Ask for Help (v1)
- Topic: dealing with multiple scripts
- Replies: 7
- Views: 1926
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
- 28 Apr 2016, 05:18
- Forum: Gaming Help (v1)
- Topic: Help with specific game script
- Replies: 13
- Views: 4189
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...
- 27 Apr 2016, 09:06
- Forum: Gaming Help (v1)
- Topic: Help with specific game script
- Replies: 13
- Views: 4189
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...
- 26 Apr 2016, 07:01
- Forum: Gaming Help (v1)
- Topic: Help with specific game script
- Replies: 13
- Views: 4189
Re: Help with specific game script
Code: Select all
SetTimer, keys, 300000
F6::toggle := !toggle
keys:
if toggle
{
IfWinActive, DBVictory
Send, {Up}{Down}
}
return
- 26 Apr 2016, 06:42
- Forum: Gaming Help (v1)
- Topic: I need help for my script. (Newbie)
- Replies: 4
- Views: 1440
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...