[Guide] Compiling Ahk_h's source step by step Topic is solved

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
Posts: 2158
Joined: 29 Sep 2013, 18:35

Re: [Guide] Compiling Ahk_h's source step by step

26 May 2020, 18:38

See Escape sequences, since backslash accepts \n + \nn + \nnn, \03 is considered one character, instead you need to use \000 if following char is a number.
I will update source to use \000 by default so this won't happen to someone else.
Posts: 30
Joined: 15 May 2020, 23:08

Re: [Guide] Compiling Ahk_h's source step by step

24 Jun 2020, 00:25


Thank you for taking the time to respond to this, Can I replace all `\0`characters with `\000`manually? Do I have to add anything particular for it to create the correct password regardless of numbers, letters or unicode characters?
On another note, I was hoping you could provide some insight into how to generate a random password. I'm trying to create functions that generate random zeros and points for random characters

Code: Select all

passwordString = ""
charTrackerArray = []
addRandomChar() {
addRandomZeros() {
createPW_String {
	for (int n=0; n<20; n++) {
		tempString = ""
		charTrackerArray.push(tempString.length() - 2)
		passwordString += tempString
I want to:
1) add a function that adds random amounts of "\0" to a global string(passwordString) and places random letters/numbers after the 0's - keeping track of the places of where they were added in string.
2) Replace "0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" with password string mentioned above
3) use charTrackerArray array in place of [i*number] - kept track of where random letters are added... i.e[1,3,2,5,4,3]

effectively replacing this:

Code: Select all

pw[i] = pwd == g_default_pwd ? (TCHAR) _T("0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")[i*2] : (TCHAR)*pwd[i];
with this:

Code: Select all

pw[i] = pwd == g_default_pwd ? (TCHAR) _T(passwordString)[i*charTrackerArray[i+1]] : (TCHAR)*pwd[i];
I would like it to output the password in a text file as opposed to a warning. I'm not well versed in C++ but I have attempted to create something mentioned above to no avail, if you could provide your expertise I'm sure many would find this extremely useful. It would also help complete this guide.
Thank you HotKeyIt for all of your hard work, AHK_H is honestly the best.

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 2 guests