Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
- ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
- ;@Ahk2Exe-Set FileDescription, Hotkey Master
- ;@Ahk2Exe-Set FileVersion, 1.0.0.0
- ;@Ahk2Exe-SetInternalName Hotkey Master
- ;@Ahk2Exe-SetName HKMaster
- ;@Ahk2Exe-SetOrigFileName HK Master
- ;@Ahk2Exe-Set ProductName, Hotkey Master
- ;@Ahk2Exe-Set ProductVersion, 1.0.0.0
- ;@Ahk2Exe-Set Description, Hotkey Master
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
- ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
- ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
- ;@Ahk2Exe-SetMainIcon icon1.ico
- ;@Ahk2Exe-AddResource Icon1.ico, 160 ; Replaces 'H on blue'
- ;@Ahk2Exe-AddResource Icon1.ico, 206 ; Replaces 'S on green'
- ;@Ahk2Exe-AddResource Icon1.ico, 207 ; Replaces 'H on red'
- ;@Ahk2Exe-AddResource Icon1.ico, 208 ; Replaces 'S on red'
- #SingleInstance,Force
- #Persistent
- #NoEnv
- Menu,tray, NoStandard
- Menu, Tray, Add,
- Menu, Tray, Add, Show ,Show
- Menu, Tray, Add,
- Menu, Tray, Add, Exit,Exit1
- Menu, Tray, Add,
- SetWorkingDir, %A_ScriptDir%
- SetBatchLines, 20ms
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- DetectHiddenWindows, On
- SetTitleMatchMode, 3
- SendMode Input
- #Include <Gdip_All>
- #Include <GdipHelper>
- pToken:=Gdip_Startup()
- if not A_IsAdmin
- {
- Run, *RunAs "%A_ScriptFullpath%"
- ExitApp
- }
- global Window1:=[], Switch1:=[],Button1:=[], Radio1:=[]
- Theme1:="FF0000"
- BG1:="222222"
- BG2:="333333"
- Run, https://youtu.be/Ijnp4lieQMw
- IfNotExist, Configuration.ini
- {
- IniWrite,0,Configuration.ini,Settings,Start
- IniWrite,0,Configuration.ini,Settings,Minimized
- IniWrite,1,Configuration.ini,Settings,Mode
- Mode:=1
- Mode2:=0
- Start:=0
- Minimized:=0
- Loop 10
- {
- IniWrite,None,Configuration.ini,Settings,Key%A_Index%
- IniWrite,0,Configuration.ini,Settings,RKey%A_Index%
- Key%A_Index%:="None", RKey%A_Index%:=0
- }
- }
- else
- {
- IniRead,Start,Configuration.ini,Settings,Start
- IniRead,Minimized,Configuration.ini,Settings,Minimized
- IniRead,Mode,Configuration.ini,Settings,Mode
- Loop 10
- {
- IniRead,Key%A_Index%,Configuration.ini,Settings,Key%A_Index%
- IniRead,RKey%A_Index%,Configuration.ini,Settings,RKey%A_Index%
- }
- }
- Gui,1:color,000000,999999
- Window1.Push( New Window_1(x:=0, y:=0, w:=700, h:=471, Window:="1", Option:="+AlwaysOntop -Caption -DPIScale", Title:="Hotkey Master"))
- Switch1.Push( New SwitchName(x:=480, y:=100, w:= 180, h:= 30, state:=Start, BG_Color:= BG1, Font_Size:=20, Text1:="Run on Startup", Text2:="Run on Startup", Window:="1", Label:="Switch1"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=Minimized, BG_Color:= BG1, Font_Size:=20, Text1:="Run Minimized", Text2:="Run Minimized", Window:="1", Label:="Switch2"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=0, BG_Color:= BG1, Font_Size:=20, Text1:="Facebook", Text2:="Facebook", Window:="1", Label:="Switch3"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=0, BG_Color:= BG1, Font_Size:=20, Text1:="Youtube", Text2:="Youtube", Window:="1", Label:="Switch4"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=0, BG_Color:= BG1, Font_Size:=20, Text1:="Pause", Text2:="Pause", Window:="1", Label:="Suspend"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=0, BG_Color:= BG1, Font_Size:=20, Text1:="Restart", Text2:="Restart", Window:="1", Label:="Restart"))
- Switch1.Push( New SwitchName(x:=480, y+=h+10, w:= 180, h:= 30, state:=0, BG_Color:= BG1, Font_Size:=20, Text1:="Exit", Text2:="Exit", Window:="1", Label:="Exit1"))
- Radio1.Push( New Radio_01( x:=150, y:=415, w:= 25, h:= 25, state:=Mode, BG_Color:=BG2, Enabled_Color:="555555" , Window:="1", Label:="Radio1"))
- if(Mode=1)
- {
- Mode2:=0
- Radio1.Push( New Radio_01( x+=150, y:=415, w:= 25, h:= 25, state:=0, BG_Color:=BG2, Enabled_Color:="555555" , Window:="1", Label:="Radio2"))
- }
- else
- {
- Radio1.Push( New Radio_01( x+=150, y:=415, w:= 25, h:= 25, state:=1, BG_Color:=BG2, Enabled_Color:="555555" , Window:="1", Label:="Radio2"))
- Mode2:=1
- }
- Gui,1:Font,cFF2D28, Arial Black
- Gui,1:Add,Text,x170 y420 w70 Center h25 BackgroundTrans gRadio1 vRadio1, 1000ms
- Gui,1:Add,Text,x+80 y420 w70 h25 Center BackgroundTrans gRadio2 vRadio2, 100ms
- Gui,1:Add,Text,x15 y10 w675 h55 BackgroundTrans gMove vmove,
- Gui,1:Font,c000000, Arial Black
- Gui,1:Add,Edit,x45 y105 w80 r1 limit8 Border Center -E0x200 r1 vEdit1 gEditAll,% Key1
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_1 gEditAll,% RKey1
- Gui,1:Add,Edit,x45 y+38 w80 r1 limit8 Border Center -E0x200 r1 vEdit2 gEditAll,% Key2
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_2 gEditAll,% RKey2
- Gui,1:Add,Edit,x45 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit3 gEditAll,% Key3
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_3 gEditAll,% RKey3
- Gui,1:Add,Edit,x45 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit4 gEditAll,% Key4
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_4 gEditAll,% RKey4
- Gui,1:Add,Edit,x45 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit5 gEditAll,% Key5
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_5 gEditAll,% RKey5
- Gui,1:Add,Edit,x265 y105 w80 r1 limit8 Border Center -E0x200 r1 vEdit6 gEditAll,% Key6
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_6 gEditAll,% RKey6
- Gui,1:Add,Edit,x265 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit7 gEditAll,% Key7
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_7 gEditAll,% RKey7
- Gui,1:Add,Edit,x265 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit8 gEditAll,% Key8
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_8 gEditAll,% RKey8
- Gui,1:Add,Edit,x265 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit9 gEditAll,% Key9
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_9 gEditAll,% RKey9
- Gui,1:Add,Edit,x265 y+37 w80 r1 limit8 Border Center -E0x200 r1 vEdit10 gEditAll,% Key10
- Gui,1:Add,Edit,x+5 w80 r1 Border Center -E0x200 r1 vEdit_10 gEditAll,% RKey10
- if(Minimized=0)
- Gui,1:Show,w700 h471, Hotkey Master
- GuiControl,1:Focus, move
- Loop 10
- {
- If(Key%A_Index%="None")
- continue
- IfInString,Key%A_index%,+
- StringReplace,Key%A_Index%,Key%A_Index%,+,,All
- IfInString,Key%A_Index%,Ctrl
- StringReplace,Key%A_Index%,Key%A_Index%,Ctrl,^,All
- IfInString,Key%A_Index%,Alt
- StringReplace,Key%A_Index%,Key%A_Index%,Alt,!,All
- IfInString,Key%A_Index%,Sh
- StringReplace,Key%A_Index%,Key%A_Index%,Sh,+,All
- }
- ;~ ToolTip,% Key2
- ;~ Sleep 1000
- Hotkey,%Key1%,Keyw1,UseErrorLevel
- Hotkey,%Key2%,Keyw2,UseErrorLevel
- Hotkey,%Key3%,Keyw3,UseErrorLevel
- Hotkey,%Key4%,Keyw4,UseErrorLevel
- Hotkey,%Key5%,Keyw5,UseErrorLevel
- Hotkey,%Key6%,Keyw6,UseErrorLevel
- Hotkey,%Key7%,Keyw7,UseErrorLevel
- Hotkey,%Key8%,Keyw8,UseErrorLevel
- Hotkey,%Key9%,Keyw9,UseErrorLevel
- Hotkey,%Key10%,Keyw10,UseErrorLevel
- SetTimer, HB_Button_Hover , 50
- return
- EditAll:
- Gui,1:Submit,Nohide
- Loop 10
- {
- EditAll:=Edit%A_Index%
- REditAll:=Edit_%A_Index%
- IniWrite,%EditAll%,Configuration.ini,Settings,Key%A_Index%
- IniWrite,%REditAll%,Configuration.ini,Settings,RKey%A_Index%
- }
- return
- Keyw1:
- if (Mode=1)
- {
- StringLen,R1,RKey1
- Loop %R1%
- {
- NewR1:=SubStr(RKey1,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey1%
- return
- Keyw2:
- if (Mode=1)
- {
- StringLen,R1,RKey2
- Loop %R1%
- {
- NewR1:=SubStr(RKey2,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey2%
- return
- Keyw3:
- if (Mode=1)
- {
- StringLen,R1,RKey3
- Loop %R1%
- {
- NewR1:=SubStr(RKey3,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey3%
- return
- Keyw4:
- if (Mode=1)
- {
- StringLen,R1,RKey4
- Loop %R1%
- {
- NewR1:=SubStr(RKey1,A_Index,4)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey4%
- return
- Keyw5:
- if (Mode=1)
- {
- StringLen,R1,RKey5
- Loop %R1%
- {
- NewR1:=SubStr(RKey5,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey5%
- return
- Keyw6:
- if (Mode=1)
- {
- StringLen,R1,RKey6
- Loop %R1%
- {
- NewR1:=SubStr(RKey6,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey6%
- return
- Keyw7:
- if (Mode=1)
- {
- StringLen,R1,RKey7
- Loop %R1%
- {
- NewR1:=SubStr(RKey7,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey7%
- return
- Keyw8:
- if (Mode=1)
- {
- StringLen,R1,RKey8
- Loop %R1%
- {
- NewR1:=SubStr(RKey8,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey8%
- return
- Keyw9:
- if (Mode=1)
- {
- StringLen,R1,RKey9
- Loop %R1%
- {
- NewR1:=SubStr(RKey9,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey9%
- return
- Keyw10:
- if (Mode=1)
- {
- StringLen,R1,RKey10
- Loop %R1%
- {
- NewR1:=SubStr(RKey10,A_Index,1)
- sleep 100
- Send, % NewR1
- }
- }
- else
- Send,%RKey10%
- return
- End::Suspend,Toggle
- Suspend:
- SoundBeep, 5000
- Suspend,Toggle
- return
- Restart:
- SoundBeep, 5000
- Reload
- return
- Switch1:
- SoundBeep, 5000
- SetTimer, HB_Button_Hover , Off
- if(Switch1[1].state=0)
- {
- Switch1[ 1 ].Draw_Bitmap_ON()
- Switch1[1].state:=1
- IniWrite,1,Configuration.ini,Settings,Start
- FileCreateShortcut,%A_ScriptFullPath%,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\KBRemapper.lnk,,
- }
- else
- {
- Switch1[1].Draw_Bitmap_OFF()
- Switch1[1].state:=0
- IniWrite,0,Configuration.ini,Settings,Start
- FileDelete,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\KBRemapper.lnk
- }
- Hover_On:=0
- SetTimer, HB_Button_Hover , On
- return
- Switch2:
- SoundBeep, 5000
- SetTimer, HB_Button_Hover , Off
- if(Switch1[2].state=0)
- {
- Switch1[ 2 ].Draw_Bitmap_ON()
- Switch1[2].state:=1
- IniWrite,1,Configuration.ini,Settings,Minimized
- }
- else
- {
- Switch1[2].Draw_Bitmap_OFF()
- Switch1[2].state:=0
- IniWrite,0,Configuration.ini,Settings,Minimized
- }
- Hover_On:=0
- SetTimer, HB_Button_Hover , On
- return
- Switch3:
- SoundBeep, 5000
- Switch1[A_GuiControl].Draw_Bitmap_OFF()
- Sleep 200
- Switch1[A_GuiControl].Draw_Bitmap_ON()
- Run, https://www.facebook.com/js.vanheartnet
- return
- Switch4:
- SoundBeep, 5000
- Switch1[A_GuiControl ].Draw_Bitmap_OFF()
- Sleep 200
- Switch1[A_GuiControl].Draw_Bitmap_ON()
- Run, https://youtu.be/Ijnp4lieQMw
- return
- ;~ Esc::
- Exit1:
- SoundBeep, 5000
- Gdip_Shutdown(pToken)
- ExitApp
- GuiContextMenu:
- Gui,1:Hide
- return
- Show:
- IfWinExist,Hotkey Master
- Gui,1:Show
- else
- Gui,1:Show,w700 h471, Hotkey Master
- return
- Move:
- PostMessage,0xA1,2
- While(GetKeystate("LButton")) {
- sleep 10
- WinGetPos,X,Y,,,A
- WinMove,,,%X%,%Y%,
- }
- Radio1:
- if(Mode=0)
- {
- Mode:=1
- Mode2:=0
- IniWrite,1,Configuration.ini,Settings,Mode
- Radio1[1].Draw_Bitmap_On()
- Radio1[2].Draw_Bitmap_OFF()
- }
- return
- Radio2:
- if(Mode=1)
- {
- Mode:=0
- Mode2:=1
- IniWrite,0,Configuration.ini,Settings,Mode
- Radio1[2].Draw_Bitmap_On()
- Radio1[1].Draw_Bitmap_OFF()
- }
- return
- Class Radio_01{
- __New( x:=10, y:=10, w:= 20, h:= 20, state:=0, BG_Color:="222222", Enabled_Color:="FF0000" , Window:="1", Label:="Radio1"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.state:=state
- This.BG_Color:= "0xFF" BG_Color
- This.BG_Color2:="0xFF" BG_Color2
- This.Enabled_Color:= "0xFF" Enabled_Color
- This.Label:=Label
- This.Create_Radio_OFF()
- This.Create_Radio_ON()
- This.Add_Control()
- sleep 10
- (This.State=0)?(This.Draw_Bitmap_OFF()):(This.Draw_Bitmap_ON())
- }
- Add_Control(){
- static
- num := Radio1.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Radio_OFF(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.w , This.h )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 5 )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 26 , 26 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF111111" )
- Gdip_FillEllipse( G , Brush , 1 , 1 , 23, 23 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Enabled_Color )
- Gdip_FillEllipse( G , Brush , 2 , 3 , This.w-4 , This.h-5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF444444" )
- Gdip_FillEllipse( G , Brush , 9 , 9 , 7 , 7 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 1 )
- Gdip_DrawEllipse( G , Pen , 9 , 9 , 7 , 7 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Radio_OFF := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Radio_ON(){
- pBitmap:=Gdip_CreateBitmap( This.w , This.h )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 5 )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 26 , 26 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF111111" )
- Gdip_FillEllipse( G , Brush , 1 , 1 , 23 , 23 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Enabled_Color )
- Gdip_FillEllipse( G , Brush , 3 , 3 , This.w-6 , This.h-6 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_FillEllipse( G , Brush , 9 , 9 , 7 , 7 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 1 )
- Gdip_DrawEllipse( G , Pen , 9 , 9 , 7 , 7 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Radio_ON := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Bitmap_OFF(){
- SetImage( This.Hwnd , This.Radio_OFF )
- }
- Draw_Bitmap_ON(){
- SetImage( This.Hwnd , This.Radio_ON )
- }
- }
- Class SwitchName{
- __New( x:=10, y:=10, w:= 100, h:= 30, state:=0, BG_Color:="222222", Font_Size:=20, Text1:="SwitchON", Text2:="SwitchOFF", Window:="1", Label:="SwitchC"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.State:=state
- This.Font_Size := Font_Size
- This.BG_Color:= "0xFF" BG_Color
- This.Text1:=Text1
- This.Text2:=Text2
- This.Label:=Label
- This.Create_Switch_OFF()
- This.Create_Switch_ON()
- This.Create_Switch_HOVER()
- This.Adding_Control()
- sleep 20
- (This.State=0)?(This.Draw_Bitmap_OFF()):(This.Draw_Bitmap_ON())
- }
- Adding_Control(){
- static
- num := Switch1.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Switch_OFF(){
- pBitmap:=Gdip_CreateBitmap( This.w , This.h )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.w+2 , This.h+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.w-2 , This.h-2 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.w-4 , This.h-4 , 5 )
- Gdip_DeleteBrush( Brush )
- ;Text
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- ;Text
- Gdip_TextToGraphics( G , This.Text1 , "s10 Center vCenter Bold c" Brush " x-1 y5" , "Segoe UI" , This.w-10, This.h-10 )
- Gdip_DeleteBrush( Brush )
- ;Text
- Brush := Gdip_BrushCreateSolid( "0xFF888888" )
- ;Text
- Gdip_TextToGraphics( G , This.Text2 , "s10 Center vCenter Bold c" Brush " x1 y5" , "Segoe UI" , This.w-10 , This.h-10 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Switch_OFF := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Switch_ON(){
- pBitmap:=Gdip_CreateBitmap( This.w , This.h )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -6 , -1 , This.w+2 , This.h+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.w-2 , This.h-2 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.w-4 , This.h-4 , 5 )
- Gdip_DeleteBrush( Brush )
- ;Text
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- ;Text
- Gdip_TextToGraphics( G , This.Text1 , "s12 Center vCenter Bold c" Brush " x-1 y5" , "Segoe UI" , This.w , This.h-10 )
- Gdip_DeleteBrush( Brush )
- ;Text
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- ;Text
- Gdip_TextToGraphics( G , This.Text2 , "s12 Center vCenter Bold c" Brush " x1 y5" , "Segoe UI" , This.w , This.h-10 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Switch_ON := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Switch_HOVER(){
- pBitmap:=Gdip_CreateBitmap( This.w , This.h )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -6 , -1 , This.w+2 , This.h+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.w-2 , This.h-2 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.w-4 , This.h-4 , 5 )
- Gdip_DeleteBrush( Brush )
- ;Text
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- ;Text
- Gdip_TextToGraphics( G , This.Text1 , "s12 Center vCenter Bold c" Brush " x-1 y5" , "Segoe UI" , This.w , This.h-10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- ;Text
- Gdip_TextToGraphics( G , This.Text2 , "s12 Center vCenter Bold c" Brush " x1 y5" , "Segoe UI" , This.w , This.h-10 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Switch_Hover := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Bitmap_OFF(){
- SetImage( This.Hwnd , This.Switch_OFF )
- }
- Draw_Bitmap_ON(){
- SetImage( This.Hwnd , This.Switch_ON )
- }
- Draw_Bitmap_Hover(){
- SetImage( This.Hwnd , This.Switch_Hover )
- }
- }
- ;Add the hover fuction to the bottom of your script (or go lib route if you know how to)
- HB_Button_Hover(){
- Static Index
- global Hover_On
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On && ctrl ){
- loop , % Switch1.Length()
- if( ctrl = Switch1[ A_Index ].hwnd )
- {
- if(Switch1[A_Index].state=0)
- Switch1[ A_Index ].Draw_Bitmap_Hover() , Index := A_Index , Hover_On := 1 , break
- else
- Switch1[ A_Index ].Draw_Bitmap_Hover() , Index := A_Index , Hover_On := 0 , break
- if(Hover_On=1)
- SoundBeep,200
- }
- }else if( Hover_On = 1 )
- if( ctrl != Switch1[ Index ].Hwnd )
- Switch1[ Index ].Draw_Bitmap_OFF() , Hover_On := 0
- }
- Class Window_1{
- __New(x:=0, y:=0, w:=602, h:=400, Window:="1", Option:="+AlwaysOntop -Caption", Title:="Hotkey Master"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.Option:=Option
- This.Title:=Title
- This.Create_Window()
- This.Add_Window()
- Sleep 20
- This.Draw_Window()
- }
- Add_Window(){
- static
- num := Window1.Length()+1
- Gui,% This.Window ":" This.Option
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Window(){
- pBitmap:=Gdip_CreateBitmap( 700 , 471 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;Fill_BG
- Brush := Gdip_BrushCreateHatch( "0xFF404040" , "0xFF000000" , 46 )
- Gdip_FillRectangle( G , Brush , 0 , 0 , 700 , 470 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFF0F0F0" , "0xFFA8B4C1" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 10 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 697 , 465 , 2 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF404040" , "0xFFFFFFFF" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 10 , 10 , 679 , 53 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 11 , 12 , 677 , 50 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 1 , 100 , 100 , "0xFFFFFFFF" , "0xFF404040" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 4 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 10 , 10 , 680 , 54 , 5 )
- Gdip_DeletePen( Pen )
- ;Title
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF404040" , 1 , 1 )
- ;Title
- Gdip_TextToGraphics( G , ">>> HOTKEY MASTER <<<" , "s25 Center vCenter Bold Arial Black c" Brush " x109 y9" , "Segoe UI" , 499 , 50 )
- Gdip_DeleteBrush( Brush )
- ;Title
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- ;Title
- Gdip_TextToGraphics( G , ">>> HOTKEY MASTER <<<" , "s25 Center vCenter Bold Arial Black c" Brush " x110 y12" , "Segoe UI" , 500 , 50 )
- Gdip_DeleteBrush( Brush )
- ;Title
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- ;Title
- Gdip_TextToGraphics( G , ">>> HOTKEY MASTER <<<" , "s25 Center vCenter Bold Arial Black c" Brush " x110 y10" , "Segoe UI" , 500 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 5 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 10 , 70 , 680 , 388 )
- Gdip_DeletePen( Pen )
- ;NAME
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 20 , 400 , 660 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 3 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 21 , 401 , 660 , 50 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF333333" , 1 )
- Gdip_DrawRectangle( G , Pen , 0 , 0 , 699 , 470 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFFFF0000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 242 , 81 , 210 , 309 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 244 , 83 , 210 , 309 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFFFF0000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 20 , 80 , 210 , 309 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 22 , 82 , 210 , 309 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 30 , 90 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 31 , 90 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 30 , 150 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 20 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 31 , 150 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 30 , 210 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 31 , 210 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 30 , 270 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 31 , 270 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 30 , 330 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 31 , 330 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 253 , 90 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 252 , 90 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 253 , 151 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 252 , 150 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 253 , 211 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 252 , 210 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 253 , 271 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 252 , 270 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 253 , 331 , 190 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF999999" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 252 , 330 , 190 , 50 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 465 , 81 , 210 , 310 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 468 , 84 , 204 , 304 , 5 )
- Gdip_DeleteBrush( Brush )
- ;MY NAME
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF000000" , 1 , 1 )
- ;MY NAME
- Gdip_TextToGraphics( G , "VANHEARTNET" , "s14 Center vCenter Bold c" Brush " x558 y429" , "Segoe UI" , 120 , 20 )
- Gdip_DeleteBrush( Brush )
- ;MY NAME
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFff0000" , 1 , 1 )
- ;MY NAME
- Gdip_TextToGraphics( G , "VANHEARTNET" , "s14 Center vCenter Bold c" Brush " x561 y432" , "Segoe UI" , 120 , 20 )
- Gdip_DeleteBrush( Brush )
- ;MY NAME
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFffffff" , 1 , 1 )
- ;MY NAME
- Gdip_TextToGraphics( G , "VANHEARTNET" , "s14 Center vCenter Bold c" Brush " x560 y430" , "Segoe UI" , 120 , 20 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Window(){
- SetImage( This.Hwnd , This.Default_Bitmap )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment