Search found 3303 matches

by Helgef
12 Dec 2018, 15:07
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

There is a bug in v2 I believe, it fooled me, my code might be incorrect. It's not really related to the code but to my testing methods. I will investigate further later and get back.

Jeeswg, I will consider your personal feedback.

Let's cheer up a bit :heart:.
by Helgef
12 Dec 2018, 06:10
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

I didn't say the root problem was a type isssue, I told you to use v2 because that would give you the error message, from there I thought it would be trivial to find the root cause, I am amazed that I was wrong and that it was such a puzzle for you. Ultimately it took me more time to fix the problem...
by Helgef
11 Dec 2018, 09:11
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

I'm not sure that any errors were type-related
:facepalm:
There was a missing parentheses issue.
Yeah the missing parentheses/space in your code causes the type mismatch. :morebeard:
by Helgef
11 Dec 2018, 06:42
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

Yes but if everything is numeric, what's causing the type mismatch!?
Everything isn't numeric,

Code: Select all

msgbox_result := msgbox()
msgbox msgbox_result
(msgbox_result | (n << o))
by Helgef
11 Dec 2018, 02:34
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

- Something may have gone wrong in the test based on bitsput. I was using AHK v2, it gave a result and then crashed!?
It doesn't crash, it throws an exception, due to type mismatch,

Code: Select all

('OK' | (n << o))
by Helgef
10 Dec 2018, 13:44
Forum: Ask For Help
Topic: AHK v2: question about enumerating
Replies: 4
Views: 88

Re: AHK v2: question about enumerating

1. Type(object) says just "Object" for both {} and [] created arrays. Because there is curretnly no difference. 2. You can check if an object is of a paricular (built-in) type by doing type(obj) == 'TypeName' , but there is no such thing as a IsBuiltInObject() function though. I do not think it is ...
by Helgef
10 Dec 2018, 09:24
Forum: Gaming
Topic: [UCR Plugins] Latest: Cursor - Multiple mice/cursors. (2017-02-11): APM - Action per minute counter.
Replies: 29
Views: 9590

Re: [UCR Plugins] Latest: Cursor - Multiple mice/cursors. (2017-02-11): APM - Action per minute counter.

Hello, please try this to fix the first error. The second error is not from the plugin code. maybe it was caused by the plugin, if it persists you need to tell me more on how to reproduce it. class Zoom extends _UCR.Classes.Plugin { ; Author: Helgef ; Date: 2016-11-12 ; Updated: 2017-04-09 ; Version...
by Helgef
10 Dec 2018, 02:55
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

Had you already written functions like this? Did you have any example code from another language? (The functions are only semi-useful to me, but I thought on balance they would be worth writing.) I wrote them in response to this thread. Semi-useful, agree. ~ (bitwise-not) works differently between ...
by Helgef
09 Dec 2018, 14:38
Forum: Ask For Help
Topic: which languages should I learn to learn DllCall and Windows API Functions?
Replies: 17
Views: 376

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

@ jeeswg, that is not good advice, he wants to understand what he does, not just learn how to.

Proceed with C, and learn from good text books, universities and by reading documentation, not just google.

I wish you the best of luck, cheers.
by Helgef
09 Dec 2018, 12:48
Forum: Ask For Help
Topic: Send keystrokes if ClassNN and Text equals something
Replies: 4
Views: 61

Re: Send keystrokes if ClassNN and Text equals something

See blocks. Did you initialise the variable button2 ?
by Helgef
09 Dec 2018, 11:22
Forum: Ask For Help
Topic: Send keystrokes if ClassNN and Text equals something
Replies: 4
Views: 61

Re: Send keystrokes if ClassNN and Text equals something

Try If (Text = "&Formatted paragraphs") :wave:

See language.

Cheers.
by Helgef
08 Dec 2018, 14:32
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 14
Views: 392

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

Hello jeeswg. I tried your simple functions, it seems reversed to me. I guessed that the vBit parameter would tell which bit to get, so I expect the first bit (that is the least significant one) to be extracted when vBit := 0 , but consider, ; v2 msgbox jee_bitgetsimple(&x:=1, 7) ; 1 msgbox jee_bitg...
by Helgef
07 Dec 2018, 13:12
Forum: Bug Reports
Topic: Hotstring Bug?
Replies: 11
Views: 327

Re: Hotstring Bug?

safetycar wrote:
06 Dec 2018, 14:21
Looks buggy.

Out of this:

Code: Select all

:X:T1::MisHostrings()
Hotstring(":X:T2", MisHostrings)
Hotstring(":X:T3", MisHostrings())
Hotstring(":X:T4", "MisHostrings")
Hotstring(":X:T5", "MisHostrings()")
Only T1 shows the MsgBox.
See auto execute .
by Helgef
07 Dec 2018, 02:25
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 533

Re: printf()

When I use #Warn in StdOut mode, the warnings don't appear in the console. Any ideas? Thanks. In the example I mentioned above, warnings from the child script are printed to the console (in the parent script). I added instructions Cheers. Edit: Also, starting a script as (also from fileappend ) "%P...
by Helgef
07 Dec 2018, 01:26
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 533

Re: printf()

quantum wrote:
06 Dec 2018, 06:57
So we can't use printf? Shame.
As I told you, it works if you start the script from the command line as described in the fileappend page.

Also, I translated this example from msdn, see :arrow: github, its for v2. I'll add a instructions later.

Cheers.
by Helgef
07 Dec 2018, 01:08
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 61
Views: 10066

Re: MCode4GCC -- C/C++ to MCode Generator

You can see nnniks mcode tutorial on how to use function pointers.
by Helgef
05 Dec 2018, 16:29
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 533

Re: printf()

I'm not sure what you want. Format string then print, sprintf(byref buf, fmt, p*){ local p.push("cdecl int") c := dllcall("msvcrt.dll\_scprintf", "astr", fmt, p*) varsetcapacity(buf, c + 1, 0) c := dllcall("msvcrt.dll\sprintf", "ptr", &buf, "astr", fmt, p*) buf := strget(&buf, "CP0") return c } msgb...
by Helgef
05 Dec 2018, 12:00
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 533

Re: printf()

vIsReady
by Helgef
05 Dec 2018, 11:01
Forum: Ask For Help
Topic: printf()
Replies: 21
Views: 533

Re: printf()

It returns a positive integer, indicating success. I could printf to file starting the script like, "%ProgramFiles%\AutoHotkey\AutoHotkey.exe" "My Script.ahk" >"Error Log.txt" see FileAppend -> FileName . Also, you do not need to call GetStdHandle , you can call stdout := fileopen ("*", "w") . You c...

Go to advanced search