Search found 156 matches

by LinearSpoon
09 Nov 2017, 04:00
Forum: Ask For Help
Topic: DllCall a memory address - what is it doing?
Replies: 1
Views: 54

Re: DllCall a memory address - what is it doing?

I'd guess pStream is pointing to a C++ object which has a vtable. The inner numget loads the vtable address, and the outer numget loads a particular function pointer from the vtable. You can read about virtual tables on wikipedia: https://en.wikipedia.org/wiki/Virtual_method_table I would prefer the...
by LinearSpoon
28 Oct 2017, 10:10
Forum: Ask For Help
Topic: MCode for 64bit Gdip_AlphaMask Topic is solved
Replies: 2
Views: 74

Re: MCode for 64bit Gdip_AlphaMask Topic is solved

You are correct, the MCode will be different for 32 bit vs 64 bit. I've rewritten the function to work on any version of AHK. Be sure to use a 64 bit compatible version of GDIP (gdip_all.ahk). MCode(mcode) { static e := {1:4, 2:1}, c := (A_PtrSize=8) ? "x64" : "x86" if (!regexmat...
by LinearSpoon
26 Oct 2017, 23:34
Forum: Ask For Help
Topic: Help with DllCall Function and gpcomms.dll
Replies: 1
Views: 38

Re: Help with DllCall Function and gpcomms.dll

Make sure you aren't mixing a 32 bit dll with 64 bit ahk or vice-versa ;)
by LinearSpoon
26 Oct 2017, 22:37
Forum: Ask For Help
Topic: Flood Fill Crashing AHK Issue
Replies: 1
Views: 75

Re: Flood Fill Crashing AHK Issue

I haven't investigated closely, but my guess is too many recursive calls. I don't really see any other code that could cause an issue in look_around. Here is a sample that reproduces the crash: myfn(a) { if (mod(a, 50) == 0) msgbox % a myfn(a+1) } myfn(0) One fix would be to rewrite look_around as a...
by LinearSpoon
25 Oct 2017, 11:45
Forum: Ask For Help
Topic: How to get Caret string position from Edit Controls? Topic is solved
Replies: 4
Views: 246

Re: How to get Caret string position from Edit Controls? Topic is solved

One solution with the EM_GETSEL message: gui, add, edit, w300 h200 gGetCaret +HwndControlId, gui, add, Text, w300 vCaretInfo, Caret Info gosub, GetCaret gui, show return GetCaret: ;________ get carete position _____ ~*LButton:: ;"~" keeps the button original function ~*Up:: ~*Right:: ~*Lef...
by LinearSpoon
28 Jun 2017, 19:17
Forum: Offtopic
Topic: « What's on your mind? » Topic is solved
Replies: 3645
Views: 373773

Re: « What's on your mind? » Topic is solved

Some russians on this site keep sending me messages :think:
by LinearSpoon
26 Jun 2015, 08:52
Forum: Ask For Help
Topic: [SOLVED] Help calling Shell_NotifyIconGetRect(), build NOTIFYICONIDENTIFIER structure
Replies: 3
Views: 1006

Re: Help calling Shell_NotifyIconGetRect(), build NOTIFYICONIDENTIFIER structure

For reference, here is the layout of the structure on all AHK builds: ANSI/Unicode 32 Struct: NOTIFYICONIDENTIFIER total size: 28 Member Pos C++ Type AHK Type cbSize @ 0 unsigned long uint hWnd @ 4 struct HWND__ * ptr uID @ 8 unsigned int uint guidItem @ 12 struct _GUID Unicode 64 bit Struct: NOTIFY...
by LinearSpoon
14 May 2015, 18:14
Forum: About This Community
Topic: Forum upgraded to phpBB v3.1.x
Replies: 177
Views: 94615

Re: Forum upgraded to phpBB v3.1.x

Code boxes are very difficult to read on Digi (Dark Blue)... If you can't change the highlighting, is there at least a way to change the background of code tags to a lighter color?
Image
by LinearSpoon
31 Mar 2015, 18:29
Forum: Ask For Help
Topic: [SOLVED] Problem getting old function regiongetcolor to work
Replies: 2
Views: 502

Re: Problem getting old function regiongetcolor to work

Everything works fine as posted on 32 bit AHK. I'm guessing you're running 64 bit AHK, which is a problem here since machine code differs between them. I couldn't find the C code infogulch used, but based on the function name and parameters I think I have guessed the intent. Replace SumIntBytes with...
by LinearSpoon
24 Mar 2015, 17:47
Forum: Ask For Help
Topic: [SOLVED] SSD disk + log file (modify last access time)
Replies: 6
Views: 1020

Re: [HELP] SSD disk + log file (modify last access time)

I am unable to replicate this by simply opening the file. I have tested when the file was on an SSD and a "classic" hard drive, opening with Notepad, Notepad++, Visual Studio, SciTE4AutoHotkey, and HxD. Is it possible the program that creates the log file is updating it? You might want to ...
by LinearSpoon
19 Feb 2015, 00:45
Forum: Ask For Help
Topic: How does A_IsAdmin work?
Replies: 8
Views: 1361

Re: How does A_IsAdmin work?

This looks promising, but I've not tried it myself.
How to tell if the current user is in administrators group
by LinearSpoon
02 Feb 2015, 20:58
Forum: Ask For Help
Topic: Fungus Could Be Among Us
Replies: 9
Views: 1634

Re: Fungus Could Be Among Us

Found this:
https://github.com/unlimitedbacon/kfungus

I haven't tried it but python is cross platform so I would expect this would work for you.
by LinearSpoon
29 Jan 2015, 09:06
Forum: Ask For Help
Topic: Questions about DllCall's
Replies: 109
Views: 10677

Re: Questions about DllCall's

@jNizM
ULARGE_INTEGER is a union that is basically a UInt64. So in AHK, PULARGE_INTEGER is a "UInt64*", but AHK uses signed 64 bit integers. You'd probably be best off if you do what it says in the DllCall manual, ie: use Int64 and interpret negative values as very large values.
by LinearSpoon
24 Jan 2015, 11:29
Forum: Ask For Help
Topic: String appending - how does it work
Replies: 3
Views: 637

Re: String appending - how does it work

Add VarSetCapacity(string,-1) after the DllCall. The DllCall modifies the string, AHK's internal string length counter now has the wrong value. Append is probably optimized to jump to the end of the string based on the length counter rather than searching for the NULL. VarSetCapacity(str...
by LinearSpoon
14 Jan 2015, 17:34
Forum: Ask For Help
Topic: How can I prevent a program to open more than one window?
Replies: 5
Views: 742

Re: How can I prevent a program to open more than one window

You might get away with just changing the exe filename on one version. I don't have firefox installed so I can't really say if that might break anything (such as updating).

Then all you have to do is keep track of which one is running, and watch for the other version to pop up.
by LinearSpoon
14 Jan 2015, 14:42
Forum: Ask For Help
Topic: Search for selection "inside quotes" on Google
Replies: 11
Views: 1293

Re: Search for selection "inside quotes" on Google

Your problem is most likely that characters like quote and space need to be escaped in urls. This is sort of a brute force solution that just escapes the entire search term. SetFormat, Integer, H !#g:: ;Requires integer format set to hex (See SetFormat command) selection := getSelection() str := &qu...
by LinearSpoon
14 Jan 2015, 00:01
Forum: Ask For Help
Topic: PixelSearch faster than Gdip on benchmarks?
Replies: 2
Views: 2440

Re: PixelSearch faster than Gdip on benchmarks?

There is a lot of overhead in the GDIP_BitmapFromScreen call. It uses GDI to copy the screen into a bitmap, then converts that into a format usable by GDIP (which is GDI "plus"). If your only goal is to read a single pixel off the screen repeatedly, you don't even need GDIP. You can and sh...
by LinearSpoon
12 Jan 2015, 17:10
Forum: Ask For Help
Topic: [solved] 7-zip dll in AHK
Replies: 22
Views: 3880

Re: 7-zip dll in AHK

Assuming you got the dll from here: https://sevenzipsharp.codeplex.com/ I've looked at it and it doesn't seem to export any functions at all. At least, not in the way DllCall wants them. I don't know how easy it would be to get it working; I can't find an example of how to use a C# dll that doesn't ...
by LinearSpoon
26 Oct 2014, 19:30
Forum: Ask For Help
Topic: Getting the size of a data type
Replies: 13
Views: 2126

Re: Getting the size of a data type

char: 1 short: 2 int: 4 int64: 8 float: 4 double: 8 ptr: A_PtrSize (built in variable) Unsigned types are the same size as above, the only difference is that they represent a different range of values. These aren't going to change since AHK defines their sizes. Presumably if there is ever a 128 bit ...
by LinearSpoon
06 Oct 2014, 05:53
Forum: Offtopic
Topic: « What's on your mind? » Topic is solved
Replies: 3645
Views: 373773

Re: « What's on your mind? » Topic is solved

Anyone know why different Windows versions have different memory limits? (Not talking about 32 vs 64 bit). For example, Windows 7 limits . Is this just a sales decision Microsoft makes to sell more expensive Windows versions, or is there some software overhead required to make Windows work at higher...

Go to advanced search