Search found 2738 matches
- 01 Oct 2023, 17:47
- Forum: Ask for Help (v1)
- Topic: Help with pixel color script
- Replies: 3
- Views: 279
Re: Help with pixel color script
f1:: mousemove 1870, 1000, 0 Stop:= 0 i:=0 While (Stop = 0) { PixelSearch,ax,ay,1870,1000,1870,1000,0x333333,25,Fast RGB If ErrorLevel = 0 { SendInput ^{F4} SendInput !{F4} Stop := 1 } } until (A_Index = 25) return You can limit the looping by setting the var stop to 1 and using until A_Index = 25 ...
- 01 Oct 2023, 17:35
- Forum: Ask for Help (v1)
- Topic: How to prevent repeated triggering of hotkey when held down
- Replies: 1
- Views: 240
Re: How to prevent repeated triggering of hotkey when held down
F17:: KeyWait, F17, L T0.2 ; waits T[seconds] for you to release the key If !ErrorLevel ; ErrorLevel is true when the time limit is reached. So if still be holding F17 SendInput, ^w KeyWait, F17 return Your KeyWait parameters were not set correctly, to fix your issue another KeyWait fixes the key r...
- 30 Sep 2023, 17:23
- Forum: Ask for Help (v1)
- Topic: AHK Script with pixel search
- Replies: 10
- Views: 844
Re: AHK Script with pixel search
Try checking the color without the MouseMove to the pixel you are checking. This will verify if the pixel color is changing from a mouseover or not.
Also move CoordMode, Pixel, Screen to the top of your script (aka AutoExec secton), so it works for the whole script (ie: both hotkeys)
Also move CoordMode, Pixel, Screen to the top of your script (aka AutoExec secton), so it works for the whole script (ie: both hotkeys)
- 29 Sep 2023, 20:17
- Forum: Ask for Help (v1)
- Topic: AHK Script with pixel search
- Replies: 10
- Views: 844
Re: AHK Script with pixel search
You will want to set Coordmode to screen and use the RGB mode for PixelGetColor 4:: CoordMode, Pixel, Screen PixelGetColor, color, 741, 1001, RGB if (color = 0x9A7E84) ; you posted 2 different colors make sure you use the right one <--- { send 0 } Else { send 6 } Return Give it a try
- 27 Aug 2023, 21:18
- Forum: Ask for Help (v2)
- Topic: Script for Printing from Browser
- Replies: 2
- Views: 276
Re: Script for Printing from Browser
Try using the chrome command line arg --disable-print-preview this will skip the preview and show the OS select printer window instead. (which easier to handle with winwait)
HTH
HTH
- 04 Aug 2023, 11:05
- Forum: Ask for Help (v1)
- Topic: loop lag in a few hours Topic is solved
- Replies: 3
- Views: 404
Re: loop lag in a few hours Topic is solved
The loop only sleeps when the image is found.
It's using to much CPU when not found and lagging your game.
Try putting a small sleep in the loop: Sleep, 15 this will reduce cpu usage.
If you still have lag increase it to: Sleep, 50
It's using to much CPU when not found and lagging your game.
Try putting a small sleep in the loop: Sleep, 15 this will reduce cpu usage.
If you still have lag increase it to: Sleep, 50
- 14 May 2023, 23:41
- Forum: Ask for Help (v1)
- Topic: Does the AHK V1 language specification consider a subroutine called from a loop to be within the loop?
- Replies: 8
- Views: 653
Re: Does the AHK V1 language specification consider a subroutine called from a loop to be within the loop?
Code: Select all
Loop,Read,%A_ScriptFullPath%
ShowLine()
ExitApp
ShowLine()
{
MsgBox % A_LoopReadLine
Return
}
- 05 May 2023, 11:05
- Forum: Scripts and Functions (v1)
- Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No IE!
- Replies: 668
- Views: 466999
Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No IE!
Continuation section too long see: continuation sections A continuation section cannot produce a line whose total length is greater than 16,383 characters (if it tries, the program will alert you the moment the script is launched). One way to work around this is to do a series of concatenations into...
- 25 Apr 2023, 09:51
- Forum: Scripts and Functions (v1)
- Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No IE!
- Replies: 668
- Views: 466999
Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No IE!
try using:I am just getting a blank variable. Please help.
Code: Select all
numProps := PageInst.Evaluate(JS).Value
- 23 Apr 2023, 16:53
- Forum: Ask for Help (v1)
- Topic: Run command to trigger screensaver?
- Replies: 6
- Views: 1118
Re: Run command to trigger screensaver?
If you want a screensaver other than what is set in windows, running the mikeyww example would better suit your needs.
- 23 Apr 2023, 09:41
- Forum: Ask for Help (v1)
- Topic: Run command to trigger screensaver?
- Replies: 6
- Views: 1118
Re: Run command to trigger screensaver?
Another method:
Code: Select all
SendMessage, 0x112, 0xF140, 0,, Program Manager ; 0x112 is WM_SYSCOMMAND -- 0xF140 is SC_SCREENSAVE
- 17 Apr 2023, 11:03
- Forum: Ask for Help (v2)
- Topic: Screen Capture to File AHK Library exist for 2.0?
- Replies: 4
- Views: 1020
Re: Screen Capture to File AHK Library exist for 2.0?
I hear this one is good:
viewtopic.php?f=83&t=115622#p515378
viewtopic.php?f=83&t=115622#p515378
- 14 Apr 2023, 12:08
- Forum: Ask for Help (v1)
- Topic: ImageSearch - In need of help!
- Replies: 4
- Views: 458
Re: ImageSearch - In need of help!
For games you likely would want to use SetKeyDelay but notice it does not work with SendInput only SendEvent which is the default mode.
I would try using:
SetKeydelay, 50, 50
You may need to adjust the numbers could be as low as 20 and as high as 100 but do some testing to see what works for you.
I would try using:
SetKeydelay, 50, 50
You may need to adjust the numbers could be as low as 20 and as high as 100 but do some testing to see what works for you.
- 14 Apr 2023, 10:03
- Forum: Gaming Scripts (v1)
- Topic: wrong Script
- Replies: 1
- Views: 823
Re: wrong Script
For the toggle see help file for: GetKeyState --> read about the Mode parameter.
Your script shows nothing about using the left mouse button (LButton)
Your script shows nothing about using the left mouse button (LButton)
- 13 Apr 2023, 13:34
- Forum: Ask for Help (v1)
- Topic: ImageSearch - In need of help!
- Replies: 4
- Views: 458
Re: ImageSearch - In need of help!
Check your variables:
tldr: don't use = for assignment use :=
Code: Select all
X1 = 320
i = 0
X1 = X1+(i*25)
MsgBox % X1
Code: Select all
X1 := 320
i := 0
X1 := X1+(i*25)
MsgBox % X1
- 18 Mar 2023, 03:31
- Forum: Ask for Help (v1)
- Topic: matching two error level with OR condition?
- Replies: 4
- Views: 382
Re: matching two error level with OR condition?
if (green Or violet)
or in your 2nd post try setting variable to strings:
green := "ok"
violet := "ok"
or in your 2nd post try setting variable to strings:
green := "ok"
violet := "ok"
- 09 Mar 2023, 02:10
- Forum: General Discussion
- Topic: ChatGPT
- Replies: 16
- Views: 5442
Re: ChatGPT
Until it doesn't lolit comes up with perfect code every time
- 07 Mar 2023, 22:34
- Forum: Ask for Help (v1)
- Topic: How to create a folder same name with file name ? Topic is solved
- Replies: 5
- Views: 422
Re: How to create a folder same name with file name ? Topic is solved
When ErrorLevel = 0 aka !ErrorLevel the image was found. Only then will it create the folder.
You will need to fix the brackets just like i shown. In your post it will always create due to misplaced brackets { }
You will need to fix the brackets just like i shown. In your post it will always create due to misplaced brackets { }
- 07 Mar 2023, 20:23
- Forum: Ask for Help (v1)
- Topic: How to create a folder same name with file name ? Topic is solved
- Replies: 5
- Views: 422
Re: How to create a folder same name with file name ? Topic is solved
Your brackets are off for the if code block: #SingleInstance, Force CoordMode, Pixel CoordMode, Mouse, Screen Loop { Loop, files, C:\Users\admin\Desktop\pic\*.png { ImageSearch, imgX, imgY, 1109, 0, 1596, 828, % A_LoopFileFullPath if !ErrorLevel { MouseClick, left, 1331, 243 FileCreateDir, % StrRepl...
- 07 Mar 2023, 12:27
- Forum: Wish List
- Topic: Possible feature to make AHK working with Browser
- Replies: 2
- Views: 1886
Re: Possible feature to make AHK working with Browser
Take a look at viewtopic.php?t=102616
You should be able to do anything you want with it.
You should be able to do anything you want with it.