Hi i want to make a password thing but I'm bad at autohotkey (im new to this)
i wanna make it so if at any time i input a sequence of keys a function happens (run, start, send, ect)'
i wanna use the numpad keys but if that's not possible i can always rebind them, thank you for reading and plz consider helping
AutoHotKey Password
-
- Posts: 4
- Joined: 18 May 2020, 00:11
Re: AutoHotKey Password
Code: Select all
Intro:
MsgBox % "Welcome!"
Numpad1::
Run, Notepad.exe
Sleep, 1000
Send, AHK rocks!
Return
Numpad2::MsgBox % func("AHK rocks!")
Numpad3::SoundBeep
Numpad4::MouseMove, 0, 0
Numpad5::Goto, Intro
func(param) {
Return SubString(param,1,-1) ", even more if you use its command reference!"
}
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !
-
- Posts: 4
- Joined: 18 May 2020, 00:11
Re: AutoHotKey Password
Hi sorry, i dont think u understand
i meant somethign like a password
so if i do Numpad1 then Numpad2 Then numpad 3 it will start youtube.com for example
anyways thanks for taking ur time to respond
i meant somethign like a password
so if i do Numpad1 then Numpad2 Then numpad 3 it will start youtube.com for example
anyways thanks for taking ur time to respond
Re: AutoHotKey Password
Perhaps something along these lines.
Hotstrings:
https://www.autohotkey.com/docs/Hotstrings.htm
Code: Select all
::@Youtube::
Run, www.Youtube.com
return
https://www.autohotkey.com/docs/Hotstrings.htm
-
- Posts: 4
- Joined: 18 May 2020, 00:11
Re: AutoHotKey Password
Hi that doesn't seem to workHellbent wrote: ↑18 May 2020, 00:41Perhaps something along these lines.
Hotstrings:Code: Select all
::@Youtube:: Run, www.Youtube.com return
https://www.autohotkey.com/docs/Hotstrings.htm
Re: AutoHotKey Password
Works fine for me.
Have you tried typing @Youtube and then pressing space or enter?
Have you tried typing @Youtube and then pressing space or enter?
-
- Posts: 4
- Joined: 18 May 2020, 00:11
Re: AutoHotKey Password
Yes, there is. I provided you some sample code. Simply put some own effort into it. Happy scripting
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !
Re: AutoHotKey Password
Code: Select all
Numpad1 & Numpad2::
Run, www.Youtube.Com
return
Re: AutoHotKey Password
I don't know how much you plan on doing with it, but here is a little idea for grouping your functions so that you don't have a million key combos.
This of course can be replaced with something more like a tree menu or w/e the hell you call it.
This of course can be replaced with something more like a tree menu or w/e the hell you call it.
Code: Select all
#SingleInstance, Force
List1 := "www.youtube.com|https://www.autohotkey.com/boards/viewtopic.php?f=76&t=76071|https://www.autohotkey.com/boards/viewforum.php?f=76"
List2 := "Blah Blah Blah 1|More Blah Blah|Some Other Blah Blah"
return
Numpad1 & Numpad2::
Gui,1: New, +AlwaysOnTop
Gui,1:Add,ListBox,xm ym w300 r15 vSelectedItem1 , % List1
Gui,1:Add,Button,xm y+10 w300 r1 gItemSelectRun, Go
Gui,1:Show,,Run It
return
ItemSelectRun:
GuiControlGet,SelectedItem1
Gui,1:Destroy
Try{
run, % SelectedItem1
}catch{
msgbox, Failed to run
}
return
GuiClose:
Gui,1:Destroy
return
Numpad2 & Numpad3::
Gui,2: New, +AlwaysOnTop
Gui,2:Add,ListBox,xm ym w300 r15 vSelectedItem2 , % List2
Gui,2:Add,Button,xm y+10 w300 r1 gItemSelectClip, Go
Gui,2:Show,,Clip It
return
ItemSelectClip:
GuiControlGet,SelectedItem2
Gui,2:Destroy
ClipBoard := SelectedItem2
SoundBeep, 500
return
2GuiClose:
Gui,2:Destroy
return
Re: AutoHotKey Password
My noobish code works in AHK 32 Unicode
Caution: 14 year old code: https://autohotkey.com/board/topic/11138-crazy-scripting-secret-numeric-labels/
Press * (numpad mult) for half-a-second to trigger UI
Passwords:
1111 will start Notepad.exe
12345 will start Calc.exe
Caution: 14 year old code: https://autohotkey.com/board/topic/11138-crazy-scripting-secret-numeric-labels/
Press * (numpad mult) for half-a-second to trigger UI
Passwords:
1111 will start Notepad.exe
12345 will start Calc.exe
Re: AutoHotKey Password
Well, it's SKAN-code. Wouldn't have expected something differentSKAN wrote: ↑18 May 2020, 10:51My noobish code works in AHK 32 Unicode
Caution: 14 year old code: https://autohotkey.com/board/topic/11138-crazy-scripting-secret-numeric-labels/
Press * (numpad mult) for half-a-second to trigger UI
Passwords:
1111 will start Notepad.exe
12345 will start Calc.exe
Re: AutoHotKey Password
I want to... Let me know if you want a rewrite of my script per your needs.JustBilly123 wrote:plz consider helping
Script won't be that complicated if the latest InputHook() is used.
- dmg
- Posts: 287
- Joined: 02 Oct 2013, 01:43
- Location: "Twelve days north of Hopeless and a few degrees south of Freezing to Death"
- Contact:
Re: AutoHotKey Password
This is probably far more complicated than you are looking for, but I wrote an app in AutoHotkey years ago that does this:
https://www.portablefreeware.com/index.php?id=2265
You set trigger codes and when you type them into a small prompt the app can execute programs, open files, load websites etc.
https://www.portablefreeware.com/index.php?id=2265
You set trigger codes and when you type them into a small prompt the app can execute programs, open files, load websites etc.
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion
------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact
~Albert Campion
------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact
Re: AutoHotKey Password
@dmg Very nice option. Thx for sharing it
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !
Who is online
Users browsing this forum: Andrew-Mik, Rohwedder and 90 guests