Search found 177 matches

by Miguel7
01 Dec 2017, 23:41
Forum: Ask For Help
Topic: DllCall/A_LastError confusion
Replies: 2
Views: 59

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: 177

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: 137

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: 137

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: 137

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: 412

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: 412

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: 257

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: 263

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: 221

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: 98

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: 221

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: 397

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: 649

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: 372

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...
by Miguel7
31 Jan 2017, 18:09
Forum: Ask For Help
Topic: [Solved] How to check if an object has a property (when there are empty strings involved)?
Replies: 6
Views: 372

[Solved] How to check if an object has a property (when there are empty strings involved)?

For example: ; If I create a simple object like so... test := Object() test.a := "A" test.b := "" ; In most OO languages, the object now has a property named b, with a value = an empty string (or is that not the case in AHK?) test.c := "C" ; Then loop through the object...
by Miguel7
18 Jan 2017, 22:05
Forum: Other Programming Languages
Topic: How does AHK's ImageSearch work?
Replies: 4
Views: 3585

Re: How does AHK's ImageSearch work?

Thanks for that. That bit of code is exactly what I was looking for. What I've read since my last post has been making sense, but I wasn't there yet. I'm definitely gonna work on this again over the weekend. :)
by Miguel7
17 Jan 2017, 18:46
Forum: Other Programming Languages
Topic: How does AHK's ImageSearch work?
Replies: 4
Views: 3585

Re: How does AHK's ImageSearch work?

Thanks HotKeyIt. I saw script2.cpp but never thought to look there (guess I was expecting a Line.cpp or ImageSearch.cpp or something, ID10T error on my part :lol:). Anyway, thanks for the info! I'm looking forward to diving into it.
by Miguel7
13 Jan 2017, 19:50
Forum: Other Programming Languages
Topic: How does AHK's ImageSearch work?
Replies: 4
Views: 3585

How does AHK's ImageSearch work?

Hey guys, I've been working on something similar to "IronAHK" (an old library where they tried to port AHK to .net); I'm not necessarily trying to do that per se, because .net has tons of AHK's functionality already (a GUI framework, a Sleep function, string handling, File I/O, it can call...
by Miguel7
07 Jan 2017, 16:36
Forum: Ask For Help
Topic: Any tutorials on AHK_H?
Replies: 3
Views: 2807

Re: Any tutorials on AHK_H?

Oh, okay, "w" and "a" correspond to the letters at the end of some C/C++ functions I've seen; I had no idea what they meant, since I was usually using AHK to call them and my C++ skills are intermediate at best :lol:). But anyway, this is pretty much exactly what I was looking fo...

Go to advanced search