Search found 2817 matches

by flyingDman
12 Apr 2024, 19:17
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 99

Re: How to get a value of ListBox1 control here (conitnue)?

So you want to create a hotkey (ins::) to send the option selected in the popup?. Try this: MyGui := Gui('AlwaysOnTop') MyGui.AddText(, 'Select your category') ListBox1 := MyGui.AddListBox('r6', ['Option1', 'Option2', 'Option3']) MyGui.AddButton('Default w80', 'Submit').OnEvent('Click', ButtonClicke...
by flyingDman
12 Apr 2024, 16:19
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 99

Re: Ho to get a value of ListBox1 control here?

Home:: { global ListBox1 ; <<<<<<<<<<< MyGui := Gui('AlwaysOnTop') MyGui.AddText(, "Select category") ListBox1 := MyGui.AddListBox('r6 vCategoryChoice', ['Option1', 'Option2', 'Option3', 'Option4', 'Option5', 'Option6']) MyBtn1 := MyGui.AddButton('Default w80', 'Submit').OnEvent('Click', MyBtn1_Cli...
by flyingDman
12 Apr 2024, 15:11
Forum: Bug Reports
Topic: COM: Table Manipulation in MS Word broken in recent AHK versions
Replies: 7
Views: 229

Re: COM: Table Manipulation in MS Word broken in recent AHK versions

Thank you for shedding light on the intrinsic ambiguity between properties and methods in VBA and your decision to discontinue this ambiguity in v2. That said, for those like me who made extensive use of the MS VBA documentation to write AHK COM code, it has not become easier as certain things that ...
by flyingDman
08 Apr 2024, 11:32
Forum: Ask for Help (v2)
Topic: Please help, Data grouping, calculating total and maximum values
Replies: 4
Views: 108

Re: Please help, Data grouping, calculating total and maximum values

If you are a fan of more compact code: gmax := map(), gsum := map(), res := "" for x,y in strsplit(str, "`n", "`r") { z := strsplit(y," "), grp := z[1] gmax[grp] := gmax.has(grp) ? max(gmax[grp],z[2]) : z[2] gsum[grp] := gsum.has(grp) ? gsum[grp]+z[3] : z[3] } For grp in gmax res .= grp "`t" gmax[gr...
by flyingDman
06 Apr 2024, 19:16
Forum: Ask for Help (v1)
Topic: Combining long press and double tapping scripts
Replies: 3
Views: 53

Re: Combining long press and double tapping scripts

My example includes one but it does not require one.
by flyingDman
06 Apr 2024, 18:31
Forum: Ask for Help (v1)
Topic: Combining long press and double tapping scripts
Replies: 3
Views: 53

Re: Combining long press and double tapping scripts

Try Morse: https://www.autohotkey.com/boards/viewtopic.php?f=76&t=127450&p=563668&hilit=morse#p563668 <^Numpad0::sendtext((x:=Morse())="0"?"single" :x="00"?"double" :x="1"?"long" :"") Morse(to := 250) { while KeyWait(hk := RegExReplace(A_ThisHotkey, ".*?(\W|\w*)$","$1"), "DT" to/1000) st := A_TickCo...
by flyingDman
06 Apr 2024, 12:45
Forum: Ask for Help (v2)
Topic: ComObjActive with several open Word files Topic is solved
Replies: 4
Views: 120

Re: ComObjActive with several open Word files Topic is solved

ComObjActive does not connect to a file, it connects to the application (in this case MS Word). Having several files open in Word does not mean that there are several instances of the application running simultaneously. Several files can be open and running under the same instance . One of the open ...
by flyingDman
05 Apr 2024, 13:25
Forum: Ask for Help (v1)
Topic: Reading CSV, but maintaining linebreaks and carriage returns between double quotes Topic is solved
Replies: 12
Views: 432

Re: Reading CSV, but maintaining linebreaks and carriage returns between double quotes Topic is solved

Thanks, just me . It is a similar issue. As long as you do not have any `r`n (i.e. CRLF = a carriage return and a linefeed together ) inside double quoted text*, you can strsplit(xxx,"`r`n) and use the CSV parsing loop to achieve your 2 objectives: 1) a multi-line cell shown as a one-liner inside a ...
by flyingDman
05 Apr 2024, 08:41
Forum: Ask for Help (v2)
Topic: Desktop or Laptop ?
Replies: 12
Views: 268

Re: Desktop or Laptop ?

Your issue is with the if and {} blocks (or lack thereof) Also (because your UUID look real) There are a few reasons why you should not post your UUID online. First, it could be used to track you across multiple websites and services. Second, it could be used to identify you if you are using a servi...
by flyingDman
03 Apr 2024, 22:28
Forum: Ask for Help (v2)
Topic: Desktop or Laptop ?
Replies: 12
Views: 268

Re: Desktop or Laptop ?

labels ? Perhaps this will help: a_clipboard := "" Run a_comspec ' /c wmic systemenclosure get chassistypes | clip',,'hide' if ClipWait(1) { regexmatch(a_clipboard, "(\d+)",&m) if (m[1] = 9 or m[1] = 10) msgbox "this is a laptop" else msgbox "this is a desktop" } The exact list is: 1 - Other 2 - Unk...
by flyingDman
03 Apr 2024, 22:10
Forum: Ask for Help (v2)
Topic: Desktop or Laptop ?
Replies: 12
Views: 268

Re: Desktop or Laptop ?

Try:

Code: Select all

a_clipboard := ""
Run a_comspec ' /c wmic systemenclosure get chassistypes | clip',,'hide'
if ClipWait(1)
	{
	regexmatch(a_clipboard, "(\d+)",&m)
	msgbox (m[1] = 9 or m[1] = 10) ? "laptop" : "desktop"
	}
This worked on my laptop but do not have a desktop to test.

edit added a clipwait
by flyingDman
02 Apr 2024, 18:48
Forum: Ask for Help (v1)
Topic: Need help with Excel data transfer
Replies: 7
Views: 163

Re: Need help with Excel data transfer

It's obviously hard to say without having the excel spreadsheets themselves but there is no obvious error or obvious potential improvement that I see.
by flyingDman
02 Apr 2024, 16:15
Forum: Ask for Help (v1)
Topic: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line
Replies: 10
Views: 186

Re: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line

Yes, that is a different and unrelated error. I gave you the exact error that pops up when the file name is incorrect. See in what I pasted: the script is looking for an Excel file called Path.xlsx. I have 317 scripts where it is either xl.workbooks.open(somevariable) or xl.workbooks.open("C:\Users\...
by flyingDman
02 Apr 2024, 15:13
Forum: Ask for Help (v1)
Topic: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line
Replies: 10
Views: 186

Re: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line

xl.Workbooks.Open("Path") is very definitely wrong. Path is a variable and quotes are not even optional. It will generate this error: --------------------------- script_2024-04-02_13-07_V1.ahk --------------------------- Error: 0x800A03EC - Source: Microsoft Excel Description: Sorry, we couldn't fi...
by flyingDman
02 Apr 2024, 13:43
Forum: Ask for Help (v1)
Topic: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line
Replies: 10
Views: 186

Re: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line

Correct the errors Russ and I reported and see what happens. When you have errors copy paste the error message here.

GuiControlGetText does not exist! Is that AI generated?
by flyingDman
02 Apr 2024, 13:36
Forum: Ask for Help (v1)
Topic: Need help with Excel data transfer
Replies: 7
Views: 163

Re: Need help with Excel data transfer

I do not see blatant errors or inefficiencies. Now if you have many rows in your spreadsheet (and I mean say > 1000), this code may be slow. This is because you read each cell using a COM call. In such cases I prefer to read all data into a safearray and extract data from that array. But if your spe...
by flyingDman
02 Apr 2024, 11:30
Forum: Ask for Help (v1)
Topic: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line
Replies: 10
Views: 186

Re: Using Edit Boxes to search excel column E and pull corresponding data from column G, breaks on foundrow line

I guess the OP gets an error on the foundrow line.
Wrkbk := xl.Workbooks.Open("Path") should be Wrkbk := xl.Workbooks.Open(Path). That however triggers an error elsewhere.
by flyingDman
02 Apr 2024, 11:16
Forum: Ask for Help (v1)
Topic: Need help with Excel data transfer
Replies: 7
Views: 163

Re: Need help with Excel data transfer

What is A_month ? A_MM or A_Mon perhaps?
by flyingDman
01 Apr 2024, 22:12
Forum: Ask for Help (v1)
Topic: Need help with Excel data transfer
Replies: 7
Views: 163

Re: Need help with Excel data transfer

Use substr(SKU,-1) != "-B" instead of !InStr(SKU, "-B")

Go to advanced search