Search found 2822 matches

by flyingDman
Today, 18:52
Forum: Ask for Help (v2)
Topic: How to tell a single click from a rapid double click
Replies: 2
Views: 130

Re: How to tell a single click from a rapid double click

Short answer: you can't. I would do something like this. Check / uncheck using doubleclick and edit using right click. g := Gui("+AlwaysOnTop") LV := g.AddListView("w200 r12 -readonly checked", ["name","items"]) loop 12 LV.Add(, "Name " A_Index,"Item " A_Index * 10) LV.modifycol(1, 90) LV.modifycol(...
by flyingDman
02 May 2024, 16:49
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1255

Re: save and close Excel2010

I don't know.
by flyingDman
02 May 2024, 13:17
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1255

Re: save and close Excel2010

If you search the forum on Excel or Word, you'll see many post that include COM (googling site:autohotkey.com Excel COM shows > 15K results). Yes, we are very definitively still in Autohotkey! AHK natively includes the ability to interface with applications that include COM. I have yet to find an ex...
by flyingDman
02 May 2024, 09:53
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1255

Re: save and close Excel2010

When dealing with Excel simulated keystrokes are unnecessary and unwanted. xl.close(1) saves and closes no need for ^s . There is also no need for any sleeps. There is also no need for WinActivate, ahk_class XLMAIN since we establish a unique link to excel. The 0x80010001 error pops up when you try ...
by flyingDman
01 May 2024, 22:05
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1255

Re: save and close Excel2010

Try:

Code: Select all

xl := ComObjActive("excel.application")
xl.activeWorkbook.SaveCopyAs("E:\" xl.activeWorkbook.name)  ; E:\ or whatever path
xl.activeWorkbook.close(1)									; close(1) saves under current path\name then closes 
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: 132

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: 132

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: 10
Views: 638

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: 165

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: 80

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: 80

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: 194

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: 611

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: 324

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: 324

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: 324

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: 209

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: 225

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: 225

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...

Go to advanced search