Search found 296 matches
- 19 Apr 2024, 15:02
- Forum: Ask for Help (v1)
- Topic: Find second punctuation mark in the middle of the line
- Replies: 1
- Views: 40
Re: Find second punctuation mark in the middle of the line
One of these maybe: str := "This is a simple sentence!`nThis is a second sentence in line two.`nThis is also a sentence. You should find this line of text!`nLine_Next.`nLine_Next." ;RegExMatch - find the second sentence on one line RegExMatch(str, "[!.?]\h\K[^\v]+", match) MsgBox % match ;RegExMatch...
- 17 Apr 2024, 16:43
- Forum: Ask for Help (v2)
- Topic: Help converting v1 script regarding Excel to v2
- Replies: 2
- Views: 74
Re: Help converting v1 script regarding Excel to v2
Here you go:
Code: Select all
^e::Run "Excel"
#x:: {
xx := FormatTime("yyyMMdd")
Send xx
}
- 06 Mar 2024, 00:21
- Forum: Ask for Help (v1)
- Topic: Getting RegExMatch syntax right
- Replies: 2
- Views: 90
Re: Getting RegExMatch syntax right
For some reason I don't seem to be able to use standard.MaxIndex() Try the for-loop or loop like here. I would usually use a for-loop for an array. Both work. standard := ["case", "b", "c"] for myKey, myVal in standard { MsgBox % myKey "`n" myVal } ; Or use a % to force an expression. https://www.a...
- 06 Mar 2024, 00:01
- Forum: Off-topic Discussion
- Topic: Flat Earth vs. Globe Earth
- Replies: 115
- Views: 62483
Re: Flat Earth vs. Globe Earth
I don't disagree. Falsehoods are also not eradicated by continually discussing them as an alternative to the truth. I was playing the devil's advocate because there is nuance. This thread is basically a lot of very good arguments in favor of science. If we are arguing against an insignificant minori...
- 05 Mar 2024, 20:19
- Forum: Off-topic Discussion
- Topic: Flat Earth vs. Globe Earth
- Replies: 115
- Views: 62483
Re: Flat Earth vs. Globe Earth
I can empathize with Ernestheili 's point, so I'll play the devil's advocate for a bit. This thread "feeds the trolls" by simply mentioning the idea. No matter how you attempt to disprove it, giving more attention to the "debate" lends it more credibility and further propagates it. Debating a flat e...
- 12 Feb 2024, 03:59
- Forum: Ask for Help (v1)
- Topic: Excel COM add sheet after the last sheet Topic is solved
- Replies: 4
- Views: 152
Re: Excel COM add sheet after the last sheet Topic is solved
Glad to hear it's working for you. It happends quite often to me that I find the solution in VBA code and then I don't know to how to convert it in "COM/AHK" code. Does exist some tutorial to operate this conversion? There are lots of examples on the forum that can be found with google or the like. ...
- 11 Feb 2024, 19:20
- Forum: Ask for Help (v1)
- Topic: Excel COM add sheet after the last sheet Topic is solved
- Replies: 4
- Views: 152
Re: Excel COM add sheet after the last sheet Topic is solved
Code: Select all
F12::ExcelAddSheetLast()
ExcelAddSheetLast() {
xlSheets := ComObjActive("Excel.Application").ActiveWorkbook.Sheets
xlSheets.Add(, xlSheets.Item(xlSheets.Count))
}
- 06 Feb 2024, 22:39
- Forum: Off-topic Discussion
- Topic: Rosetta Code for v2
- Replies: 5
- Views: 670
Re: Rosetta Code for v2
the Rosetta wiki page for Programming Languages lists one for AutoHotkey and two for AutoHotkey v2 That's unfortunate. v2 should not be listed there. Rosetta Code has pages for implementations , and pages for languages . All versions of AHK are part of the same language . Different versions should ...
- 06 Feb 2024, 14:58
- Forum: Ask for Help (v1)
- Topic: Are AHK COM functions not available in Outlook anymore?
- Replies: 7
- Views: 545
Re: Are AHK COM functions not available in Outlook anymore?
It sounds like you are having the same issue as burque505 mentioned in this thread . The underlying cause of the issue was not found in the other thread. You came to the same solution of using AccessibleObjectFromWindow as a workaround. Why it works is beyond my coding knowledge. They use different ...
- 06 Feb 2024, 00:29
- Forum: Ask for Help (v1)
- Topic: Are AHK COM functions not available in Outlook anymore?
- Replies: 7
- Views: 545
Re: Are AHK COM functions not available in Outlook anymore?
My first guess is that Outlook is running as admin. If Outlook is running as admin then the script would need to be admin also. It's better if both are not running as admin. ComObjActive needs Outlook to be running. If it's not running then use ComObjCreate instead. If you just launched Outlook, yo...
- 05 Feb 2024, 02:24
- Forum: Off-topic Discussion
- Topic: Rosetta Code for v2
- Replies: 5
- Views: 670
Re: Rosetta Code for v2
I have not seen any posts there for v2 yet. The AutoHotkey 1.1 page still says that it's the current version. It hasn't been updated. Posts should be using the Works with template to identify the version. For example, link . Unfortunately, this only happens the minority of the time. Even with v1.1 v...
- 05 Feb 2024, 02:13
- Forum: Ask for Help (v1)
- Topic: Are AHK COM functions not available in Outlook anymore?
- Replies: 7
- Views: 545
Re: Are AHK COM functions not available in Outlook anymore?
COM won't work in the new Outlook. Good news is that, from what I can tell, new Outlook will not replace Outlook. It's similar to other email programs in the past and present; like if you remember Outlook Express. This is a quote from the best summary I've seen: [New Outlook] is not a successor, but...
- 31 Jan 2024, 15:45
- Forum: Ask for Help (v2)
- Topic: working with attachments in outlook
- Replies: 10
- Views: 661
Re: working with attachments in outlook
Realized since I am removing attachments I need to loop through them backwards to not mess up the index. I just realized I made the exact same mistake, even after I had read FanaticGuru's post. I corrected my script above. Specifically, this part: ; Remove files that are not PDF from the new mail i...
- 31 Jan 2024, 12:27
- Forum: Ask for Help (v1)
- Topic: Excel COM - changing spreadsheet names & tab colors Topic is solved
- Replies: 2
- Views: 195
Re: Excel COM - changing spreadsheet names & tab colors Topic is solved
Here's one way to do it by looping through the sheets. You don't need the arrays though, I just used them to organize it a bit. You could replace the array with if-statements or switch. if (sht.Name = x) ... ... tabs := { 123: ["The General Building", 0xFF901E] , 456: ["Another Building", 0x00FFFF] ...
- 30 Jan 2024, 21:41
- Forum: Ask for Help (v2)
- Topic: about Gui OnEvent
- Replies: 2
- Views: 152
Re: about Gui OnEvent
I would read the :arrow: OnEvent page. Is there anything similar so that I can simply know what's going on? What properties can be called in it? Specifically this part and the links it contains, I would assume, is what you are looking for :arrow: Events BTW, I thought that the Workbook_Events class...
- 29 Jan 2024, 11:44
- Forum: Ask for Help (v2)
- Topic: working with attachments in outlook
- Replies: 10
- Views: 661
Re: working with attachments in outlook
Try this. It will only send PDF attachments. FanaticGuru's suggestion for how to remove embedded attachments would probably work for deleting the signature images too. However, the code below just looks for files that end in "pdf". #Requires AutoHotkey v2 #SingleInstance Force email1 := "someperson@...
- 28 Jan 2024, 03:28
- Forum: Ask for Help (v2)
- Topic: Navigate to the next tab on a GUI on button press? Topic is solved
- Replies: 5
- Views: 451
Re: Navigate to the next tab on a GUI on button press? Topic is solved
I have found that splitting out moving to each tab into separate functions is useful, as I can perform different actions when switching between tabs. Not sure if this is what you are going for. If you want a specific function to run when switching tabs, you could detect when a tab is changed and th...
- 27 Jan 2024, 22:34
- Forum: Ask for Help (v2)
- Topic: ControlSend Syntax Help Topic is solved
- Replies: 4
- Views: 224
- 26 Jan 2024, 19:42
- Forum: Ask for Help (v2)
- Topic: working with attachments in outlook
- Replies: 10
- Views: 661
Re: working with attachments in outlook
I may have gone a bit off-topic here. I added a GUI to pick which attachments go where. To avoid having to save the attachments to disk it forwards the original email twice. Once to each recipient. It removes any attachments that were not selected. It also removes the original body and subject of th...
- 18 Jan 2024, 23:17
- Forum: Ask for Help (v2)
- Topic: about gui MonthCal help me Topic is solved
- Replies: 2
- Views: 144
Re: about gui MonthCal help me Topic is solved
For #1
Code: Select all
g.AddMonthCal("vMyCalendar").OnEvent("Change", CalChanged)
...
CalChanged(GuiCtrlObj, Info) {
MsgBox GuiCtrlObj.Name "`n" GuiCtrlObj.Value "`n" Info
}