Search found 29 matches

by mslonik
17 Sep 2019, 16:05
Forum: Scripts and Functions
Topic: Using Keyboard Numpad as a Mouse -- by deguix, update
Replies: 1
Views: 199

Re: Using Keyboard Numpad as a Mouse -- by deguix, update

Version 1.03: Added X2 (NumPadMul) to center cursor within active window area. The purspose is speed up of mouse cursor travel among various windows if several displays are available. Optimized saving of parameters. ; Using Keyboard Numpad as a Mouse -- by deguix ; http://www.autohotkey.com ; This s...
by mslonik
15 Sep 2019, 15:08
Forum: Scripts and Functions
Topic: Using Keyboard Numpad as a Mouse -- by deguix, update
Replies: 1
Views: 199

Using Keyboard Numpad as a Mouse -- by deguix, update

Dear Forum, I've found example of AHK code linked to help as a "Script Showcase" -> Using Keyboard Numpad as a Mouse by deguix as great and helpful. As a newbie decided to add something. So below I present some changes, maybe somebody will find it useful: o-------------------------------------------...
by mslonik
08 Sep 2019, 16:25
Forum: Scripts and Functions
Topic: Polish diactric keys (or diacritic)
Replies: 0
Views: 131

Polish diactric keys (or diacritic)

Dear Forum, Newbie wrote some working scripts. Let me share them with you. Why not, if I've received over last few months so much support from members of this forum. None of my questions was left unanswered or uncommented what encouraged me to write something. Well at least to me useful. I've found ...
by mslonik
14 Aug 2019, 07:13
Forum: Ask For Help
Topic: Gui, Button and GuiControlGet
Replies: 4
Views: 204

Re: Gui, Button and GuiControlGet

Dear just me,

thank you! Now it's clear. Again I feel gratefulness and shame. Yes, now it works and I even understand it.

Kind regards, mslonik
by mslonik
14 Aug 2019, 06:44
Forum: Ask For Help
Topic: Gui, Button and GuiControlGet
Replies: 4
Views: 204

Re: Gui, Button and GuiControlGet

Dear boiler, thank you for your prompt reply. Let me continue: #SingleInstance,Force MyGuiOutputVariable := "Anything" W1: Gui, W1: Add, Button, Default w250 gMyOK hwndButtonOkControlID vButtonOKName, Any&Thing Gui, W1: Show, Center, Single control button Gui, W1: Submit, NoHide GuiControlGet, MyGui...
by mslonik
14 Aug 2019, 06:07
Forum: Ask For Help
Topic: Gui, Button and GuiControlGet
Replies: 4
Views: 204

Gui, Button and GuiControlGet

Dear Forum, for some still unclear and confusing to me reason I can't get expected feedback from GuiControlGet function. Please see the following example: #SingleInstance,Force MyGuiOutputVariable := "Anything" W1: Gui, W1: Add, Button, Default w250 gMyOK hwndButtonOkControlID vButtonOKName, Any&Thi...
by mslonik
24 Apr 2019, 03:16
Forum: Ask For Help
Topic: COM MS Word, call to GetPressedMso method
Replies: 5
Views: 379

Re: COM MS Word, call to GetPressedMso method

You're right, I should use Google for that purpose prior to asking here. Again I've learnt something useful: my knowledge about MS Word and AHK is still at a preliminary level. Now, after further reading I realized that my confusion is rather ignorance in regard of MS Word API :-) This is a good les...
by mslonik
21 Apr 2019, 03:15
Forum: Ask For Help
Topic: COM MS Word, call to GetPressedMso method
Replies: 5
Views: 379

Re: COM MS Word, call to GetPressedMso method

Dear swagfag, at first: thank you for your answer. Indeed it helped to change SelectionPane to Selection and Visibility . Why did I change it? Two reasons for that: 1. Suggestion coming from another forum: (...)//stackoverflow.com/questions/24970016/how-to-activate-make-visible-enable-show-selection...
by mslonik
20 Apr 2019, 05:54
Forum: Ask For Help
Topic: COM MS Word, call to GetPressedMso method
Replies: 5
Views: 379

COM MS Word, call to GetPressedMso method

Dear Forum, I don't know how to convert the following VBA code to AHK. VBA code: Sub Makro1() If Not CommandBars.GetPressedMso("SelectionPane") Then CommandBars.ExecuteMso ("SelectionPane") End Sub AHK code which I've been trying: oWord := ComObjActive("Word.Application") if (oWord.CommandBars.GetPr...
by mslonik
29 Mar 2019, 03:40
Forum: Ask For Help
Topic: AHK and VBA of MS Word, shape to selected canvas
Replies: 2
Views: 248

Re: AHK and VBA of MS Word, shape to selected canvas

Finally, I solved it:

Code: Select all

oWord := ComObjActive("Word.Application")
oWord.Selection.ShapeRange.CanvasItems.AddShape(msoShapeRectangle := 1, 100, 100, 70, 30)
oWord := "" ; Clear global COM objects when done with them
Now it seems easy...
by mslonik
29 Mar 2019, 02:49
Forum: Ask For Help
Topic: AHK and VBA of MS Word, shape to selected canvas
Replies: 2
Views: 248

Re: AHK and VBA of MS Word, shape to selected canvas

Small progress. Now I'm able to add a shape to a new canva in a document: oWord := ComObjActive("Word.Application") shpCanvas := oWord.ActiveDocument.Shapes.AddCanvas(100, 75, 150, 200) shpCanvas.CanvasItems.AddShape(msoShapeRectangle := 1, 100, 100, 70, 30) oWord := "" I'm able also to select exist...
by mslonik
28 Mar 2019, 11:10
Forum: Ask For Help
Topic: AHK and VBA of MS Word, shape to selected canvas
Replies: 2
Views: 248

AHK and VBA of MS Word, shape to selected canvas

Dear Forum, I'd like to add a shape to the selected canva within existing MS Word document. I can't figure out how to do that. This time macro recorder of MS Word doesn't bring any help. My unsuccessful attempts: oWord.ActiveDocument.Selection.Shapes.AddShape(msoShapeRectangle := 1, 100, 100, 70, 30...
by mslonik
28 Mar 2019, 08:17
Forum: Ask For Help
Topic: MS Word, VBA, ShapeRange Transparency
Replies: 8
Views: 650

Re: MS Word, VBA, ShapeRange Transparency

Dear Forum, problem is SOLVED! I can't believe it, but here you go: 1. Code line which didn't work: oWord.Selection.ShapeRange.Fill.Transparency := 0.5 Error: Error: 0x80020005 - Type mismatch Specifically: Transparency 2. Code, which works fine: oWord.Selection.ShapeRange.Fill.Transparency := 0,5 I...
by mslonik
28 Mar 2019, 07:19
Forum: Ask For Help
Topic: MS Word, VBA, ShapeRange Transparency
Replies: 8
Views: 650

Re: MS Word, VBA, ShapeRange Transparency

Dear Forum,

in the mean time I've switched off all COM extensions and then I've restarted Microsoft Word. It didn't solve the issue.

Kind regards, mslonik
by mslonik
28 Mar 2019, 03:09
Forum: Ask For Help
Topic: MS Word, VBA, ShapeRange Transparency
Replies: 8
Views: 650

Re: MS Word, VBA, ShapeRange Transparency

Thank you again for replies. I tried all versions of your tips. Problem is still not solved at my PC. Maybe it's time to show you a whole script which I run. I tried to constrain content as much as possible, so I cut out all other content. Even then and even if this script runs as the only one (stan...
by mslonik
27 Mar 2019, 13:44
Forum: Ask For Help
Topic: MS Word, VBA, ShapeRange Transparency
Replies: 8
Views: 650

Re: MS Word, VBA, ShapeRange Transparency

Thank you for your prompt reply. Except definitions for constants WordTrue and WordFalse your code is equal to mine. Sorry I didn't post definitions of constants initially. My definitions for these constants are simpler (I didn't yet check if it works with your definitions as it seems to me that tho...
by mslonik
27 Mar 2019, 11:06
Forum: Ask For Help
Topic: MS Word, VBA, ShapeRange Transparency
Replies: 8
Views: 650

MS Word, VBA, ShapeRange Transparency

Dear Forum, I try to convert the following code from VBA to AHK, which inserts water mark to chosen section of a document: ActiveDocument.Sections(1).Range.Select ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.HeaderFooter.Shapes.AddTextEffect(PowerPlusWaterMarkObject73958...
by mslonik
02 Mar 2019, 17:06
Forum: Ask For Help
Topic: MS Word, inserting of Building Block
Replies: 2
Views: 320

Re: MS Word, inserting of Building Block

First of all: it works! Thank you very much for your time and attention. Again you've helped me: quickly, precisely, efficiently. Maybe it looks like smth. small, but I've spent several hours (!) trying to figure out what am I doing wrong before I decided to ask for help... Hopefully after receiving...
by mslonik
01 Mar 2019, 18:42
Forum: Ask For Help
Topic: MS Word, inserting of Building Block
Replies: 2
Views: 320

MS Word, inserting of Building Block

Dear Forum, I try to insert previously defined building block in MS Word document. The building block was defined in template, which is attached active document. Some examples of code which seems to work oWord := ComObjActive("Word.Application") VarTemp := oWord.ActiveDocument.AttachedTemplate oWord...
by mslonik
01 Mar 2019, 18:22
Forum: Ask For Help
Topic: MS Word, read of AttachedTemplate property
Replies: 2
Views: 333

Re: MS Word, read of AttachedTemplate property

Thank you, it works. What's more, your answer helped me to grasp idea of COM Properties. Now my problem looks to me fairly simple.

Kind regards, mslonik

Go to advanced search