Search found 5433 matches

by jeeswg
43 minutes ago
Forum: Ask For Help
Topic: getting a link's URL or the content of a tooltip
Replies: 4
Views: 672

Re: getting a link's URL or the content of a tooltip

This worked for me by using accParent. Perhaps the element under the cursor was too far down the hierarchy. Cheers. q:: ;google chrome - get address bar text (when hovered over it) Acc := Acc_ObjectFromPoint() Acc := Acc.accParent Acc := GetElementByName(Acc, "Address and search bar") if IsObject(Ac...
by jeeswg
Today, 13:59
Forum: Other Programming Languages
Topic: C++: TDM-GCC: error with bool
Replies: 1
Views: 18

C++: TDM-GCC: error with bool

- In relation to: MCode4GCC -- C/C++ to MCode Generator - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=4642 - I received an error message when trying to compile C++ code that used the 'bool' type: C:\Users\me\Desktop\z gcc temp source.c: In function 'inbufstr': C:\Users\me\...
by jeeswg
Today, 13:19
Forum: Tutorials
Topic: Beginners OOP with AHK
Replies: 38
Views: 7402

Re: Beginners OOP with AHK

@JnLlnd: If you want more info, you can try this. Cheers.
jeeswg's object classes tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=54588
by jeeswg
Yesterday, 12:49
Forum: Ask For Help
Topic: Execute script with ClassNN, and from bottom right position.. Topic is solved
Replies: 6
Views: 78

Re: Execute script with ClassNN, and from bottom right position.. Topic is solved

This would move the cursor to the centre of the control. q:: ControlGetFocus, vCtlClassNN, A if (SubStr(vCtlClassNN, 1, 14) = "AfxFrameOrView") { ControlGet, hCtl, Hwnd,, % vCtlClassNN, A WinGetPos, vCtlX, vCtlY, vCtlW, vCtlH, % "ahk_id " hCtl CoordMode, Mouse, Screen MouseMove, % vCtlX+vCtlW*0.5, %...
by jeeswg
Yesterday, 12:46
Forum: Ask For Help
Topic: #include only a part of the script included
Replies: 2
Views: 61

Re: #include only a part of the script included

Something like this perhaps, using GoSub. Cheers.

Code: Select all

MsgBox, % "1 auto-execute section"
GoSub MyLabel
return

MsgBox, % "x" ;not executed

MyLabel:
MsgBox, % "2"
return
by jeeswg
Yesterday, 05:36
Forum: Ask For Help
Topic: Need Help in using ACC library
Replies: 1
Views: 31

Re: Need Help in using ACC library

This may be relevant. Acc: get text from all window/control elements - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=40615 AccViewer might be useful, though you probably know about it already. Acc library (MSAA) and AccViewer download links - AutoHotkey Community https://aut...
by jeeswg
Yesterday, 05:28
Forum: Ask For Help
Topic: Execute script with ClassNN, and from bottom right position.. Topic is solved
Replies: 6
Views: 78

Re: Execute script with ClassNN, and from bottom right position.. Topic is solved

Perhaps like this.

Code: Select all

q::
ControlGetFocus, vCtlClassNN, A
if (SubStr(vCtlClassNN, 1, 14) = "AfxFrameOrView")
{
	ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
	WinGetPos, vCtlX, vCtlY,,, % "ahk_id " hCtl
	CoordMode, Mouse, Screen
	MouseMove, % vCtlX+5, % vCtlY+5
}
return
by jeeswg
Yesterday, 02:06
Forum: Ask For Help
Topic: Execute script with ClassNN, and from bottom right position.. Topic is solved
Replies: 6
Views: 78

Re: Execute script with ClassNN, and from bottom right position.. Topic is solved

Something like this might be useful. Cheers.

Code: Select all

q:: ;Notepad Find dialog - move cursor relative to Edit control
ControlGet, hCtl, Hwnd,, Edit1, A
WinGetPos, vCtlX, vCtlY,,, % "ahk_id " hCtl
CoordMode, Mouse, Screen
MouseMove, % vCtlX+5, % vCtlY+5
return
by jeeswg
12 Dec 2018, 20:36
Forum: Ask For Help
Topic: Coding with Ansi & Unicode compatibility question
Replies: 4
Views: 60

Re: Coding with Ansi & Unicode compatibility question

- I would suppose that lstrlen starts at the first byte and searches for the first null byte. - And that lstrlenW starts at the first short and searches for the first null short. - And so lstrlenW would work fine to handle UTF-16 strings, and might go beyond what it needed to when handling ANSI stri...
by jeeswg
12 Dec 2018, 20:22
Forum: Ask For Help
Topic: ELI5: ComObj - GUIDs - Etc
Replies: 3
Views: 76

Re: ELI5: ComObj - GUIDs - Etc

- Usually it's the other way round, I have a named GUID, and I want to know what the number is. - Usually I search .h files for the name in this folder: C:\Program Files (x86)\Windows Kits\8.1 Or a similar folder created by Visual Studio Express for Windows Desktop. - I did a search for 00000117-000...
by jeeswg
12 Dec 2018, 20:08
Forum: Ask For Help
Topic: how to repeat Control +
Replies: 3
Views: 39

Re: how to repeat Control +

If you're zooming on a webpage or some other program.

Code: Select all

SendInput, ^= ;once
SendInput, ^{= 2} ;twice
SendInput, ^{= 3} ;3 times
The + key is really the = key. Cheers.
by jeeswg
12 Dec 2018, 19:57
Forum: Ask For Help
Topic: Coding with Ansi & Unicode compatibility question
Replies: 4
Views: 60

Re: Coding with Ansi & Unicode compatibility question

- The main things to be aware of are: Str/AStr/WStr, and also Ptr. - All 3 of these will work on both AHK ANSI and AHK Unicode. DllCall("user32\MessageBox", Ptr,0, Str,"prompt", Str,"title", UInt,0) DllCall("user32\MessageBoxA", Ptr,0, AStr,"prompt", AStr,"title", UInt,0) DllCall("user32\MessageBoxW...
by jeeswg
12 Dec 2018, 15:20
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 373

Re: BitGet/BitPut (NumGet/NumPut for bits)

Haha no worries Helgef. :thumbup: I didn't think that there were necessarily any problems with your code. With tricky maths, even in my own code, I often break things down, simplifying it until I understand it 100%. (Although it's OK to squash everything together for performance in the real function...
by jeeswg
12 Dec 2018, 13:16
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 373

Re: BitGet/BitPut (NumGet/NumPut for bits)

- What issues do you see with << or >>? Is AHK a bit nonstandard re. this? - I'm surprised you didn't just point out the parentheses issue and answer my question!? And a facepalm emoticon ... really? - Except I'm not surprised, I think you take the ideas of 'I must never spoonfeed' or 'give people t...
by jeeswg
12 Dec 2018, 03:14
Forum: Ask For Help
Topic: which languages should I learn to learn DllCall and Windows API Functions?
Replies: 17
Views: 373

Re: which languages should I learn to learn DllCall and Windows API Functions?

- To learn a language deeply, I would (a) try to solve any problems I needed/wanted to solve, (b) try to solve any problems that I already knew I could solve in another language. - If you know one language *really* well, then that gives you more ideas from already-solved problems to draw from. - If ...
by jeeswg
11 Dec 2018, 20:10
Forum: Ask For Help
Topic: FGP (FileGetProperties) returning 0 when trying to get page count for PDF files
Replies: 28
Views: 1332

Re: FGP (FileGetProperties) returning 0 when trying to get page count for PDF files

- Thanks, I've been wanting to help with this, but I don't see any more I can do. - Here's some example code. Cheers. vPath := A_Desktop "\MyFile.pdf" oList := ["System.Document.PageCount", "Pages"] oArray := Filexpro(vPath,, oList*) ;oArray := Filexpro(vPath,, "System.Document.PageCount", "Pages") ...
by jeeswg
11 Dec 2018, 18:59
Forum: Scripts and Functions
Topic: [function] get Pdf metadata as an object
Replies: 6
Views: 103

Re: [function] get Pdf metadata as an object

Have a look at this.
jeeswg's object classes tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=54588
by jeeswg
11 Dec 2018, 17:45
Forum: Ask For Help
Topic: FGP (FileGetProperties) returning 0 when trying to get page count for PDF files
Replies: 28
Views: 1332

Re: FGP (FileGetProperties) returning 0 when trying to get page count for PDF files

- SKAN released this script which might be useful. Filexpro() : File Extended Properties as Object - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=59882 - To expand something I mentioned above. Running this script with AHK x64 or AHK x32 gave different behaviour, showing a '...
by jeeswg
11 Dec 2018, 16:54
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 530

Re: printf()

Is it possible to redirect StdOut error messages to the console? This didn't work: ;#Warn ;#Warn UseUnsetLocal, StdOut #Warn UseUnsetGlobal, StdOut ;#Warn LocalSameAsGlobal, StdOut ;#Warn UseUnsetGlobal, MsgBox DllCall("kernel32\AllocConsole") oStdOut := FileOpen("*", "w `n") Loop { var := Undefined...
by jeeswg
11 Dec 2018, 14:18
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 373

Re: BitGet/BitPut (NumGet/NumPut for bits)

- @Helgef: I find this kind of thinking by you odd. I had a wrong number reported and then a script crash, the issue was parentheses, that was the *real* cause. If you tell me that the problem is something to do with types, well yes it is, sort of, but that's more of a consequence of the real cause,...

Go to advanced search