Search found 12 matches

by JoakimU
07 Mar 2024, 15:49
Forum: Ask for Help (v2)
Topic: How change picture or Icon number in Gui? Topic is solved
Replies: 3
Views: 156

Re: How change picture or Icon number in Gui? Topic is solved

Thank you both for the suggestions. :bravo: it was just me's Alternative suggestion which I needed in this case. I'm building an app which only works if the user is connected to the office LAN or via the VPN to office. When he/she is connected, the status field in the Gui has green text and a networ...
by JoakimU
04 Mar 2024, 21:12
Forum: Ask for Help (v2)
Topic: How change picture or Icon number in Gui? Topic is solved
Replies: 3
Views: 156

How change picture or Icon number in Gui? Topic is solved

Hi. I want to monitor statuses in a Gui and use shell32.dll icons to visualize current status. It's easy to change text and color for text controls, but How would the syntax be for changing a Picture in a GUI? (I'm using icons from shell32.dll) Is it possible without redrawing the whole Gui? Simplif...
by JoakimU
13 Dec 2023, 08:21
Forum: Ask for Help (v2)
Topic: RegexReplace any character at specific position?
Replies: 8
Views: 592

Re: RegexReplace any character at specific position?

Thanks all! This helped me understanding regex a tiny bit better :) However , I found out that the position of the fields vary if the first column contains more than 5 digits, making the second field follow directly after the text in the first column. The position of all columns after col1 will be ...
by JoakimU
12 Dec 2023, 17:45
Forum: Ask for Help (v2)
Topic: RegexReplace any character at specific position?
Replies: 8
Views: 592

RegexReplace any character at specific position?

How to replace one single character at a specific position in a string (A_LoopField) ? I can't figure out how the RegEx for AHK v2 should be. I get log files from a system where there are no field separators in the log file, just spaces, and if a "field" is empty it is filled with spaces as well. Be...
by JoakimU
11 Sep 2023, 08:38
Forum: Ask for Help (v2)
Topic: Creating variables dynamically with loop in AHK v2?
Replies: 3
Views: 332

Creating variables dynamically with loop in AHK v2?

Hi this is a simple example of a way of working I had in earlier scripts - how do I use A_Index to create variables depending on an external file or other variables lengt etc. ; Loop-creating variables with A_Index in v1 loop 5 VarNum_%A_Index% := "This value: " A_Index ; <--- How do this in AHK v2?...
by JoakimU
04 May 2023, 03:22
Forum: Ask for Help (v2)
Topic: I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved
Replies: 10
Views: 1000

Re: I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved

Many good tips here. Thank you all! Don't know why I have created my own way of "arrays" by StrSplit:ing variables when arrays and objects was already there :crazy: Anyway I'll go with Objects in this case. Having .OnEvent on the same row as the button itself and no need for adding properties to bu...
by JoakimU
03 May 2023, 14:57
Forum: Ask for Help (v2)
Topic: I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved
Replies: 10
Views: 1000

Re: I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved

Thank you mikeyww! You nudged me in the right direction :) It was the way the function was designed. I was using btn_Click(*) I've been using AHK v1 for 15 years and avoided functions but i'm learning it now. My goal was to have multiple features on each button (this example a "Name" and a "Path") a...
by JoakimU
03 May 2023, 07:47
Forum: Ask for Help (v2)
Topic: I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved
Replies: 10
Views: 1000

I miss A_GuiControl in v1 - How to use the GuiControl.Name in functions now?? Topic is solved

Hello, I want to use the same Function for several ThisButton.OnEvent("Click", MyFunction) instead of having a separate function for each button. The function will then read the received name from the button that called the function, where the function then have different outcome depending on the na...
by JoakimU
30 Apr 2021, 08:15
Forum: Ask for Help (v1)
Topic: Script Freeze when MouseClick on Title bars or SysTray Topic is solved
Replies: 3
Views: 251

Re: Script Freeze when MouseClick on Title bars or SysTray Topic is solved

Thanks. Hmm it works when pausing my multi featuere startup script :)
by JoakimU
29 Apr 2021, 10:27
Forum: Ask for Help (v1)
Topic: Script Freeze when MouseClick on Title bars or SysTray Topic is solved
Replies: 3
Views: 251

Script Freeze when MouseClick on Title bars or SysTray Topic is solved

Hi! Anyone knows a workaround for this? This simple code example works for dragging icons, moving selected text, selecting several icons with a "lasso" . ^<:: { ; -- Ctrl + less than -- MouseClick , left, , , , , D, sleep 3000 MouseClick , left, , , , , U, Return } - but not on Windows Title bars or...
by JoakimU
07 Apr 2021, 10:09
Forum: Tutorials (v1)
Topic: GuiButtons to use the same "function"/gLabel. Store values within the buttons and use the same gLabel
Replies: 2
Views: 3570

GuiButtons to use the same "function"/gLabel. Store values within the buttons and use the same gLabel

Hi. This may be old stuff but for those who have Guis with a lot of buttons, text, ddls etc and this example might help you minimize A lot of labels. I have a script with 36 buttons (An app for a MIDI controller keyboard). Narrowing it down to use only one gButton label really minimizes hundeds of r...

Go to advanced search