g_default_pwd -- a bit confused [ changing password ] Topic is solved

Ask for help, how to use AHK_H, etc.
ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 08 Dec 2020, 01:02

Code: Select all

g_default_pwd ? (TCHAR) _T("A\000\000\000\000u\000\000\000\000t\000\000\000\000o\000\000\000\000H\000\000\000\000o\000\000\000\000t\000\000\000\000k\000\000\000\000e\000\000\000\000y\000\000\000\000")[i*5] : (TCHAR)*pwd[i];
i am getting confused at here

what does "\" do here ??
what does the "0" do and can it any other letter?
what is the position of "u" here , it must be 5 right !! , So from where should i start counting?

if A = 0
000 = 1, 000 = 2 etc
then 000u is 5 but it stll not "u" at 5th position

i am bit lost :crazy: :crazy:

pls help me out!! :wave:

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]  Topic is solved

Post by HotKeyIt » 08 Dec 2020, 02:46

\ is used to escape characters. \000 is zero byte = no character.
Its \000, then u, then again \000.

ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 08 Dec 2020, 06:35

HotKeyIt wrote:
08 Dec 2020, 02:46
\ is used to escape characters. \000 is zero byte = no character.
Its \000, then u, then again \000.
thankyou for the reply
yeah i did followed somewhat!

in the password AUTOHOTKEY

is this correct way when counting :roll: :crazy: :headwall:

Code: Select all

                    A           \000                   \000                    \000                \000                    u                \000                \000                     \000                   \000                    t           \

case1   ==      "A" is 0     " \000" is 1         "\000" is  2         "\000" is 3         " \000" is 4            "u" is 5           "\000"  is 6         " \000" is 7           " \000" is 8            "\000" is 9            " t " is 10     and so on

So if i change \000 to any letters  like 

case2   ==      "A" is 0     " z" is 1         "y" is  2         "x" is 3         "w" is 4            "u" is 5           "v"  is 6         " u" is 7           "n" is 8            "m" is 9            " t " is 10  and  so on ........... still password will be valid as AUTOHOTKEY right???!!!


if so is anything to be taken care while using numbers instead of letters 

like case3  ==   "A" is 0     "9" is 1         "8" is  2         "7" is 3         "4" is 4            "u" is 5           "v"  is 6         " u" is 7           "n" is 8            "m" is 9            " t " is 10  an so on.......   IS THIS CORRECT

Last edited by ananthuthilakan on 10 Dec 2020, 09:15, edited 1 time in total.

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by HotKeyIt » 08 Dec 2020, 07:33

No, therefore you will need to change which letter to take.
Without the change it would be (without space):
A bbbb u cccc t dddd o eeee H...
0 1234 5 6789 10...

ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 08 Dec 2020, 08:41

HotKeyIt wrote:
08 Dec 2020, 07:33
No, therefore you will need to change which letter to take.
Without the change it would be (without space):
A bbbb u cccc t dddd o eeee H...
0 1234 5 6789 10...
I think i got it

if [i*2] and number of character is still 10

AbUbTbObHbObTbKbEbY ===> translates to AUTOHOTKEY :roll: :roll:


ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 08 Dec 2020, 11:34

HotKeyIt wrote:
08 Dec 2020, 09:07
:thumbup:
Thank you for your amazing work :bravo: :bravo:

i guess i can add as many letters after the real password , it wont count1??

Compiling with autohotkeySC.bin or autohotkey.exe !! what is the real difference

thankyou for your support bro

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by HotKeyIt » 08 Dec 2020, 17:11

Yes, you can add as many letters as C++ supports.
Main difference is that compiling with AutoHotkeySC you can only execute included/compiled script where AutoHotKey.exe can still execute a file by using /E or /Execute switch and it can also execute code dynamically (addScript, addFile, ahkExec).

ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 08 Dec 2020, 21:50

HotKeyIt wrote:
08 Dec 2020, 17:11
Yes, you can add as many letters as C++ supports.
Main difference is that compiling with AutoHotkeySC you can only execute included/compiled script where AutoHotKey.exe can still execute a file by using /E or /Execute switch and it can also execute code dynamically (addScript, addFile, ahkExec).

hey thankyou,
i did a trial compile with simply changing letters of AUTOHOTKEY Password
and it went very well and successful. :thumbup:

the second time i tried compile it is giving some warnings as follows, So i tried unzipping the source file somewhere else and tried again with out even changing anything , still giving those warning. :wtf: :wtf:
Attachments
warning.PNG
warning.PNG (54.28 KiB) Viewed 5616 times

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: g_default_pwd -- a bit confused [ changing password ]

Post by SOTE » 08 Dec 2020, 22:01

Warning doesn't mean failed. Is the executable that you created usable? And are you doing any reading or studying on your own?
Like reading the compile guide (https://www.autohotkey.com/boards/viewtopic.php?f=65&t=62308) or looking at previous answers given in the AutoHotkey_H Help subforum.

ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 09 Dec 2020, 02:23

SOTE wrote:
08 Dec 2020, 22:01
Warning doesn't mean failed. Is the executable that you created usable? And are you doing any reading or studying on your own?
Like reading the compile guide (https://www.autohotkey.com/boards/viewtopic.php?f=65&t=62308) or looking at previous answers given in the AutoHotkey_H Help subforum.
yes i have read all the compile guide , both old one and new one, as well as watched both YouTube video's one hour long each.
Many things were going over my head.
Also i read all the comments in that section.

i became confused because the compilation didnt showed any warning when i 1st compiled it. i did it as a trial run with changing the password by replacing letters of "AUTOHOTKEY"

i did the same procedure again second time with the password i wish to use and these warnings showed up.

So i downloaded the source file again from the same guide https://www.autohotkey.com/boards/viewtopic.php?f=65&t=62308

and tried again , without even changing anything , then also these warnings showed up.

more or less i did 10+ trial and error compilation with different combination of passwords

the executable created with warnings was usable but i did notice a change in the file size.

i remember reading the same question of difference btw autohotkeysc.bin and autohotkey.exe in that section.
but when looked at the ahk2exe code i saw this, commented out

Code: Select all

; else If (UseEncrypt && SubStr(BinFile,-3)!=".bin")
; {
	; if !CLIMode
		; MsgBox, 64, Ahk2Exe, Resulting exe will not be protected properly, use AutoHotkeySC.bin file to have more secure protection.
	; else
		; FileAppend, Warning`, Resulting exe will not be protected properly`, use AutoHotkeySC.bin file to have more secure protection.: %ExeFile%`n, *
; }
thats why i asked again, srry about that.

i did asked about the warning not because it did showed up, but it really didn't showed up in the first run.
this is the 2nd time i think @SOTE is mistaking me for not reading , So i want to clarify ,same process and mixed results makes me confuse, So i have no other way to clarify other than requesting help here in the forum.

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by HotKeyIt » 09 Dec 2020, 02:51

I assume the XP warnings were not there in your previous version of Visual Studio.
You can ignore the other errors.


ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 10 Dec 2020, 01:17

SOTE wrote:
08 Dec 2020, 22:01
Warning doesn't mean failed. Is the executable that you created usable? And are you doing any reading or studying on your own?
Like reading the compile guide (https://www.autohotkey.com/boards/viewtopic.php?f=65&t=62308) or looking at previous answers given in the AutoHotkey_H Help subforum.
i thought i will let this pass once more , but will not work that way.
bcz many of your help section comments seems similar

So if u think your are the only person who can make use of search bar in the forum THEN you are wrong, and more importantly this comment doesn't really add any value to the learner.
and making accusation on the person who ignore your comment, and then giving ADVICE upon it is even more rude.............

this type of comments are not really helpfull, on the other hand most of your ADVICE giving comment contradict with comments that question credibility of a genuine learner.

All of my doubts were very genuine here...........
Last edited by ananthuthilakan on 10 Dec 2020, 01:37, edited 2 times in total.

ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: g_default_pwd -- a bit confused [ changing password ]

Post by ananthuthilakan » 10 Dec 2020, 01:27

HotKeyIt wrote:
08 Dec 2020, 02:46
\ is used to escape characters. \000 is zero byte = no character.
Its \000, then u, then again \000.
these information needs to be added in the guide
i have already pm @kyuuuri

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: g_default_pwd -- a bit confused [ changing password ]

Post by SOTE » 11 Dec 2020, 00:09

ananthuthilakan wrote:
10 Dec 2020, 01:27
HotKeyIt wrote:
08 Dec 2020, 02:46
\ is used to escape characters. \000 is zero byte = no character.
Its \000, then u, then again \000.
these information needs to be added in the guide
i have already pm @kyuuuri
In Kyuuuri's old guide, which is still available by selecting "Show" in the new guide, the issue was a bit more clear.
pw = pwd == g_default_pwd ? (TCHAR) _T("A\0\0\0\0u\0\0\0\0t\0\0\0\0o\0\0\0\0H\0\0\0\0o\0\0\0\0t\0\0\0\0k\0\0\0\0e\0\0\0\0y\0\0\0\0")[i*5] : (TCHAR)*pwd;

to your new password.
This line contains 2 important parts (read both of them and then you will understand how it works):
1_ "A\0\0\0\0u\0\0\0\0t\0\0\0\0o\0\0\0\0H\0\0\0\0o\0\0\0\0t\0\0\0\0k\0\0\0\0e\0\0\0\0y\0\0\0\0"
Spoiler
2_ [i*5]
Spoiler
Example 1: (password = "AutoHotkey", [i*2])
Spoiler
"A\0u\0t\0o\0H\0o\0t\0k\0e\0y\0"
Example 2: (password = "abc", [i*1])
Spoiler
"abc"
Example 3: (password = "abc", [i*2])
Spoiler
"a1b2c3"
Example 4: (password = "Hotkey", [i*5])
Spoiler
"H1234o5678t9876k5432e1234y"
Remember that you have to respect the length you specified before.

To-do: Add how to make a dynamic password.

The newer guide kind of glosses over the details, thus there can be confusion or some can miss key elements pertaining to the subject.

gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: g_default_pwd -- a bit confused [ changing password ]

Post by gregster » 08 Feb 2021, 08:51

ananthuthilakan wrote:
08 Feb 2021, 08:47
political correctness should be both ways.
Don't know what that even means.
My point is that you are needlessly trying to re-heat your old fight from weeks ago. This stops here!
Otherwise, I will tend to more "aggressive" measures.
Last edited by gregster on 08 Feb 2021, 08:58, edited 2 times in total.
Reason: I have cleared out a few posts now, since there seems to be a tendency to unnecessarily escalate old fights from weeks ago. Further offtopic posts will be nuked as well. Send me a PM, if you have additional comments or questions.

Post Reply

Return to “Ask for Help”