Search found 110 matches

by awel20
14 Mar 2019, 11:03
Forum: Ask For Help
Topic: Cant make Excel to autosum by sending hotkeys Topic is solved
Replies: 5
Views: 95

Re: Cant make Excel to autosum by sending hotkeys Topic is solved

This works for me: !=::Send, {Alt Down}mus{Alt Up}

You might want to use #IfWinActive instead, and create a separate hotkey just for excel.

Code: Select all

#IfWinActive ahk_exe EXCEL.EXE

!=::Send, {Alt Down}mus{Alt Up}

#If

!SC00D::
<^>!SC00D::
Send, ≠
return
by awel20
14 Mar 2019, 08:41
Forum: Ask For Help
Topic: Excel_Get() function gets into infinite loop when excel is minimized and in edit mode.
Replies: 4
Views: 134

Re: Excel_Get() function gets into infinite loop when excel is minimized and in edit mode.

Is there a reason excel needs to be minimized? Why not just have it below the other windows or moved somewhere out of the way? Is there a reason it needs to be in edit mode? It seems like that could easily be avoided by adjusting your workflow. Like before you minimize excel exit edit mode. You cou...
by awel20
13 Mar 2019, 10:43
Forum: Ask For Help
Topic: Excel_Get() function gets into infinite loop when excel is minimized and in edit mode.
Replies: 4
Views: 134

Re: Excel_Get() function gets into infinite loop when excel is minimized and in edit mode.

Loop try return window.Application catch e if SubStr(e.message, 1, 10) = "0x80010001" ControlSend, Excel7%Excel7#%, {Esc}, %WinTitle% else return "Error accessing the application object." Maybe something like this: Loop { try return window.Application catch e if SubStr(e.message, 1, 10) = "0x800100...
by awel20
01 Mar 2019, 12:02
Forum: Ask For Help
Topic: Atan2 in code but not documented nor exposed? Topic is solved
Replies: 9
Views: 320

Re: Atan2 in code but not documented nor exposed? Topic is solved

Code: Select all

atan2(y, x) {
   return dllcall("msvcrt\atan2", "Double", y, "Double", x, "CDECL Double")
}
by awel20
28 Feb 2019, 15:06
Forum: Ask For Help
Topic: MS Word, read of AttachedTemplate property
Replies: 2
Views: 132

Re: MS Word, read of AttachedTemplate property

In your code the variable VarTemp will contain an object. You need to access one of the object properties. AttachedTemplate - Returns a Template object that represents the template attached to the specified document. Document.AttachedTemplate - https://docs.microsoft.com/en-us/office/vba/api/word.do...
by awel20
26 Feb 2019, 10:20
Forum: Ask For Help
Topic: Paste range of cells from Excel to Outlook using COM Topic is solved
Replies: 3
Views: 118

Re: Paste range of cells from Excel to Outlook using COM Topic is solved

All of the methods I've seen need the inspector window to be active exist. For example: [ 1 ], [ 2 ] The wordEditor is the only way I know of pasting into outlook with COM, and the wordEditor is part of the inspector/window. Inspector.WordEditor Edit - This works too, and uses Mailitem.GetInspector ...
by awel20
25 Feb 2019, 16:40
Forum: Ask For Help
Topic: Paste range of cells from Excel to Outlook using COM Topic is solved
Replies: 3
Views: 118

Re: Paste range of cells from Excel to Outlook using COM Topic is solved

Code: Select all

ComObjActive("Excel.Application").Worksheets(1).Range("A4:C5").Copy
Outlook := ComObjCreate("Outlook.Application")
email := Outlook.Application.CreateItem(0)
email.Display
Outlook.ActiveInspector.WordEditor.Application.Selection.Paste
Outlook := email := ""
by awel20
25 Feb 2019, 16:37
Forum: Ask For Help
Topic: Problem Copying Row(s) of Data with SAFEARRAY in Excel Topic is solved
Replies: 1
Views: 67

Re: Problem Copying Row(s) of Data with SAFEARRAY in Excel Topic is solved

"G2:G10" is only 9 rows. If you know you will always be starting on row 2, then add 1 to TotalRows every time. Here's a way to do it dynamically: Address := "G2" TotalRows := 10 Xl := ComObjActive("Excel.Application") firstCell := Xl.ActiveSheet.Range(Address) lastCell := firstCell.Offset(TotalRows ...
by awel20
13 Feb 2019, 09:52
Forum: Ask For Help
Topic: Outlook COM access message Topic is solved
Replies: 1
Views: 72

Re: Outlook COM access message Topic is solved

Code: Select all

olMsgPath := A_Desktop "\test.msg"
olApp := ComObjActive("Outlook.Application")
olMsg := olApp.Session.OpenSharedItem(olMsgPath)
MsgBox % olMsg.Subject
olApp := olMsg := ""
by awel20
29 Jan 2019, 14:41
Forum: Ask For Help
Topic: Outlook COM loop through Folders Topic is solved
Replies: 1
Views: 119

Re: Outlook COM loop through Folders Topic is solved

; Adapted from COM Object reference "Outlook.Application" ; https://autohotkey.com/board/topic/56987-com-object-reference-autohotkey-v11/page-11#457708 olApp := ComObjActive("Outlook.Application") olTestFolder := olApp.Session.Folders("myusername@myemail.com").Folders.Item("Test") MsgBox % olLoopFo...
by awel20
25 Jan 2019, 15:49
Forum: Scripts and Functions
Topic: Reads Excel (xlsx) Fast
Replies: 22
Views: 3082

Re: Reads Excel (xlsx) Fast

FanaticGuru wrote:
25 Jan 2019, 15:34
It is still a nice demonstration
Maybe just as a curiosity.

But parsing XML with RegEx? ...surely nothing could go wrong \s
by awel20
25 Jan 2019, 14:04
Forum: Ask For Help
Topic: How to convert current time to unix timestamp?
Replies: 35
Views: 1004

Re: How to convert current time to unix timestamp?

Yes. Why is there no leap second? When Human date to Timestamp and UNIX Timestamp are converted to each other, it seems that leap seconds are not considered. I might misunderstand but I think this is the relevant part: Every day is treated as if it contains exactly 86400 seconds [...] a leap second...
by awel20
22 Jan 2019, 09:43
Forum: Ask For Help
Topic: Struggling with an AHK / Outlook issue Topic is solved
Replies: 3
Views: 213

Re: Struggling with an AHK / Outlook issue Topic is solved

BLoweZero wrote:
21 Jan 2019, 21:22
send !O
This sends Alt+Shift+o beacuse the 'O' is uppercase.
Try, send !o
by awel20
15 Jan 2019, 12:27
Forum: Ask For Help
Topic: Select specific Excel file from 3 opened. ComObjActive Topic is solved
Replies: 3
Views: 184

Re: Select specific Excel file from 3 opened. ComObjActive Topic is solved

workbookName := "Book1.xlsx" Xl := ComObjActive("Excel.Application") objWorkbook1 := Xl.Workbooks(workbookName) ; Note: Xl and objWorkbook1 are different types of objects. Xl is a application object, objWorkbook1 is a workbook. ; https://docs.microsoft.com/en-us/office/vba/api/excel.application%28o...
by awel20
15 Jan 2019, 10:49
Forum: Ask For Help
Topic: Outlook in Windows 10 - UAC Issues Topic is solved
Replies: 17
Views: 1776

Re: Outlook in Windows 10 - UAC Issues Topic is solved

has anyone got Acc_ObjectFromWindow to work on Outlook? Unfortunately the only thing I can suggest is making sure your script is running with the same level of privileges as Outlook. There also might be some security settings in Outlook that are preventing scripts from connecting. Maybe try GetActi...
by awel20
14 Jan 2019, 11:05
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 293

Re: Grouping Excel Pivot Table by month and year

Range.Group says that Periods is "An array of Boolean values" So maybe try this: VT_BOOL:=0xB MyArray := ComObjArray(VT_BOOL, 7) MyArray[0] := False MyArray[1] := False MyArray[2] := False MyArray[3] := False MyArray[4] := -1 MyArray[5] := False MyArray[6] := -1 xl.Range("A8").Group(True, True,, My...
by awel20
11 Jan 2019, 17:14
Forum: Ask For Help
Topic: Outlook .. Propertyaccessor, setting property
Replies: 1
Views: 125

Re: Outlook .. Propertyaccessor, setting property

; Error: 0x8002000E - Invalid number of parameters. ; e_Item.Propertyaccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x10800003") := 0x106 ;"PR_ICON_INDEX" e_Item.Propertyaccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x10800003", 0x106) ;"PR_ICON_INDEX" ; https://d...
by awel20
10 Jan 2019, 10:44
Forum: Ask For Help
Topic: Copy data to clipboard, Paste to Excel - COM or other method Topic is solved
Replies: 2
Views: 180

Re: Copy data to clipboard, Paste to Excel - COM or other method Topic is solved

Code: Select all

!c::ExcelPasteAtSelection()

ExcelPasteAtSelection()
{
    ClipSaved := ClipboardAll
    Clipboard := ""
    Send, ^c
    ClipWait, 1, 1
    Xl := ComObjActive("Excel.Application")
    Xl.Selection.PasteSpecial()
    Clipboard := ClipSaved
    return
}
by awel20
07 Jan 2019, 11:23
Forum: Ask For Help
Topic: Is "1 << 112" too big?
Replies: 12
Views: 508

Re: Is "1 << 112" too big?

Why not split it into two 64 bit ints? (or 4 x 32 bits, since AHK doesn't have unsigned 64 bit ints) This is just based on the wikipedia article, and it was written quickly so I'm not sure if it will work in every scenario. test1 := ExpandIPV6("2001:db8::ff00:42:8329") test2 := ExpandIPV6("2001:0db8...

Go to advanced search