Search found 182 matches

by Miguel7
21 Dec 2017, 09:33
Forum: Other Programming Languages
Topic: [SOLVED] How do AHK's A_ScreenWidth/Height work?
Replies: 7
Views: 176

Re: How do AHK's A_ScreenWidth/Height work?

@jeeswg - Thanks for the suggestion. I like the idea of trying something in AHK to then translate it into C++, mostly because it would give me a lot more experience with DllCall and maybe lead to some fun AHK projects using open-source libs I use all the time. But in the end, it was querty12's answe...
by Miguel7
21 Dec 2017, 08:31
Forum: Other Programming Languages
Topic: [SOLVED] How do AHK's A_ScreenWidth/Height work?
Replies: 7
Views: 176

Re: How do AHK's A_ScreenWidth/Height work?

@nnnik - Thanks for explaining all that! I assumed the code had something to do with the interpreter but never actually knew how an interpreter works. I've also never seen nested ternary operators like that before (though obviously it works) - guess they were trying to be Pythonic even though it's C...
by Miguel7
20 Dec 2017, 16:40
Forum: Other Programming Languages
Topic: [SOLVED] How do AHK's A_ScreenWidth/Height work?
Replies: 7
Views: 176

Re: How do AHK's A_ScreenWidth/Height work?

Yeah, I've often had a hard time understanding the AHK source; so much of it seems to be in supporting the interpreter for the custom language that figuring out the actual functionality is like finding that one Christmas light out of hundreds that isn't lighting (lol). So I went where you suggested ...
by Miguel7
20 Dec 2017, 15:56
Forum: Other Programming Languages
Topic: [SOLVED] How do AHK's A_ScreenWidth/Height work?
Replies: 7
Views: 176

[SOLVED] How do AHK's A_ScreenWidth/Height work?

Hey. I've been working on a C++ function to save a screenshot of the entire desktop to memory (for some cool computer vision stuff with OpenCV later) and I've run into a kinda weird problem: None of the Win32 APIs seem to be able to include the entire screen. Here's some of the things I've tried: //...
by Miguel7
01 Dec 2017, 23:41
Forum: Ask For Help
Topic: DllCall/A_LastError confusion
Replies: 2
Views: 75

DllCall/A_LastError confusion

Hey guys, I'm writing a script that uses the Windows Magnification API to make a game window on a website go fullscreen. I originally wrote my script in C++, and that worked fine, but now I want to add joystick mapping... which is a stupidly complex task in C++ (especially compared to AHK's examples...
by Miguel7
07 Sep 2017, 14:45
Forum: Other Programming Languages
Topic: C#: "field is not assigned to" warning
Replies: 0
Views: 226

C#: "field is not assigned to" warning

Hey guys, newbie question here: I've got a class with a property that is an instance of another class. That other class has no parameters in its constructor (and really, no constructor at all) but I'm getting this ridonkulous message saying the property is never assigned too, will always be null, an...
by Miguel7
28 Jul 2017, 05:48
Forum: Ask For Help
Topic: Understanding Num/StrPut/Get and VarSetCapacity
Replies: 5
Views: 157

Re: Understanding Num/StrPut/Get and VarSetCapacity

Very cool, :cool: I'll check them out tonight. Anyway, an idea just occurred to me, that maybe because the DLL returns a "const wchar_t *" (pointer to a Unicode string) maybe it returns a pointer to an invalid address somehow (like the string goes out of scope or something)? That's a prett...
by Miguel7
28 Jul 2017, 02:44
Forum: Ask For Help
Topic: Understanding Num/StrPut/Get and VarSetCapacity
Replies: 5
Views: 157

Re: Understanding Num/StrPut/Get and VarSetCapacity

Wow, these are really good tutorials! I wish I had found them ages ago when I barely even knew what a DLL was . It was a great refresher, and IMO there should be more great tutorial content like that on YouTube. But he only dealt with ints, and getting DllCall to work with ints is, as the guy said, ...
by Miguel7
27 Jul 2017, 16:15
Forum: Ask For Help
Topic: Understanding Num/StrPut/Get and VarSetCapacity
Replies: 5
Views: 157

Understanding Num/StrPut/Get and VarSetCapacity

Hey guys, what's up Now that I know how to create my own DLLs, I've been very interested in learning how AHK can interact with them through DllCall. I wrote a super-simple DLL, code is below: #include "stdafx.h" #include <iostream> #include <string> #include <sstream> #include <Windows.h> ...
by Miguel7
21 Jul 2017, 15:54
Forum: AutoHotkey_H
Topic: Looking for tutorials on AutoHotKey.dll
Replies: 2
Views: 505

Re: Looking for tutorials on AutoHotKey.dll

Okay, awesome! This is exactly what I was looking for. Thanks. :) And what a cool idea to use the DLL from the AHK_H language itself to implement multithreading! In AHK_L I wrote a class that imitated this using Post/Send/OnMessage, and I've also used stdout or files to send data between two scripts...
by Miguel7
20 Jul 2017, 17:11
Forum: AutoHotkey_H
Topic: Looking for tutorials on AutoHotKey.dll
Replies: 2
Views: 505

Looking for tutorials on AutoHotKey.dll

Hey guys, First off, way to go, HotKeyIt! :bravo: It's totally amazing that you built your own custom version of AHK. I'm an intermediate/borderline-advanced C++ developer myself, and I know how huge a project that is. Mostly because I started something similar. I wanted to separate AHK's functional...
by Miguel7
13 Jul 2017, 13:28
Forum: Other Programming Languages
Topic: Float+int math, c++ gcc
Replies: 1
Views: 298

Re: Float+int math, c++ gcc

Off-hand, my best guess would be that the float (0.5f) is being reduced to 0 when you cast it to an int. Anything * 0 = 0, so it would make sense that calling it wouldn't return anything. On a separate note, what is the MCode? In the comment you said it's the compiled C++; does that mean it's some w...
by Miguel7
13 Jul 2017, 13:16
Forum: Other Programming Languages
Topic: ComObjCreate equivalent in C++?
Replies: 1
Views: 304

ComObjCreate equivalent in C++?

Hey guys, So after hours of research and seemingly endless trial'n'error, I can get CoCreateInstance to work (theoretically - that is, it passes a check using the "FAILED" Win32 function)). Now I'm getting even further into the seedy underbelly of Microsoft's COM interop API, and I can't h...
by Miguel7
12 May 2017, 12:27
Forum: Ask For Help
Topic: CLR.ahk question
Replies: 3
Views: 240

Re: CLR.ahk question

Interesting. Guess I'll have to see how you did it in CLR.ahk itself. Thanks for the info. :)
by Miguel7
11 May 2017, 20:58
Forum: Ask For Help
Topic: Trying to up my game - questions for the gurus
Replies: 1
Views: 109

Trying to up my game - questions for the gurus

Hey what's up, I found a function I wanted to use in a project, and it works great, but I have absolutely no idea what the heck it's doing. Here's the code: SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = othe...
by Miguel7
11 May 2017, 19:53
Forum: Ask For Help
Topic: CLR.ahk question
Replies: 3
Views: 240

CLR.ahk question

Hey guys, I meant to ask this awhile ago, and since forgot the specific code (sorry about that), but the question is pretty simple: How would you call static/class methods? For example, let's say I want to use Convert.ToInt32 in my code (a dumb example, I know, cuz AHK handles stuff like this automa...
by Miguel7
11 May 2017, 00:50
Forum: Scripts and Functions
Topic: Set default audio playback device
Replies: 6
Views: 434

Set default audio playback device

So about a month ago, a buddy hooked me up with a sweet big-screen TV, and showed me how to send my computer's display to it. But the one kind of annoying thing I had to deal with was constantly switching the default playback device from my laptop to my TV. I wanted a way to do this a bit easier, an...
by Miguel7
25 Mar 2017, 11:02
Forum: Ask For Help
Topic: ComObjConnect/IE question
Replies: 8
Views: 666

Re: ComObjConnect/IE question

Thanks, but I stopped using IE ages ago. Instead I've been using NW.js (a framework for creating desktop apps using HTML/JS/CSS). NW makes it possible to run AHK scrpts right from the DOM, and capture any input from stdout (i.e. if you type "FileAppend, someData, *" in AHK then run it from...
by Miguel7
31 Jan 2017, 18:38
Forum: Ask For Help
Topic: [Solved] How to check if an object has a property (when there are empty strings involved)?
Replies: 6
Views: 417

Re: How to check if an object has a property (when there are empty strings involved)?

Thanks for the quick response! Object.haskey was exactly what I was looking for. I rewrote my script above using something like if (test.haskey("key")) ... and that worked. I wouldn't have thought an empty string could somehow be misread as false, but that's just my C# / PHP background tal...

Go to advanced search