i'm currently working on enhancing my code which lets me open favorite folders/websites/programs/etc..
i took rajat's ToolTip Mouse Menu and changed it a little bit to my liking.
as i study further into the language of AHK, i could really use some professional guidance on how to approach the next "update" to this code.
Code: Select all
#SingleInstance, force
; Protection
;------------------------
;-----------------------------
/*
password = **********(password)
InputBox, pass, Please Enter Password
If ( pass <> password )
{
Run, folder dir
ExitApp
}
MsgBox You reached here - correct!
*/
; Globals
;------------------------
;-----------------------------
UMDelay = 20
; Initiate Interface
;------------------------
;-----------------------------
;opens the gui where the last position of the mouse was
/*
~MButton::
HowLong = 0
Loop
{
HowLong ++
Sleep, 10
GetKeyState, MButton, MButton, P
IfEqual, MButton, U, Break
}
IfLess, HowLong, %UMDelay%, Return
CoordMode, Mouse, Screen
MouseGetPos, mX, mY
Gui, Show, x%mX% y%mY% w300 h180, `t
*/
;opens the gui on the right side of the screen as a horizontal taskbar
~MButton::
HowLong = 0
Loop
{
HowLong ++
Sleep, 10
GetKeyState, MButton, MButton, P
IfEqual, MButton, U, Break
}
IfLess, HowLong, %UMDelay%, Return
CoordMode, Mouse, Screen
; Gui Layout
;----------------
;---------------------------
MyPics:
Mx = 0
My = 0
num = 1
Loop, 14
{
Gui, Add, Picture, x%Mx% y%My% w60 h60 g%num%, folder dir\%num%.png
num++
Mx += 60
IfGreater, Mx, 0
{
My += 60
Mx = 0
}
IfGreater, num, 14
break
}
Gui, +AlwaysOnTop
;Gui, -caption //removes the gui's menu bar
Gui, Color, 000111
Gui, Show, x1840 y0 w60 h900, `t
WinSet, Transcolor, 000111, `t
return
; Lables
;----------------
;---------------------------
GuiClose:
Gui, Hide
return
1: ;
Gui, Hide
Run, "weblink"
return
2: ;WhatsApp
Gui, Hide
Run, "weblink"
return
3: ;Google Photos
Gui, Hide
Run, "weblink"
return
return
4: ;Starcraft 2
Gui, Hide
Run, "folder dir"
return
5: ;YouTube
Gui, Hide
Run, "weblink"
return
6: ;Facebook
Gui, Hide
Run, "weblink"
return
7: ;Mobizen
Gui, Hide
Run, "weblink"
return
8: ;Kodi
Gui, Hide
Run, "folder dir"
return
9: ;Twitch
Gui, Hide
Run, "weblink"
return
10:
;JavaFolder
Gui, Hide
Run, "folder dir"
return
11: ;Edit My Code
Gui, Hide
Edit
return
12: ;Inbox By Gmail
Gui, Hide
Run, "weblink"
return
13: ;Memory
Gui, Hide
Run, "script"
return
14: ;My Site
Gui, Hide
Run, "weblink"
return
; Functions
;----------------
;---------------------------
; Hotkeys
;----------------
;---------------------------
~^Numpad5::
send, ***********(password)
send, {enter}
return
~^Numpad4::
send, ************(username)
send, {Tab}
send, *********(password)
send, {Enter}
return
Esc::ExitApp
I am now trying to apply features inspired by a game i played called crysis(by EA).
in this first person shooter you have an option to hold down the middle mouse button in order to show(gui, show) a menu of which you can(firstly) highlight a "power"(in the game you have a suite that enhances your powers) and then simply by releasing the middle mouse button(over the desired power, or program in my case) it is "clicked"(or selected) and in that case it would run a certain function for example.
an image to illustrate:
https://www.epicgames.com/unrealtournam ... ?id=353730
any ideas/improvements/notes/remarks are always welcome!
i'd greatly appreciate any help!
thanks for reading!
cheers,
yawik