Search found 86 matches

by kdaube
28 Jan 2024, 12:13
Forum: Ask for Help (v2)
Topic: How to use IniRead function
Replies: 3
Views: 297

Re: How to use IniRead function

Thank you Gregster. That was the reason. Syntax errors have been my "specialty" since the days of Fortran.
by kdaube
27 Jan 2024, 12:28
Forum: Ask for Help (v2)
Topic: How to use IniRead function
Replies: 3
Views: 297

How to use IniRead function

In a script I want to check whether it's time to do a backup. I do not understand why I get this error message. Error: Expected a String but got a Func. ▶ 021: lastBackup := IniRead (iniFile, "Control", "lastBackup") 022: MsgBox((lastBackup)) 023: later := DateAdd(A_Now, 25, "days") The ini file its...
by kdaube
08 Mar 2023, 12:49
Forum: Visual Studio Code
Topic: Debugging with AutoHotkey Plus Plus
Replies: 1
Views: 1736

Debugging with AutoHotkey Plus Plus

launch.json is this: { "version": "0.2.0", "configurations": [ { "name": "AutoHotkey Debug", "type": "ahk", "request": "launch", "runtime": "H:/Utilities/AutoHotkey/AHK2/AutoHotkeyU64.exe", "program": "${file}", "stopOnEntry": true }, ] } The debugging client is AutoHotkey Plus Plus. Vscode marketpl...
by kdaube
03 Mar 2023, 12:10
Forum: Ask for Help (v2)
Topic: v1 → v2 for OnMessage
Replies: 4
Views: 398

Re: v1 → v2 for OnMessage

Thank you, mikeyww - it works now.
by kdaube
03 Mar 2023, 11:03
Forum: Ask for Help (v2)
Topic: v1 → v2 for OnMessage
Replies: 4
Views: 398

v1 → v2 for OnMessage

Dear experts When converting a short script to v2 I struggle with "Invalid callback function": V1 version: ; Listen to the Windows power event "WM_POWERBROADCAST" (ID: 0x218): OnMessage(0x218, "WM_POWERBROADCAST") Return WM_POWERBROADCAST(wParam, lParam) { FormatTime, now, , ddd yyyy-MM-dd HH:mm:ss ...
by kdaube
23 Feb 2023, 03:38
Forum: Ask for Help (v1)
Topic: AHK2Exe could not copy the compiled file - strange happending Topic is solved
Replies: 3
Views: 546

Re: AHK2Exe could not copy the compiled file - strange happending Topic is solved

Yes, TAC109 that was the cause. Yesterday I had the same problem and discovered lots ot entries in the Protection History in the Windows Security settings: Threat blocked: Win32/Contebrew.A!ml → this file does not exist on my computer, not on C:, not on other drives. It must be an interpretation of ...
by kdaube
21 Feb 2023, 12:40
Forum: Ask for Help (v1)
Topic: How to avoid a blurred image? Topic is solved
Replies: 3
Views: 353

Re: How to avoid a blurred image? Topic is solved

I have now found the reason for the blurred images. Since there are two sources for the images; The first contains the icons in the desired size (36x36) The second contains 6 versions per image (coloured/bW each 18x18, 27x27 and 36x36) the current icon was not selected correctly. these were the ones...
by kdaube
21 Feb 2023, 11:47
Forum: Ask for Help (v1)
Topic: How to avoid a blurred image? Topic is solved
Replies: 3
Views: 353

Re: How to avoid a blurred image? Topic is solved

Thank You Hellbent for your answer, I'm further investigating my code, because the following snipped displays crisp images: ; GUI-Picture.ahk iconCurBtn := "E:\\_DDDprojects\\ETB-14up\\Sources\\etb_icons\\import_formats_2X.png" Gui Add, Picture, x050 y010 w36 h36 , %iconCurBtn% Gui Add, Picture, x05...
by kdaube
21 Feb 2023, 11:18
Forum: Ask for Help (v1)
Topic: How to avoid a blurred image? Topic is solved
Replies: 3
Views: 353

How to avoid a blurred image? Topic is solved

Dear experts, In my script I have these statements aNewButtons[jNew].imgbase := BtnimgBase If (bETBalso) { aNewButtons[jNew].imgbase := BtnimgBase . "_2X.png" ; do not allow to scale } aNewButtons[jNew].icon := iconCurBtn Gui Add, Picture, x%newBtnX% y300 w36 h36 , %iconCurBtn% The images are 36x36 ...
by kdaube
20 Feb 2023, 06:19
Forum: Ask for Help (v1)
Topic: AHK2Exe could not copy the compiled file - strange happending Topic is solved
Replies: 3
Views: 546

AHK2Exe could not copy the compiled file - strange happending Topic is solved

Dear all, I got t his error which wasdiscussed in extenso in this forum https://www.autohotkey.com/boards/viewtopic.php?f=14&t=59817&p=268134&hilit=ahk2exe+could+not+copy#p268134 . There are no access restrictions: all files show "everyone has full control". I worked in a directory E:\_DDDprojects\F...
by kdaube
16 Feb 2023, 05:46
Forum: Ask for Help (v1)
Topic: IniRead fails for one entry Topic is solved
Replies: 4
Views: 338

Re: IniRead fails for one entry Topic is solved

mikeyww, again, you hit the nail!
«If you have multiple INI files, check to see that you are accessing the one that you think you are.»

I really used the wrong one which did not include this entry!
by kdaube
16 Feb 2023, 05:38
Forum: Ask for Help (v1)
Topic: IniRead fails for one entry Topic is solved
Replies: 4
Views: 338

Re: IniRead fails for one entry Topic is solved

BTW immediateley after the statement

Code: Select all

  IniRead, instTitle,  %iniFile%, %appLang%, instTitle      ;
MsgBox %ErrorLevel%
ErrorLevel is zero which is as documented. How to find the cause then?
by kdaube
16 Feb 2023, 05:27
Forum: Ask for Help (v1)
Topic: IniRead fails for one entry Topic is solved
Replies: 4
Views: 338

IniRead fails for one entry Topic is solved

Dear all, I'm clueless what might happen here. the ini file contains this: [Project] appName = FMbuildTB ... [en] appTitle = Build FM tool bars appDescr = FMbuildTB builds Tool Bars for FrameMaker. appHint = The utility will be installed in the user area (%appdata%\D+DD). A shortcut to the utility w...
by kdaube
14 Feb 2023, 10:40
Forum: Ask for Help (v1)
Topic: Overlay GUI elements possible? Topic is solved
Replies: 2
Views: 322

Re: Overlay GUI elements possible? Topic is solved

Thanks You very much, YustMe,
The Winset does the trick in my script!
by kdaube
14 Feb 2023, 08:22
Forum: Ask for Help (v1)
Topic: Overlay GUI elements possible? Topic is solved
Replies: 2
Views: 322

Overlay GUI elements possible? Topic is solved

Dear experts I have a script in which tool bar icons are collected. Since the user may arrange more than 15 on his tool tool bar, I need a method to show those with nr > 15 'wrapped around' to avoid a GUI of excessive width. This screenshot just shows a collection of 3, but ... https://daube.ch/zz_t...
by kdaube
06 Feb 2023, 08:29
Forum: Ask for Help (v1)
Topic: UI to collect icons in a row Topic is solved
Replies: 3
Views: 352

Re: UI to collect icons in a row Topic is solved

This is how it looks implemented after selection of 4 buttons from the list:
Image
by kdaube
06 Feb 2023, 08:10
Forum: Ask for Help (v1)
Topic: UI to collect icons in a row Topic is solved
Replies: 3
Views: 352

Re: UI to collect icons in a row Topic is solved

mikeyww, you pointed me into the right direction (I had some trivial errors also...) This works as intended: ; addBtn2Tbar.ahk icons shall be presented 48 x 48 pix #Requires AutoHotkey v1.1.33 global m := 20 - 48, n, iconCurBtn n := 0 ; # icons collected iconCurBtn := A_ScriptDir . "\Undefined.png" ...
by kdaube
06 Feb 2023, 06:14
Forum: Ask for Help (v1)
Topic: UI to collect icons in a row Topic is solved
Replies: 3
Views: 352

UI to collect icons in a row Topic is solved

Friends, I need your help! In a larger script I get icons which I want to display collected in a row forming a button bar. In the simulated screenshot herafter the top icons is constant. in reality it is the selction from a list and then I want to add it to the tool bar by using button Add. After us...
by kdaube
05 Feb 2023, 12:02
Forum: Ask for Help (v1)
Topic: Script works as intended as an .ahk file, but not as an .exe?
Replies: 12
Views: 868

Re: Script works as intended as an .ahk file, but not as an .exe?

«There is usually no fundamental reason for most compiled scripts to yield a different result, but some antivirus software flags or terminates compiled programs.» Among these AV software is Windows Defender. Publishing AHK exe is a need, because an AHK interpreter can not be assumed for all user of ...
by kdaube
02 Feb 2023, 10:00
Forum: Ask for Help (v1)
Topic: List contents accumulates - how to fix?
Replies: 3
Views: 398

Re: List contents accumulates - how to fix?

I think I got it:
To replace (overwrite) the list instead, include a pipe as the first character (e.g. |Red|Green|Blue).

Go to advanced search