Search found 236 matches
- 18 Apr 2022, 16:54
- Forum: Ask for Help (v1)
- Topic: Unexpected {
- Replies: 7
- Views: 816
Re: Unexpected {
Afaics, this is misleading, and no valid/meaningful if -syntax. This would execute Send("{w down}") unconditionally, even if the if-condition is false . Well damn. I didn't know that same line if statements weren't allowed. Thought that for sure it would be the same as in other languages. Guess not
- 18 Apr 2022, 13:15
- Forum: Ask for Help (v1)
- Topic: Unexpected {
- Replies: 7
- Views: 816
Re: Unexpected {
Because Send {w up} is a command.
Autohotkey commands require their own line.
If you want to keep it on the same line as the if statement, you can instead wrap it in a function like this:
Autohotkey commands require their own line.
If you want to keep it on the same line as the if statement, you can instead wrap it in a function like this:
Code: Select all
Send(k) {
Send % k
}
if (keyVar = 1) Send("{w down}")
- 14 Apr 2022, 16:38
- Forum: Ask for Help (v1)
- Topic: Point on Line Closest to Separate Point Topic is solved
- Replies: 6
- Views: 551
Re: Point on Line Closest to Separate Point Topic is solved
Just calculate the sum of x,y added together in each endpoint, then see which one is closest to the sum of x,y in the individual point? ; Endpoint 1 x1 := 2 y1 := 4 t1 := x1 + y1 ; total ; Endpoint 2 x2 := 4 y2 := 4 t2 := x2 + y2 ; total ; Individual point x3 := 6 y3 := 8 t3 := x3 + y3 ; total If (t...
- 14 Apr 2022, 13:50
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
Re: AutoHotKey Renamer Topic is solved
Just press F1 again to search for "Regular3". Just remember to add it to the PrefixList SetWorkingDir %A_ScriptDir% FileList := [] PrefixList := ["Regular2", "Regular3"] SuffixList := ["copy", "dragon", "banana"] OldText := "Alpha" NewText := "Mask" _ := "_" ; Separator ; Loop through all files in e...
- 14 Apr 2022, 12:49
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
- 14 Apr 2022, 07:58
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
Re: AutoHotKey Renamer Topic is solved
SetWorkingDir %A_ScriptDir% FileList := [] Prefix := "Regular2" SuffixList := ["copy", "dragon", "banana"] OldText := "Alpha" NewText := "Mask" _ := "_" ; Separator ; Loop through all files in each subdirectory Loop, Files, *, R { ; Shorten because too much eye cancer LFP := A_LoopFilePath ; Skip i...
- 13 Apr 2022, 13:41
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
Re: AutoHotKey Renamer Topic is solved
I see now. Replace "copy" not delete the file... Try this: SetWorkingDir %A_ScriptDir% Prefix := "Regular2" Suffix := "copy" OldText := "Alpha" NewText := "Mask" _ := "_" ; Separator ; Loop through all files in each subdirectory Loop, Files, *, R { ; Remove "copy" suffix FileName := StrReplace(A_Loo...
- 13 Apr 2022, 06:42
- Forum: Ask for Help (v1)
- Topic: Class hierarchy / data structure
- Replies: 2
- Views: 385
Re: Class hierarchy / data structure
Usually I do something like this: 1. Each unique component should have it's own class. 2. Each component should keep track of their parent and children, i.e. store reference to parent in a variable/property and children in an array of object instances 3 . Each component's object should be instantiat...
- 13 Apr 2022, 02:55
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
Re: AutoHotKey Renamer Topic is solved
Untested. Press F1 to "Search For name and take input then replace it" SetWorkingDir %A_ScriptDir% Prefix := "Regular2" Suffix := "copy" OldText := "Alpha" NewText := "Mask" _ := "_" ; Separator ; Loop through all files in each subdirectory Loop, Files, *, R { ; Remove copies if (InStr(A_LoopFilePat...
- 12 Apr 2022, 16:06
- Forum: Ask for Help (v1)
- Topic: AutoHotKey Renamer Topic is solved
- Replies: 17
- Views: 1241
Re: AutoHotKey Renamer Topic is solved
arpit12 wrote: Sorry as i have mentioned i am new to coding. If anyone can provide me with syntax that would be very helpful.
https://www.autohotkey.com/docs/commands/FileMove.htm#ExRename
Use the docs.#2: Renames a single file.Code: Select all
FileMove, C:\File Before.txt, C:\File After.txt
- 11 Apr 2022, 07:31
- Forum: Ask for Help (v1)
- Topic: How to use a "this.variable" as a function parameter?
- Replies: 7
- Views: 811
Re: How to use a "this.variable" as a function parameter?
Code: Select all
This.Timer := Func("CCC.onHover").Bind(0, 0, 0, hWnd)
SetTimer, % This.Timer, 150
- 11 Apr 2022, 07:26
- Forum: Ask for Help (v1)
- Topic: Auto paste
- Replies: 2
- Views: 350
Re: Auto paste
"simple"
- 14 May 2020, 14:30
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
Since the splash and main windows have the same window name, try this: MySettings = C:\Users\2015 Win10\AppData\Local\Logitech\Logitech Gaming Software\settings.json ; Location of settings file NewProfile = "persistentProfile" : "{5FAEA13C-DF17-44E4-8714-A0E9BF212D4E}" SoftwareProcessName = LCore.ex...
- 11 May 2020, 10:33
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
The reason it the splash screen comes is because the script completely closes the program whereas when you manually click on the x it only closes the main window, meaning that you can still probably see a small logitech icon in the system tray on the right side of the screen near the date/time. I'm ...
- 09 May 2020, 08:57
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
You are attempting to close and reopen the script a second time when it's not necessary. Remove these: RunWait mouse_close.bat ; Basic taskkill line to Close the mouse program because your more elegant Process, Close, %SoftwareProcessName% confusingly would not work. RunWait, %SoftwareExecutable% ; ...
- 08 May 2020, 13:05
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
It's possible in many ways. Simplest way in my opinion is to use a parsing loop, not tested: MySettings = C:\My Documents\My Settings.txt ; Location of settings file NewProfile = "persistentProfile" : "{5FAEA13C-DF17-44E4-8714-A0E9BF212D4E}" ; First check if the settings file exists If (!FileExist(M...
- 08 May 2020, 07:21
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
First backup the file just in case. For example, copy the settings file to the desktop or something. This should work, not tested: MySettings = C:\My Documents\My Settings.txt ; Location of settings file OldProfile = "persistentProfile" : "{09D92D75-3C8C-4723-B06C-4090BCB899C0}" NewProfile = "persis...
- 06 May 2020, 20:33
- Forum: Ask for Help (v1)
- Topic: Expressions vs. conditions Topic is solved
- Replies: 7
- Views: 1090
Re: Expressions vs. conditions Topic is solved
An expression is something that results in a value, for example a math operation (2 + 2) or a function that returns something. A condition is a comparison of values in a conditional statement such as if , that returns either true or false . See this example: message := "Hello world" ; if... is a con...
- 03 May 2020, 04:26
- Forum: Gaming Help (v1)
- Topic: More elegant solution than ImageSearch to change mouse profile?
- Replies: 17
- Views: 2857
Re: More elegant solution than ImageSearch to change mouse profile?
Maybe the program has a dedicated folder for storing profiles somewhere?
If so, maybe just some simple file write and rename magic would do the trick.
If so, maybe just some simple file write and rename magic would do the trick.
- 01 May 2020, 11:09
- Forum: Ask for Help (v1)
- Topic: ahk and memory read/write like cheat engine? Topic is solved
- Replies: 4
- Views: 2200