Search found 44 matches

by CodeKiller
24 May 2024, 05:09
Forum: Ask for Help (v1)
Topic: Format() function Topic is solved
Replies: 2
Views: 469

Re: Format() function Topic is solved

Hallo, try: Name = test.txt.053 RegExMatch(Name, "\d+$", Number) MsgBox,% Number NextName := Format("test.txt.{:03}", Number+1) ; {:03} = total Number width is 3 MsgBox,% NextName or: Name = test.txt.053 RegExMatch(Name, "^(.*?)(\d+)$", Part) MsgBox,% Part1 " > " Part2 NextName := Format(Part1 "{:0...
by CodeKiller
24 May 2024, 03:21
Forum: Ask for Help (v1)
Topic: Format() function Topic is solved
Replies: 2
Views: 469

Format() function Topic is solved

Hello, I am looking at the Format() function but I don't understand at all how it is used (nor if it is useful for my script). What I want is to create a file renaming function with index at the end like 000 001 002 etc. It is easy to get the digit part of the file but I don't see how can I add 1 to...
by CodeKiller
07 Feb 2024, 11:36
Forum: Ask for Help (v1)
Topic: Crash randomly
Replies: 2
Views: 124

Crash randomly

Hello, Since yesterday, I guess, my AHK script is crashing randomly with this error (lines are random too) : --------------------------- AutoHotkey.ahk --------------------------- Critical Error: Invalid memory read/write. Line# 762: Sleep,100 763: Clipboard := StrReplace(Clipboard, "[ OxTorrent.com...
by CodeKiller
02 May 2023, 07:23
Forum: Ask for Help (v2)
Topic: Something preventing windows interaction
Replies: 4
Views: 274

Re: Something preventing windows interaction

I am not an expert in AHk but I am in Windows so... The program is clearly running in the user context like you would do with : Win R / notepad. And I am not admin of my computer. And it worked before, so I was wondering IF it exists some mechanismes that could prevent AHK from interacting with a wi...
by CodeKiller
02 May 2023, 07:20
Forum: Ask for Help (v2)
Topic: Struggling with context sensitive hotkey/hotstring... Topic is solved
Replies: 9
Views: 598

Re: Struggling with context sensitive hotkey/hotstring... Topic is solved

Ok I see.
I am wondering which kind of scenario could use dynamic hotkey as from the user's PoV the goal is to do stuff with a keypress, so I don't see how something dynamic could be use.
Anyway, thanks for all.
by CodeKiller
02 May 2023, 04:29
Forum: Ask for Help (v2)
Topic: Something preventing windows interaction
Replies: 4
Views: 274

Re: Something preventing windows interaction

It may be that the application is running as an elevated process, so your script would need to be run as administrator or otherwise address this as described by this FAQ answer . So it can be elevated but still in context user ? I have a Notepad++ running automatically in Admin but I cannot see it ...
by CodeKiller
02 May 2023, 04:27
Forum: Ask for Help (v2)
Topic: Struggling with context sensitive hotkey/hotstring... Topic is solved
Replies: 9
Views: 598

Re: Struggling with context sensitive hotkey/hotstring... Topic is solved

Hum I see.
v2 is way more "complicated". I don't understand why having multiple "commands" doing almost the same thing.

So there are no difference between using "HotIf WinActive" "#HotIf WinActive" and "HotIfWinActive" ? Except that fot #Hotif" where you can use "Or" and "And"
by CodeKiller
02 May 2023, 03:11
Forum: Ask for Help (v2)
Topic: Something preventing windows interaction
Replies: 4
Views: 274

Something preventing windows interaction

Hello, Does someone know if something (a program, a feature, whatever in Windows) can prevent AHK from detecting a window ? I have a pro computer and some windows are no longer detected by the script. If I inspect the window I can see everything but I cannot interect with it through scripts. All "Se...
by CodeKiller
02 May 2023, 02:34
Forum: Ask for Help (v2)
Topic: Struggling with context sensitive hotkey/hotstring... Topic is solved
Replies: 9
Views: 598

Re: Struggling with context sensitive hotkey/hotstring... Topic is solved

#HotIf WinActive("Cloner le ticket") It works but not always. Example : #HotIf WinActive "VMware Horizon Client" Hotkey "^+l", VMWareConnect #HotIf #HotIf WinActive("WTR") Or WinActive("Cisco AnyConnect Secure Mobility Client") Hotkey "^+l", CiscoConnect #Hotif CiscoConnect(ThisHotkey) { Sleep 666 ...
by CodeKiller
27 Apr 2023, 06:53
Forum: Ask for Help (v2)
Topic: Struggling with context sensitive hotkey/hotstring... Topic is solved
Replies: 9
Views: 598

Struggling with context sensitive hotkey/hotstring... Topic is solved

Hello, Is there a way (like in v1.1) to do hotkey scripts without the use of functions ??? I mean : #v:: { KeyWait "V", "Up" KeyWait "LWin", "Up" SendText A_Clipboard } Working. HotIfWinactive("Cloner le ticket") #v:: { KeyWait "V", "Up" KeyWait "LWin", "Up" SendText A_Clipboard } Not working. Same ...
by CodeKiller
19 Aug 2020, 10:39
Forum: Ask for Help (v1)
Topic: Disable script for specific window
Replies: 5
Views: 837

Re: Disable script for specific window

yes same hot key does specific function according to current window for instant in some game the ² minimize the window, in some other it send Esc before, etc. I have some keys that also have a "default" behavior for any window then specific window, this is this case that was an issue as it was doing...
by CodeKiller
19 Aug 2020, 07:33
Forum: Ask for Help (v1)
Topic: Disable script for specific window
Replies: 5
Views: 837

Re: Disable script for specific window

In fact in some case it can prevent some hotkeys to work. Example: #If !WinActive("ahk_exe Notepad.exe") F2::Msgbox HERE #If WinActive("ahk_exe Mspaint.exe") F2::Msgbox AND THERE This code does not work for the second part, as the first one will always be true and AHK does not test another hotkey if...
by CodeKiller
19 Aug 2020, 06:11
Forum: Ask for Help (v1)
Topic: Disable script for specific window
Replies: 5
Views: 837

Re: Disable script for specific window - Answered !

Holy shhhhhh...

So simple I did not think about that (negative test) as almost all my file is full of #If WinActive... :facepalm:

I created a big huge group of "all windows" key (they were scattered all over my script... jesus...) in a #If !WinActive and it works like a charm.

Thanks !
by CodeKiller
19 Aug 2020, 02:51
Forum: Ask for Help (v1)
Topic: Disable script for specific window
Replies: 5
Views: 837

Disable script for specific window

Hello, I wonder if there is a way to disable a whole "script" for a specific window. My script is about 1600 lines so obviously I cannot use #If or something like that on each hotkey... If it is not possible I guess it could be a great concept to implement. Like SetTitleMatchMode, #Include, etc. you...
by CodeKiller
13 Sep 2019, 02:47
Forum: Ask for Help (v1)
Topic: Variable Multiline text
Replies: 1
Views: 410

Variable Multiline text

Hello all, Yes this is silly subject but I don't understand how you can assign a text to a variable that contains { }. This exemple failles for example : Text = ("{0}" - Value "{1}" Text "{2}" Text ) It gives me error for "{1}" : attribute/field that faild (with a nice type :-)) validation Error: Th...
by CodeKiller
30 Jan 2018, 05:47
Forum: Ask for Help (v1)
Topic: Remap the Paragraph Key Topic is solved
Replies: 5
Views: 2274

Re: Remap the Paragraph Key Topic is solved

I don't know if it come from an older version than the latest but now it is simplified :

sc029::Msgbox OK

No longer need "vkbf". :rainbow:

For information :
AHK help, Index, key list
Go at the bottom "Special keys".
by CodeKiller
20 Jan 2018, 11:03
Forum: Ask for Help (v1)
Topic: ComObjCreate Internet Explorer
Replies: 1
Views: 777

Re: ComObjCreate Internet Explorer

Ok, after investigation, I manage to get almost what I want (except that getElementById is still not working). WinGetActiveTitle T IE := IEGet(T) IE.navigate("https://www.google.fr") IELoad(IE) Loop % IE.document.images.length Msgbox % IE.document.images[A_index - 1].href This is working fine. Now I...
by CodeKiller
20 Jan 2018, 10:37
Forum: Ask for Help (v1)
Topic: ComObjCreate Internet Explorer
Replies: 1
Views: 777

ComObjCreate Internet Explorer

Hi all, I used to use a script to do some search in IE but now the script is no longer working. I create a new one just to be sure, but still does not work with simple things like that : WinGetActiveTitle T IE := IEGet(T) IE.navigate("https://www.google.fr") IELoad(IE) Msgbox % IE.document.location ...
by CodeKiller
06 Apr 2016, 13:54
Forum: Notepad++
Topic: Setup Notepad++ for AutoHotkey
Replies: 167
Views: 528060

Re: Setup Notepad++ for AutoHotkey

Confirm this works for Windows 10 X 64 to make notpad++ as default editor for AHK files. HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command "C:\Program Files (x86)\Notepad++\notepad++.exe" "%1" HTH Just to add some info : it works only if you use the installer, if you do not have the defaut regk...
by CodeKiller
26 Feb 2016, 08:42
Forum: Ask for Help (v1)
Topic: How can i make a hotkey work different at different areas of same excel sheet? Topic is solved
Replies: 3
Views: 1619

Re: How can i make a hotkey work different at different areas of same excel sheet? Topic is solved

F5:: Msgbox % A_CaretX " - " A_CaretY Return But it's related to a "converted" relative caret position link to the height of a line and the width of the row. Displayed in pixels. If you want exact cell in a format Cells(5,6) for example you can use ComObj*. Generique example to edit the content of ...

Go to advanced search