Search found 75 matches

by Datapoint
26 Jul 2020, 08:40
Forum: Ask For Help
Topic: Excel: Find address of selection using COM Topic is solved
Replies: 10
Views: 3407

Re: Excel: Find address of selection using COM Topic is solved

I modified Joe's XL_Format_HAlign so that it will take whatever cell(s) are selected, instead of having to define the range first: ;------------------------------------------------------------- ExcelActions_HAlign(ByRef XL, RG="", h="2"){ Cell_address = % XL.ActiveCell.Address[1,1] Range_address :=...
by Datapoint
26 Jul 2020, 08:07
Forum: Ask For Help
Topic: Excel-AHK
Replies: 3
Views: 1490

Re: Excel-AHK

ComObjActive("Excel.Application").ActiveSheet.Next.Activate ; activate next ComObjActive("Excel.Application").ActiveSheet.Previous.Activate ; activate prev. ComObjActive("Excel.Application").ActiveWorkbook.Worksheets(3).Activate ; activate #3 ComObjActive("Excel.Application").ActiveWorkbook.Workshe...
by Datapoint
26 Jul 2020, 07:56
Forum: Ask For Help
Topic: Excel: insert rectangle
Replies: 5
Views: 1627

Re: Excel: insert rectangle

msoShapeRectangle := 1, xlHAlignCenter := -4108, xlVAlignCenter := -4108 xl := ComObjActive("Excel.application") TxtFrm := xl.ActiveSheet.Shapes.AddShape(msoShapeRectangle, 10, 10, 200, 100).TextFrame TxtFrm.Characters.Text := "This is a rectangle" TxtFrm.HorizontalAlignment := xlHAlignCenter TxtFr...
by Datapoint
24 Apr 2020, 11:12
Forum: Ask For Help
Topic: Slicer excel VBA to AHK
Replies: 5
Views: 467

Re: Slicer excel VBA to AHK

I didn't test this but I think it should be something like this: /* ActiveWorkbook.SlicerCaches("Slicer_Date.Month3").VisibleSlicerItemsList = _ * Array( _ * "[Date].[Month].&[4]", "[Date].[Month].&[5]") * ActiveWorkbook.SlicerCaches("Slicer_Date.Day_In_Month").VisibleSlicerItemsList _ * = Array( _ ...
by Datapoint
03 Dec 2019, 22:33
Forum: Ask For Help
Topic: Hotkey in Excel stops before finishing
Replies: 2
Views: 393

Re: Hotkey in Excel stops before finishing

Hi AbooMatta, Your script is probably sending keystrokes faster than Excel can handle. If one step takes Excel a bit more time to do but your script keeps sending stuff in the meantime then the script will get out of sync with Excel. Maybe try adding Sleeps between some actions to try to improve the...
by Datapoint
08 Nov 2019, 00:11
Forum: Ask For Help
Topic: parsing above with regexmatch instead of below Topic is solved
Replies: 10
Views: 1079

Re: parsing above with regexmatch instead of below Topic is solved

Based on the other thread from https://www.autohotkey.com/boards/viewtopic.php?f=76&t=69631 the following should add the 'details' to the match.. it's trivial to just match the previous line. #NoEnv SetBatchLines, -1 nma2 := "nma2" clip := " (Join`r`n zzzzzz xxxxx nma2 X example (not this one) Y exa...
by Datapoint
03 Nov 2019, 07:28
Forum: Ask For Help
Topic: Why Excel Addins is Wrong?
Replies: 12
Views: 1904

Re: Why Excel Addins is Wrong?

try to add .Application It looks like it may need to be Application.COMAddIns . No. Wrong. objExcel in the posted code contains an application object. objExcel.Application is the same as Application.Application :facepalm: from time to time people do not understand the differences between AHk vs VBA...
by Datapoint
28 Sep 2019, 09:03
Forum: Ask For Help
Topic: Array of Arrays for MS Excel VBA txt file reading (some different txt format) Topic is solved
Replies: 18
Views: 1816

Re: Array of Arrays for MS Excel VBA txt file reading (some different txt format) Topic is solved

White_Whale wrote:
28 Sep 2019, 00:47
I tried

Code: Select all

	tempArray%A_Index%[0] := 1
Shouldn't it be the column number? Like this:

Code: Select all

	tempArray%A_Index%[0] := A_Index
White_Whale wrote:
28 Sep 2019, 00:47

Code: Select all

RegExReplace(myContent, ".+\r\n",, lineCounts)
White_Whale wrote:
28 Sep 2019, 01:13
ah, "lineCounts" should be "columnCounts" but that is not the point here
Did you change the RegEx to count tabs (columns)?
by Datapoint
07 Sep 2019, 16:52
Forum: Ask For Help
Topic: Handle multiple open Excel files with ComObj Topic is solved
Replies: 16
Views: 2018

Re: Handle multiple open Excel files with ComObj Topic is solved

#k:: wb1 := ComObjGet(A_Desktop "\1.xlsx") wb2 := ComObjGet(A_Desktop "\2.xlsx") MsgBox % wb1.ActiveSheet.Range("A1").Text MsgBox % wb2.ActiveSheet.Range("A1").Text last_cell := wb1.Sheets("DE Doc").Range("A:A").SpecialCells(11).row new_cell := wb1.Sheets("DE Doc").Range("A" last_cell+1) new_cell.v...
by Datapoint
10 Jul 2019, 23:21
Forum: Ask For Help
Topic: Quotation Marks and Variables
Replies: 4
Views: 669

Re: Quotation Marks and Variables

try

Code: Select all

Instruction := "The category is " Category
:arrow: https://www.autohotkey.com/docs/Variables.htm#Intro

Code: Select all

MyNumber := 123
MyString := "This is a literal string."
CopyOfVar := Var  ; Unlike its counterpart in the previous section, percent signs are not used with the := operator.
by Datapoint
06 Jul 2019, 02:31
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

doncole wrote:
05 Jul 2019, 23:40
Image
I found it but looks different than your picture.
Thank you. :) :) :)
I don't see your image.

The only way I can make sense of your comments is that maybe you are using a different theme.
by Datapoint
05 Jul 2019, 23:27
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

Here, I found it for you:
https://www.autohotkey.com/boards/memberlist.php?mode=viewprofile&u=79083
as I said before, click "Search user’s posts" on that page
by Datapoint
05 Jul 2019, 23:04
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

Are you using a weird browser?
Are you using something that blocks content from being shown on webpages?
It's literally at the top of this page.
by Datapoint
05 Jul 2019, 22:42
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

Untitled.png
Untitled.png (228.54 KiB) Viewed 2235 times
by Datapoint
05 Jul 2019, 22:26
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

doncole wrote:
05 Jul 2019, 22:15
Top right of what page?
This page or any other. ;)
by Datapoint
05 Jul 2019, 20:48
Forum: Offtopic
Topic: How to find my last post
Replies: 13
Views: 2282

Re: How to find my last post

Go to your profile (top right):
Untitled.png
User Profile
Untitled.png (38.77 KiB) Viewed 2277 times

then click "Search user’s posts"
by Datapoint
05 Jul 2019, 19:55
Forum: Ask For Help
Topic: Finding Excel File. Loop, Files Topic is solved
Replies: 14
Views: 2286

Re: Finding Excel File. Loop, Files Topic is solved

Try it like this. You need to save A_LoopFileFullPath because it will be blank outside the loop. !q:: inputbox, userinput, Enter Full Project ID, , ,300 ,100 ; If the user pressed cancel or the string is too short if (ErrorLevel || StrLen(userinput) = 0) MsgBox, No file specified ;sleep, 500 FoundFi...
by Datapoint
01 Jul 2019, 10:48
Forum: Ask For Help
Topic: Regex to remove comment lines Topic is solved
Replies: 6
Views: 841

Re: Regex to remove comment lines Topic is solved

"`am)^\s*;.*(?:\R|$)"
by Datapoint
30 Jun 2019, 22:43
Forum: Ask For Help
Topic: Read Excel Line, Then Move to Next Row w/ Changing Variables
Replies: 12
Views: 2256

Re: Read Excel Line, Then Move to Next Row w/ Changing Variables

The one thing that puzzles me is, why we would need to make them visible (I presume stating "Xl.Visible := True" ?) . Unnecessary and often unwanted in my view. Yeah, code posted in answers in the Ask For Help forums should be assumed to be part of a larger script and the suggestions should be narr...

Go to advanced search