Search found 24 matches
- 28 Jul 2022, 09:32
- Forum: Ask for Help (v1)
- Topic: How to use Tooltip to display counter onscreen
- Replies: 2
- Views: 613
Re: How to use Tooltip to display counter onscreen
it is as simple as inserting a single '%': fileread, var, %A_ScriptDir%\Client.txt strreplace(var,"The Mud Flats","",cnt) Tooltip, % "The number of instances is " . cnt or as standalone script (updates once a second): Loop { fileread, var, %A_ScriptDir%\Client.txt strreplace(var,"The Mud Flats","",c...
- 23 Apr 2022, 04:36
- Forum: Ask for Help (v1)
- Topic: Changing screen resolution
- Replies: 2
- Views: 212
Re: Changing screen resolution
Function call and defintion must be separated. A little bit of reordering your code ... if (A_ScreenWidth = 1920) ChangeDisplaySettingsL( (ClrDep:=32) , (Wid:=1366) , (Hei:=768) , (Hz:=60) ) else ChangeDisplaySettingsH( (ClrDep:=32) , (Wid:=1920) , (Hei:=1080) , (Hz:=60) ) ExitApp ChangeDisplaySetti...
- 05 Apr 2022, 08:45
- Forum: Ask for Help (v1)
- Topic: total commander jump on to specific directrory
- Replies: 16
- Views: 1084
Re: total commander jump on to specific directrory
MarkDir := "C:\Program Files\AutoHotkey" TC_SelectDir(MarkDir) return TC_SelectDir(dir) { static TTWinTitle := "ahk_class TTOTAL_CMD" static COMMANDER_PATH := "" ,COMMANDER_EXE := "" if (COMMANDER_EXE = "") { EnvGet COMMANDER_PATH, COMMANDER_PATH EnvGet COMMANDER_EXE, COMMANDER_EXE } ; precalc time...
- 23 Sep 2021, 09:22
- Forum: Scripts and Functions (v1)
- Topic: Upcoming Ahk2Exe Changes (2024)
- Replies: 626
- Views: 181668
Re: Upcoming Ahk2Exe Changes (2021)
@TAC: Thanks for fixing! I confirm expected behavior regarding FileInstall / HBitMapFromResource ("dirName/resource") in uncompiled script and in compiled script with Ahk2Exe 1.1.34.00 Beta_4 / Beta_5
- 10 Sep 2021, 12:33
- Forum: Scripts and Functions (v1)
- Topic: Upcoming Ahk2Exe Changes (2024)
- Replies: 626
- Views: 181668
Re: Upcoming Ahk2Exe Changes (2021)
RCDATA behavior Change since 1.33.10 breaks existing projects sadly i can't use the new Ahk2Exe (1.33.10 or 1.1.34.00_Beta_2) with my ahk-projects where I don't use a flat directory structure, but have e.g. resources in subfolders, such as Projectdir\MainFile.ahk + Icons\*.ico + Lib\*.ahk to preven...
- 24 Jun 2021, 14:15
- Forum: Ask for Help (v1)
- Topic: For function loop using multi-lined variable Topic is solved
- Replies: 4
- Views: 572
Re: For function loop using multi-lined variable Topic is solved
; direct access to array members: _procNames := ["cmd.exe","notepad.exe"] Lst := "Mode1:`n" for k, v in _procNames { ; do your magic stuff here. Lst .= Format( "{} -> {}`n", k, v) } ; perhaps this is your intention: ; indirect array-reference by array-name (if you have multiple lists): _procNames2 ...
- 08 Jun 2021, 02:14
- Forum: Ask for Help (v1)
- Topic: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
- Replies: 10
- Views: 4223
Re: WindowsForms10.Window.8.app.0.34f5582_r41_ad1141
for me in a similar case (toggle a checkbox in a WindowsForms) it's working like this: F7:: ; each press should toggle the checkbox WinFormTitle := "ahk_class AxMainFrame" ; <- insert the right title here WinFormCtrl := "WindowsForms10.Window.8.app.0.34f5582_r41_ad1141" ; <- insert the right control...
- 07 May 2021, 15:46
- Forum: Ask for Help (v1)
- Topic: script to open an image, depending on your active program problem
- Replies: 4
- Views: 288
Re: script to open an image, depending on your active program problem
Perhaps this hotkey is used another program, so first try another hotkey e.g. F12, You should at least see the MsgBox "Hotkey triggered" Try to find the mistake in the path to your picture, like this: WordPicPath := "C:\Users\user\OneDrive\Pictures\Hotkeys\Keyboard Hotkeys\Word.png" if (!FileExist(W...
- 19 Apr 2021, 06:03
- Forum: Scripts and Functions (v1)
- Topic: [Func] IsEvenNumber
- Replies: 7
- Views: 889
Re: [Func] IsEvenNumber
if your variable 'int' contains pure integer, you may use the builtin binary '&' operator to check wether 'int' is uneven (and negate the result to check if 'int' is even) like this: if ! (int & 1) ; 'int' is even or with this function: IsEvenNumber(int) { ; works with pure integers only return (int...
- 07 Apr 2021, 08:53
- Forum: Scripts and Functions (v1)
- Topic: Shows CapLock Status only when ON
- Replies: 4
- Views: 885
Re: Shows CapLock Status only when ON
I needed the states of the other toggle-keys too and modified your script. The retrieving of the states is done in a function to be called on every interested toggle key AND when the script ist started to get the initial state. No Need to poll the states in a loop ... #SingleInstance, force #NoEnv S...
- 05 Nov 2020, 11:18
- Forum: Ask for Help (v1)
- Topic: How to stop code from auto running? Topic is solved
- Replies: 2
- Views: 235
Re: How to stop code from auto running? Topic is solved
just insert a after Gui, Show
should fix it ....
Code: Select all
return
should fix it ....
- 31 Jul 2020, 18:15
- Forum: Ask for Help (v1)
- Topic: Two GuiContextMenu in one Gui
- Replies: 8
- Views: 2935
Re: Two GuiContextMenu in one Gui
select the right Listview like this: Comm1: Gui, ListView, Comm1 if (A_GuiEvent = "DoubleClick") LV_GetText(RowText1, A_EventInfo, 1) ; ... return Comm2: Gui, ListView, Comm2 if (A_GuiEvent = "DoubleClick") LV_GetText(RowText1, A_EventInfo, 1) ; ... return or - if same behaviour is an option - you c...
- 24 Jul 2020, 08:45
- Forum: Ask for Help (v1)
- Topic: Two GuiContextMenu in one Gui
- Replies: 8
- Views: 2935
Re: Two GuiContextMenu in one Gui
Try this:
Code: Select all
GuiContextMenu:
if (A_GuiControl = "Comm1")
Menu, ME1, Show, %A_GuiX%, %A_GuiY%
else if (A_GuiControl = "Comm2")
Menu, ME2, Show, %A_GuiX%, %A_GuiY%
Return
- 02 Mar 2020, 13:11
- Forum: Ich brauche Hilfe
- Topic: AHK & Arduino (Serielle Kommunikation)
- Replies: 2
- Views: 1531
Re: AHK & Arduino (Serielle Kommunikation)
Hallo Gucky_87, der indirekt verlinkte Beitrag https forums.adafruit.com /viewtopic.php?f=25&t=20177&p=112840&hilit=autohotkey#p105118 (Broken Link for safety) enthält eine auch für höhere COMPorts (>=10) lauffähige Version durch folgenes Code-Fragment: SERIAL_Port_Temp1_Len := StrLen(SERIAL_Port_Te...
- 22 Oct 2019, 10:50
- Forum: Ask for Help (v1)
- Topic: Regex help: Match everything after
- Replies: 3
- Views: 414
Re: Regex help: Match everything after
Another solution with look-behind assertion:
Code: Select all
^!V:: ;Ctrl-Alt-V 'Special Paste'
Haystack := Clipboard
Needle := "(?<=:)\s*(?<Keep>.+)$"
RegExMatch(Haystack, Needle, TextTo)
Clipboard := TextToKeep
Send, ^V
return
- 15 May 2019, 08:06
- Forum: Ask for Help (v1)
- Topic: Load DDL (dropdownlist) with .ini file contents Topic is solved
- Replies: 2
- Views: 1051
Re: Load DDL (dropdownlist) with .ini file contents Topic is solved
you should replace the newline-characters with the pipe-character, e.g.: Gui, Add, DDL, xs+10 ys+100 vReferalVar w250, % StrReplace(SampleVar,"`n","|") if there is an empty line after the preferred Default, this line will be initially selected in the DDL e.g. ReferalVar = (lTrim text from line 1 is ...
- 11 Feb 2019, 08:59
- Forum: Ask for Help (v1)
- Topic: odd or even
- Replies: 3
- Views: 757
Re: odd or even
Code: Select all
arr := ["hello", "world", "test", "Autohotkey" ]
loop % arr.Count()
{
if (A_index & 1) ; Check LSB: if set it's odd
msgbox % "odd " A_index " : " arr[A_index]
else
msgbox % "even " A_index " : " arr[A_index]
}
- 06 Feb 2019, 14:48
- Forum: Ask for Help (v1)
- Topic: Circumvent screen lock timeout - script fails
- Replies: 4
- Views: 1277
Re: Circumvent screen lock timeout - script fails
I am using this when working via Remote Desktop on an external computer. The script runs on my home PC...
- 03 Feb 2019, 06:53
- Forum: Ask for Help (v1)
- Topic: Circumvent screen lock timeout - script fails
- Replies: 4
- Views: 1277
Re: Circumvent screen lock timeout - script fails
To avoid the screensaver I had a script moving an existing window once per minute by one pixel to the left on even minutes and one pixel to the right on odd minutes. But for me the following much simpler solution works: ; some keyboard input every minute.: SetTimer SimKeyboardInput, 60000 return Sim...
- 19 Nov 2018, 07:51
- Forum: Ask for Help (v1)
- Topic: GUI checkbox multiple entries Topic is solved
- Replies: 3
- Views: 1488
Re: GUI checkbox multiple entries Topic is solved
how about a standard solution with loops ? MaxParts := 19, PartsPerRow := 3, xSpace := 20, ySpace := 30, width := 60 Gui Add, Groupbox, % "xm w" . PartsPerRow * (width + xSpace) . " h" . ySpace * (1+ Floor(MaxParts / PartsPerRow)) + 30 , Backing Mesh Loop % MaxParts { Gui Add, CheckBox, % ((Mod(A_In...