Search found 295 matches

by Datapoint
Yesterday, 16:43
Forum: Ask for Help (v2)
Topic: Help converting v1 script regarding Excel to v2
Replies: 2
Views: 53

Re: Help converting v1 script regarding Excel to v2

Here you go:

Code: Select all

^e::Run "Excel"

#x:: {
	xx := FormatTime("yyyMMdd")
	Send xx
}
by Datapoint
06 Mar 2024, 00:21
Forum: Ask for Help (v1)
Topic: Getting RegExMatch syntax right
Replies: 2
Views: 89

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...
by Datapoint
06 Mar 2024, 00:01
Forum: Off-topic Discussion
Topic: Flat Earth vs. Globe Earth
Replies: 115
Views: 62303

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...
by Datapoint
05 Mar 2024, 20:19
Forum: Off-topic Discussion
Topic: Flat Earth vs. Globe Earth
Replies: 115
Views: 62303

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...
by Datapoint
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: 150

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. ...
by Datapoint
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: 150

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))
}
by Datapoint
06 Feb 2024, 22:39
Forum: Off-topic Discussion
Topic: Rosetta Code for v2
Replies: 5
Views: 663

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 ...
by Datapoint
06 Feb 2024, 14:58
Forum: Ask for Help (v1)
Topic: Are AHK COM functions not available in Outlook anymore?
Replies: 7
Views: 537

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 ...
by Datapoint
06 Feb 2024, 00:29
Forum: Ask for Help (v1)
Topic: Are AHK COM functions not available in Outlook anymore?
Replies: 7
Views: 537

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...
by Datapoint
05 Feb 2024, 02:24
Forum: Off-topic Discussion
Topic: Rosetta Code for v2
Replies: 5
Views: 663

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...
by Datapoint
05 Feb 2024, 02:13
Forum: Ask for Help (v1)
Topic: Are AHK COM functions not available in Outlook anymore?
Replies: 7
Views: 537

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...
by Datapoint
31 Jan 2024, 15:45
Forum: Ask for Help (v2)
Topic: working with attachments in outlook
Replies: 10
Views: 659

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...
by Datapoint
31 Jan 2024, 12:27
Forum: Ask for Help (v1)
Topic: Excel COM - changing spreadsheet names & tab colors Topic is solved
Replies: 2
Views: 194

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] ...
by Datapoint
30 Jan 2024, 21:41
Forum: Ask for Help (v2)
Topic: about Gui OnEvent
Replies: 2
Views: 151

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...
by Datapoint
29 Jan 2024, 11:44
Forum: Ask for Help (v2)
Topic: working with attachments in outlook
Replies: 10
Views: 659

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@...
by Datapoint
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: 448

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...
by Datapoint
27 Jan 2024, 22:34
Forum: Ask for Help (v2)
Topic: ControlSend Syntax Help Topic is solved
Replies: 4
Views: 224

Re: ControlSend Syntax Help Topic is solved

dan86 wrote:
27 Jan 2024, 22:07
But it clearly has, as the text is there with that variable from the previous time I hit the button!!!
Local variables are cleared after the function ends. You could make that variable static or global to save it for the next time the function is called.
by Datapoint
26 Jan 2024, 19:42
Forum: Ask for Help (v2)
Topic: working with attachments in outlook
Replies: 10
Views: 659

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...
by Datapoint
18 Jan 2024, 23:17
Forum: Ask for Help (v2)
Topic: about gui MonthCal help me Topic is solved
Replies: 2
Views: 143

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
}
by Datapoint
16 Jan 2024, 16:44
Forum: Ask for Help (v1)
Topic: Global variable showing as string instead of number
Replies: 4
Views: 232

Re: Global variable showing as string instead of number

Ok I get it now. Global variables and arguments are different entities. Only solution is to pass the number value of ntsearchx1 as an argument: You can pass the variable name. Add a % to your Msgbox / RunWait command. a_args[1] := "ntsearchx1" global ntsearchx1 := 7 x1 := a_args[1] msgbox %x1% ; nt...

Go to advanced search