Search found 71 matches

by Datapoint
08 Jun 2019, 00:30
Forum: Ask For Help
Topic: New to Using Libraries, Not Understanding How Vista Audio Control Functions works
Replies: 4
Views: 406

Re: New to Using Libraries, Not Understanding How Vista Audio Control Functions works

Thanks for the reply. I tried what you put Device := VA_GetDevice("playback") MsgBox % Device DeviceName := VA_GetDeviceName(Device) MsgBox % DeviceName and it works giving me the correct device name on the second msgbox. On the first one though, what does that number mean, if it stayed the same ev...
by Datapoint
07 Jun 2019, 23:39
Forum: Ask For Help
Topic: New to Using Libraries, Not Understanding How Vista Audio Control Functions works
Replies: 4
Views: 406

Re: New to Using Libraries, Not Understanding How Vista Audio Control Functions works

Hi No clue what: CLSID_MMDeviceEnumerator := "{BCDE0395-E52F-467C-8E3D-C4579291692E}" , IID_IMMDeviceEnumerator := "{A95664D2-9614-4F35-A746-DE8DB63617E6}" means, i'm guessing the numbers are addresses in Windows memory? Not memory addresses... You can think of them as unique ID numbers (stored in t...
by Datapoint
31 May 2019, 13:29
Forum: Ask For Help
Topic: Not able to create Outlook Mail Item
Replies: 3
Views: 326

Re: Not able to create Outlook Mail Item

Am I to believe that I need to use GetNameSpace to access folders and emails within my account? Or, if I already have Outlook open, I can continue to manipulate it with ComObjActive("Outlook.Application")? Application and NameSpace; you don't just use one or the other. If you want to access a membe...
by Datapoint
15 May 2019, 19:51
Forum: Ask For Help
Topic: Coloring the Excel Cell Topic is solved
Replies: 28
Views: 2618

Re: Coloring the Excel Cell Topic is solved

hasantr wrote:So it worked great. Thank you all. :)
Cool script. Glad to hear it works.
BTW the PixelGetColor default is BGR.

Code: Select all

PixelGetColor, OutputVar1, 500, 500, RGB
PixelGetColor, OutputVar2, 500, 500
MsgBox % Format("0x{:x}", OutputVar1) "`n" Format("0x{:x}", OutputVar2)
by Datapoint
14 May 2019, 22:00
Forum: Ask For Help
Topic: Coloring the Excel Cell Topic is solved
Replies: 28
Views: 2618

Re: Coloring the Excel Cell Topic is solved

If !IsObject(XL) XL := ComObjCreate("Excel.Application") Looks like you are creating instances of Excel without ever making them visible. And your script doesn't show quitting Excel or clearing the variables that contain COM objects. Both of these things can create hard-to-find problems for beginne...
by Datapoint
11 May 2019, 14:58
Forum: Ask For Help
Topic: Need Help With a RegexReplace function Topic is solved
Replies: 6
Views: 579

Re: Need Help With a RegexReplace function Topic is solved

I have a list. I want to remove everything that isn't "CG 707" so that is the only line items on my list after I run the script. I'm having a bit of trouble understanding what you want to do. So given this input you want to keep only the lines that contain "CG 707"? XW CG 707-WYUTWLCM1-BDIRCT037GT ...
by Datapoint
30 Apr 2019, 23:26
Forum: Ask For Help
Topic: How to call [class.function] from [class.function.subroutine]? Topic is solved
Replies: 4
Views: 462

Re: How to call [class.function] from [class.function.subroutine]? Topic is solved

Not sure. I think the thread that created the gui needs to still exist.

Code: Select all

	__New()
	{
		Gui, Add, Button,  h300 w300 gDoSomething, Button
		Gui, Show, w500 h500, abc
		WinWaitClose, abc
		return
		DoSomething:
			this.do_thing()
		return
	}
by Datapoint
28 Apr 2019, 14:25
Forum: Ask For Help
Topic: COM MS Word, call to GetPressedMso method
Replies: 5
Views: 577

Re: COM MS Word, call to GetPressedMso method

mslonik wrote:
24 Apr 2019, 03:16
You're right, I should use Google for that purpose prior to asking here.
Thanks, glad it helped. But I didn't mean it like, "Just google it." Just like you, I found it was hard and unintuitive to find the values. The first thing I checked was the Help/IDE but there wasn't anything there.
by Datapoint
22 Apr 2019, 08:38
Forum: Ask For Help
Topic: Attaching Excel Sheet
Replies: 24
Views: 1966

Re: Attaching Excel Sheet

Indhu wrote:
22 Apr 2019, 00:27
My AHK version is: 1.0.48.05, 32 bit, and ANSI encoding.
That's AHK "Basic" / "Classic". It doesn't have objects or COM etc. You need a newer version to use COM. (or use the old COM standard library with that version. Upgrade to AHK 1.1+ if possible)
by Datapoint
21 Apr 2019, 16:48
Forum: Ask For Help
Topic: COM MS Word, call to GetPressedMso method
Replies: 5
Views: 577

Re: COM MS Word, call to GetPressedMso method

mslonik wrote:
21 Apr 2019, 03:15
indeed I wasn't able to determine values of idMso. How did you manage to find it?
I think you could google "idMso" and get some good results.

The F7 hotkey from this script will show the commands that are available in your version of Word.
by Datapoint
19 Apr 2019, 15:37
Forum: Ask For Help
Topic: Issues working with two Excel files
Replies: 8
Views: 1013

Re: Issues working with two Excel files

If you are trying to click on a cell: Excel_Get().ActiveCell.Activate (Works on the active window, unlike ComObjActive. And also works in multiple excel instances.) Although it is kind of redundant to click on the active cell. Do you just want to change the value or something? I don't understand why...
by Datapoint
13 Apr 2019, 09:29
Forum: Ask For Help
Topic: Issues working with two Excel files
Replies: 8
Views: 1013

Re: Issues working with two Excel files

I am running each independent of each other (each can be open in its own screen)… Instead of: oExcel := ComObjActive("Excel.Application") try: oExcel := Excel_Get() - Excel_Get What is the COM table and how would one access it? :arrow: https://www.autohotkey.com/boards/viewtopic.php?p=134048#p134048
by Datapoint
01 Mar 2019, 19:23
Forum: Ask For Help
Topic: MS Word, inserting of Building Block
Replies: 2
Views: 454

Re: MS Word, inserting of Building Block

;~ oWord.ActiveDocument.Selection.Range.InsertAfter(VarTemp.BuildingBlockEntries("tabela")) ; it doesn't work To figure out by myself above problem I've used the following resources: 1. Macro recorded in MS Word: Sub Makro1() Application.Templates( _ "S:\OrgFirma\Szablony\Word\OgolneZmakrami\TQ-S40...
by Datapoint
24 Feb 2019, 12:14
Forum: Ask For Help
Topic: AHK: Excel_Autofilter
Replies: 3
Views: 554

Re: AHK: Excel_Autofilter

inseption86 wrote:
24 Feb 2019, 07:55

Code: Select all

Lang := xl.Worksheets(1).AutoFilter.Range.Columns("E").SpecialCells(12).row + 1.value ???????
SpecialCells returns a Range object, so you should be able to use Range.Offset like this:

Code: Select all

Lang := xl.Worksheets(1).AutoFilter.Range.Columns("E").SpecialCells(12).Offset(1, 0).Value
by Datapoint
24 Feb 2019, 12:01
Forum: Ask For Help
Topic: COM Error: 0x80070057
Replies: 3
Views: 592

Re: COM Error: 0x80070057

Can you please explain from where value 0xB comes from in your example: oWord.Selection.ParagraphFormat.KeepWithNext := ComObject(0xB, -1) Creates an object representing a typed value to be passed as a parameter or return value. ParamObj := ComObject(VarType, Value [, Flags]) 'VarType' determines t...
by Datapoint
22 Feb 2019, 21:11
Forum: Ask For Help
Topic: COM Error: 0x80070057
Replies: 3
Views: 592

Re: COM Error: 0x80070057

The value of "true" is actually -1 . 1 only works sometimes. As a last resort you can try x := := ComObject(0xB, -1) Try this: #IfWinActive, ahk_class OpusApp r:: oWord := ComObjActive("Word.Application") oWord.Selection.ParagraphFormat.KeepWithNext := -1 oWord := "" ; Clear global COM objects when ...
by Datapoint
01 Feb 2019, 16:16
Forum: Ask For Help
Topic: VBA to Ahk remove duplicates
Replies: 5
Views: 806

Re: VBA to Ahk remove duplicates

ActiveSheet.Range("$A$1:$G$13").RemoveDuplicates Columns:=Array(1, 7), Header _ :=xlYes VT_VARIANT := 0xC xlYes := 1 numberOfColumns := 2 Columns := ComObjArray(VT_VARIANT, numberOfColumns) Columns[0] := 1 Columns[1] := 7 xlApp := ComObjActive("Excel.Application") xlApp.ActiveSheet.Range("A1:G13")....
by Datapoint
27 Jan 2019, 15:24
Forum: Ask For Help
Topic: COM object script works inconsistently
Replies: 7
Views: 1051

Re: COM object script works inconsistently

TLM wrote:
27 Jan 2019, 15:18
but why not use 1 object??
In case you close Word and open another instance before you reload the script?
by Datapoint
27 Jan 2019, 14:44
Forum: Ask For Help
Topic: COM object script works inconsistently
Replies: 7
Views: 1051

Re: COM object script works inconsistently

TLM wrote:
27 Jan 2019, 14:43
Datapoint wrote:
27 Jan 2019, 14:40

Code: Select all

!Numpad2::ComObjActive("Word.Application").Selection.Range.HighlightColorIndex := 4 ;highlight color

!Numpad3::ComObjActive("Word.Application").Selection.Range.HighlightColorIndex := 3 ;highlight color
these will not work as objects in AHk must be assigned.
u sure?

Go to advanced search