AutoHotkey Community

It is currently May 25th, 2012, 6:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: May 20th, 2007, 7:15 pm 
HI, I want to create a little routine that when clicking the right mouse button, will display a context menu of my definition. For now, just a little "WELCOM!" will do. Can you please help me write this? :D :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 20th, 2007, 11:54 pm 
Offline

Joined: January 12th, 2007, 4:30 am
Posts: 531
Location: Norway
Hi,

Your question was quite vague, that might be why nobody has answered you yet. If I understasnd you correctly, you want to make a program that will show a menu everytime you right click with your mouse?

For that you will need to make a script with the #persistent set at the top. then you... something like this perhaps:

Code:
#persistent
RButton::
gui destroy
MouseGetPos, xpos, ypos
Gui, Add, Button, gguiclose x6 y7 w100 h30 , Not exactly
Gui, Add, Button, gguiclose x6 y47 w100 h30 , a context men
Gui, Add, Button, gguiclose x6 y87 w100 h30 , but
Gui, Add, Button, gguiclose x6 y127 w100 h30 , a start??
; Generated using SmartGUI Creator 4.0
gui -sysmenu -caption
Gui, Show, x%xpos% y%ypos% h172 w120, New GUI Window

return

GuiClose:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2007, 4:39 am 
Murple, interesting, but can the stock pop-up menu be altered, lets say down to just one default placeholder? 'stock' meaning, the same actual ui-popover Windows natively produces :-) :-) is this sort of tweaking deep posble?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2007, 5:02 pm 
Offline

Joined: April 9th, 2007, 4:43 pm
Posts: 172
Code:
#Persistent
#SingleInstance, force
Gosub, TrayMenu
Gosub, CreateMenu
Hotkey, RButton, On
Return

RButton::
Menu, Menu1, Show
Return

Exit:
ExitApp
Return

Disable:
Hotkey, RButton, Off
Return

Enable:
Hotkey, RButton, On
Return

TrayMenu:
Menu, Tray, NoStandard
Menu, Tray, Add, Activate, Enable
Menu, Tray, Add, Exit, Exit
Menu, Tray, Default, Activate
Return
;Below are actions you can change
CreateMenu:
Menu, RunMenu, Add, Editor, RunEditor
Menu, RunMenu, Add, Explorer, RunExplorer
Menu, Menu1, Add, Run, :RunMenu
Menu, Menu1, Add, Switch between tasks, KeyAltTab
Menu, Menu1, Add, ,
Menu, Menu1, Add, Deactivate, Disable
Menu, Menu1, Add, ,
Menu, Menu1, Add, Exit, Exit
Return

RunEditor:
Run, Notepad.exe
Return

RunExplorer:
Run, Explorer.exe
Return

KeyAltTab:
Send, !{Tab}
Return

_________________
COMPLETELY INACTIVE - I do not use AHK anymore.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2007, 9:02 pm 
Offline

Joined: January 12th, 2007, 4:30 am
Posts: 531
Location: Norway
Sweet -that script by John W works like a charm and does exactly what you want it to.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2007, 8:04 pm 
Offline

Joined: November 26th, 2006, 8:10 pm
Posts: 77
Can anyone see if transparency features can be applied to John W's awesome code?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 12:54 am 
Offline

Joined: January 12th, 2007, 4:30 am
Posts: 531
Location: Norway
AngieX, I'm afraid I don't know the answer to that. I tried to search for transparency in the help section for "menu", but it wasn't mentioned anywhere. Perhaps if it can somehow be shown inside a window the transparency can be set for the entire window? I don't know though, perhaps John W will come up with a solution.

For my part, it turns out I might actually want to use this in a small project I've just started on. I'm trying to add some functionality to a lame program. Ideally I would like to add an item to a context menu that already exists for this program, but I don't think that is a viable option so I thought of using this script to add a context menu that pops up to the left of the mouse cursor, instead of to the right which is what normally happens. I tried to modify John W's script to do this, but for some reason, the normal context menu still fires? Is there a way to control whether or not the right mouse button triggers one or both context menus?

I replaced the Rbutton:: section of the code above with this:
Code:
RButton::
MouseGetPos, xpos, ypos
xpos -=150
Menu, Menu1, Show, %xpos%, %ypos%
Return

With that code both menus fire. If you comment out "xpos -=150" only one menu fires?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 1:27 am 
Offline

Joined: November 26th, 2006, 8:10 pm
Posts: 77
John W - beep us up with some transparency solution when you see this!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 4:25 pm 
Offline

Joined: April 9th, 2007, 4:43 pm
Posts: 172
Transparency status: I´m searching, I tried doing it with a GUI, but then it´s not very nice, and without a GUI you can´t set the transparency...
I tried it with a "normal" right-click-menu, too. It works there, but I have an idea.
I hope I´ll find a solution - This is a feature I don´t want to miss!

_________________
COMPLETELY INACTIVE - I do not use AHK anymore.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 4:36 pm 
Offline

Joined: April 9th, 2007, 4:43 pm
Posts: 172
Quote:
I replaced the Rbutton:: section of the code above with this:
Code:
RButton::
MouseGetPos, xpos, ypos
xpos -=150
Menu, Menu1, Show, %xpos%, %ypos%
Return

With that code both menus fire. If you comment out "xpos -=150" only one menu fires?

I don´t know if this is a good change, because it´s depending on the menu width...

Change:
Menu, Menu1, Add, Zwischen Tasks wechseln, KeyAltTab, Pn
It´s better, because menu keeps open.

_________________
COMPLETELY INACTIVE - I do not use AHK anymore.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 7:07 pm 
Offline

Joined: January 12th, 2007, 4:30 am
Posts: 531
Location: Norway
John W,

Thanks for your reply. It might not be a good change for you, but I would like to know how to control if one or both menus fire (one menu being only the menu I create, and both menus meaning the menu I create in addition the menu that already exists as standard either in windows or in the specific program).

Since changing the position of the menu affects if one or both menus fire I am confused and I was hoping you knew why or how to control it.


Verstehen Sie?
Regards,
Murple


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 24th, 2007, 3:35 am 
Offline

Joined: November 26th, 2006, 8:10 pm
Posts: 77
John - that is cool, at least now I know the limitations..... can font/size stuff be changed in a context menu? Perhaps at this level it might be a situation where *all* systemwide, Context menus maybe from some place can be changed to a different transparency, etc...., rather than it being a menu by menu command-line variable. Someone would really have to know the innerworkings and visual display calls of Windows. You would think transparency should be buried deep in there somewhere :D :idea: CALLING ALL GURUS! :!: :!: :!: :!: :!: :!:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2007, 11:34 am 
I was thinking there may be some deep hook or variable in the Windows stack that could address transparency, but yet to turn up anything yet.........


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2007, 3:46 pm 
Offline

Joined: April 9th, 2007, 4:43 pm
Posts: 172
Quote:
Menu, Menu1, Add, Zwischen Tasks wechseln, KeyAltTab, Pn
Oops, that was the german one... Of couse it should be Menu, Menu1, Add, Switch between tasks, KeyAltTab, Pn
AngieX:
To make any menu from windows (right-click, ...) transparent, you could use this:
Code:
Gosub, ReadPreprocs
Gosub, ReadVars
Gosub, ReadIni
Gosub, ReadLang
Gosub, CreateSettings
Gosub, CorrectSettings
Gosub, CreateTray
Gosub, TransparencyConvert
SetTimer, MakeTransparent, 1
Return

MakeTransparent:
If (ActiveMenus)
  WinSet, Trans, %TransparencyValueMenus%, ahk_class #32768 ; Menus, Right-click-menus, ...
If (ActiveMsgBoxes)
  WinSet, Trans, %TransparencyValueMsgBoxes%, ahk_class #32770 ; MsgBoxes, Warnings, ...
If (ActiveTrayTips)
  WinSet, Trans, %TransparencyValueTrayTips%, ahk_class tooltips_class32 ; TrayTips
If (ActiveStartMenu)
  {
  WinSet, Trans, %TransparencyValueStartMenu%, ahk_class DV2ControlHost ; Start menu
  WinSet, Trans, %TransparencyValueStartMenu%, ahk_class BaseBar ; All prgrams
  }
If (ActiveTaskbar)
  WinSet, Trans, %TransparencyValueTaskbar%, ahk_class Shell_TrayWnd ; Taskbar
Return

ReadPreprocs:
#Persistent
#SingleInstance, force
DetectHiddenWindows, On
Return

ReadVars:
AppName=InvisMenu
Version=1.0.0.2
Transparency=50
Return

ReadIni:
IniRead, TransparencyMenus     , %AppName%.ini, Transparency        , Menus               , 50
IniRead, TransparencyMsgBoxes  , %AppName%.ini, Transparency        , MsgBoxes            , 50
IniRead, TransparencyTrayTips  , %AppName%.ini, Transparency        , TrayTips            , 50
IniRead, TransparencyStartMenu , %AppName%.ini, Transparency        , StartMenu           , 50
IniRead, TransparencyTaskbar   , %AppName%.ini, Transparency        , Taskbar             , 50
IniRead, ActiveMenus           , %AppName%.ini, Active              , Menus               , 1
IniRead, ActiveMsgBoxes        , %AppName%.ini, Active              , MsgBoxes            , 0
IniRead, ActiveTrayTips        , %AppName%.ini, Active              , TrayTips            , 0
IniRead, ActiveStartMenu       , %AppName%.ini, Active              , StartMenu           , 0
IniRead, ActiveTaskbar         , %AppName%.ini, Active              , Taskbar             , 0
Return

ReadLang:
If (Language = "EN")
  {
  LangShowGui=Show
  LangSettings=Settings
  LangExit=Exit
  LangMenus=Menus
  LangMsgBoxes=Message, Warnings
  LangTrayTips=TrayTips
  LangStartMenu=Start menu
  LangTaskbar=Task bar
  }
Else If (Language = "DE")
  {
  LangShowGui=Öffnen
  LangSettings=Einstellungen
  LangExit=Beenden
  LangMenus=Menüs
  LangMsgBoxes=Nachrichten, Warnungen
  LangTrayTips=TrayTips
  LangStartMenu=Startmenü
  LangTaskbar=Taskleiste
  }
Else
  {
  IniRead, LangShowGui         , %AppName%.lng, %Language%, Show                , Show
  IniRead, LangSettings        , %AppName%.lng, %Language%, Settings            , Settings
  IniRead, LangExit            , %AppName%.lng, %Language%, Exit                , Exit
  IniRead, LangMenus           , %AppName%.lng, %Language%, Menus               , Menus
  IniRead, LangMsgBoxes        , %AppName%.lng, %Language%, MsgBoxes            , Message, Warnings
  IniRead, LangTrayTips        , %AppName%.lng, %Language%, TrayTips            , TrayTips
  IniRead, LangStartMenu       , %AppName%.lng, %Language%, StartMenu           , Start menu
  IniRead, LangTaskbar         , %AppName%.lng, %Language%, Taskbar             , Task bar
  }
Return

CreateSettings:
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveMenus, %LangMenus%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveMsgBoxes, %LangMsgBoxes%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveTrayTips, %LangTrayTips%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveStartMenu, %LangStartMenu%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveTaskbar, %LangTaskbar%
Gui, Add, Button, gOK, OK!
Gui, Add, Edit, ym w50 r1 Number, %TransparencyMenus%
Gui, Add, Edit, w50 r1 Number, %TransparencyMsgBoxes%
Gui, Add, Edit, w50 r1 Number, %TransparencyTrayTips%
Gui, Add, Edit, w50 r1 Number, %TransparencyStartMenu%
Gui, Add, Edit, w50 r1 Number, %TransparencyTaskbar%
Return

CreateTray:
Menu, Tray, NoStandard
Menu, Tray, Add, %LangSettings%, ShowSettings
Menu, Tray, Add,
Menu, Tray, Add, %LangExit%, Exit
Menu, Tray, Tip, %AppName%
Menu, Tray, Default, %LangSettings%
Return

ShowSettings:
Gui, Show, Center, %LangSettings%
Return

OK:
Gui, Submit, Hide
TransparencyConvert:
If (TransparencyMenus > 100||TransparencyMenus < 0)
  {
  GuiControl,, TransparencyMenus, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueMenus := Round(TransparencyMenus*2.25)
  IniWrite, %TransparencyMenus%           , %AppName%.ini, Main                , TransparencyMenus
  }
If (TransparencyMsgBoxes > 100||TransparencyMsgBoxes < 0)
  {
  GuiControl,, TransparencyMsgBoxes, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueMsgBoxes := Round(TransparencyMsgBoxes*2.25)
  IniWrite, %TransparencyMsgBoxes%           , %AppName%.ini, Main                , TransparencyMsgBoxes
  }
If (TransparencyTrayTips > 100||TransparencyTrayTips < 0)
  {
  GuiControl,, TransparencyTrayTips, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueTrayTips := Round(TransparencyTrayTips*2.25)
  IniWrite, %TransparencyTrayTips%           , %AppName%.ini, Main                , TransparencyTrayTips
  }
If (TransparencyStartMenu > 100||TransparencyStartMenu < 0)
  {
  GuiControl,, TransparencyStartMenu, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueStartMenu := Round(TransparencyStartMenu*2.25)
  IniWrite, %TransparencyStartMenu%           , %AppName%.ini, Main                , TransparencyStartMenu
  }
If (TransparencyTaskbar > 100||TransparencyTaskbar < 0)
  {
  GuiControl,, TransparencyTaskbar, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueTaskbar := Round(TransparencyTaskbar*2.25)
  IniWrite, %TransparencyTaskbar%           , %AppName%.ini, Main                , TransparencyTaskbar
  }
Return

ActiveChange:
If Not (ActiveMenus)
  {
  WinSet, Trans, 255, ahk_class #32768
  IniWrite, %ActiveMenus%, %AppName%.ini, Active, Menus
  }
If Not (ActiveMsgBoxes)
  {
  WinSet, Trans, 255, ahk_class #32770
  IniWrite, %ActiveMsgBoxes%, %AppName%.ini, Active, MsgBoxes
  }
If Not (ActiveTrayTips)
  {
  WinSet, Trans, 255, ahk_class tooltips_class32
  IniWrite, %ActiveTrayTips%, %AppName%.ini, Active, TrayTips
  }
If Not (ActiveStartMenu)
  {
  WinSet, Trans, 255, ahk_class DV2ControlHost
  WinSet, Trans, 255, ahk_class BaseBar
  IniWrite, %ActiveStartMenu%, %AppName%.ini, Active, StartMenu
  }
If Not (ActiveTaskbar)
  {
  WinSet, Trans, 255, ahk_class Shell_TrayWnd
  IniWrite, %ActiveTaskbar%, %AppName%.ini, Active, Taskbar
  }
Return

CorrectSettings:
If (ActiveMenus)
  GuiControl, , ActiveMenus, 1
Else
  GuiControl, , ActiveMenus, 0
If (ActiveMsgBoxes)
  GuiControl, , ActiveMsgBoxes, 1
Else
  GuiControl, , ActiveMsgBoxes, 0
If (ActiveTrayTips)
  GuiControl, , ActiveTrayTips, 1
Else
  GuiControl, , ActiveTrayTips, 0
If (ActiveStartMenu)
  GuiControl, , ActiveStartMenu, 1
Else
  GuiControl, , ActiveStartMenu, 0
If (ActiveTaskbar)
  GuiControl, , ActiveTaskbar, 1
Else
  GuiControl, , ActiveTaskbar, 0
Return

Exit:
ExitApp
Return

Font size - I don´t know how, but I´ll try...

Murp|e: I don´t know what you mean...

_________________
COMPLETELY INACTIVE - I do not use AHK anymore.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2007, 7:23 pm 
Offline

Joined: November 26th, 2006, 8:10 pm
Posts: 77
HEY John that is awesome work! May I PLEASE ask two quick questions???:

1) How do you simply adjust transparency? I wanted to make it 0, so I changed all the values, but it is stuck at 50% it seem? How can I make it anything?

Here is my attempt to combine the two scripts together you made, with custom menu + transparency (it seemed logical to combine them), but it seems to knock out the transparency whereever I place the GoSub. I don't know why, but perhaps I am missing something obvious


Code:
#Persistent
#SingleInstance, force


Gosub, ReadPreprocs
Gosub, ReadVars
Gosub, ReadIni
Gosub, ReadLang
Gosub, CreateSettings
Gosub, CorrectSettings
Gosub, CreateTray
Gosub, TransparencyConvert
Gosub, CreateMenu
SetTimer, MakeTransparent, 1
Return

MakeTransparent:
If (ActiveMenus)
  WinSet, Trans, %TransparencyValueMenus%, ahk_class #32768 ; Menus, Right-click-menus, ...
If (ActiveMsgBoxes)
  WinSet, Trans, %TransparencyValueMsgBoxes%, ahk_class #32770 ; MsgBoxes, Warnings, ...
If (ActiveTrayTips)
  WinSet, Trans, %TransparencyValueTrayTips%, ahk_class tooltips_class32 ; TrayTips
If (ActiveStartMenu)
  {
  WinSet, Trans, %TransparencyValueStartMenu%, ahk_class DV2ControlHost ; Start menu
  WinSet, Trans, %TransparencyValueStartMenu%, ahk_class BaseBar ; All prgrams
  }
If (ActiveTaskbar)
  WinSet, Trans, %TransparencyValueTaskbar%, ahk_class Shell_TrayWnd ; Taskbar
Return

ReadPreprocs:
#Persistent
#SingleInstance, force
DetectHiddenWindows, On
Return

ReadVars:
AppName=InvisMenu
Version=1.0.0.2
Transparency=0
Return

ReadIni:
IniRead, TransparencyMenus     , %AppName%.ini, Transparency        , Menus               , 50
IniRead, TransparencyMsgBoxes  , %AppName%.ini, Transparency        , MsgBoxes            , 50
IniRead, TransparencyTrayTips  , %AppName%.ini, Transparency        , TrayTips            , 50
IniRead, TransparencyStartMenu , %AppName%.ini, Transparency        , StartMenu           , 50
IniRead, TransparencyTaskbar   , %AppName%.ini, Transparency        , Taskbar             , 50
IniRead, ActiveMenus           , %AppName%.ini, Active              , Menus               , 1
IniRead, ActiveMsgBoxes        , %AppName%.ini, Active              , MsgBoxes            , 0
IniRead, ActiveTrayTips        , %AppName%.ini, Active              , TrayTips            , 0
IniRead, ActiveStartMenu       , %AppName%.ini, Active              , StartMenu           , 0
IniRead, ActiveTaskbar         , %AppName%.ini, Active              , Taskbar             , 0
Return

ReadLang:
If (Language = "EN")
  {
  LangShowGui=Show
  LangSettings=Settings
  LangExit=Exit
  LangMenus=Menus
  LangMsgBoxes=Message, Warnings
  LangTrayTips=TrayTips
  LangStartMenu=Start menu
  LangTaskbar=Task bar
  }
Else If (Language = "DE")
  {
  LangShowGui=?fnen
  LangSettings=Einstellungen
  LangExit=Beenden
  LangMenus=Men?LangMsgBoxes=Nachrichten, Warnungen
  LangTrayTips=TrayTips
  LangStartMenu=Startmen?angTaskbar=Taskleiste
  }
Else
  {
  IniRead, LangShowGui         , %AppName%.lng, %Language%, Show                , Show
  IniRead, LangSettings        , %AppName%.lng, %Language%, Settings            , Settings
  IniRead, LangExit            , %AppName%.lng, %Language%, Exit                , Exit
  IniRead, LangMenus           , %AppName%.lng, %Language%, Menus               , Menus
  IniRead, LangMsgBoxes        , %AppName%.lng, %Language%, MsgBoxes            , Message,

Warnings
  IniRead, LangTrayTips        , %AppName%.lng, %Language%, TrayTips            , TrayTips
  IniRead, LangStartMenu       , %AppName%.lng, %Language%, StartMenu           , Start menu
  IniRead, LangTaskbar         , %AppName%.lng, %Language%, Taskbar             , Task bar
  }
Return

CreateSettings:
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveMenus, %LangMenus%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveMsgBoxes, %LangMsgBoxes%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveTrayTips, %LangTrayTips%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveStartMenu, %LangStartMenu%
Gui, Add, Checkbox, w150 h20 gActiveChange vActiveTaskbar, %LangTaskbar%
Gui, Add, Button, gOK, OK!
Gui, Add, Edit, ym w50 r1 Number, %TransparencyMenus%
Gui, Add, Edit, w50 r1 Number, %TransparencyMsgBoxes%
Gui, Add, Edit, w50 r1 Number, %TransparencyTrayTips%
Gui, Add, Edit, w50 r1 Number, %TransparencyStartMenu%
Gui, Add, Edit, w50 r1 Number, %TransparencyTaskbar%
Return

CreateTray:
Menu, Tray, NoStandard
Menu, Tray, Add, %LangSettings%, ShowSettings
Menu, Tray, Add,
Menu, Tray, Add, %LangExit%, Exit
Menu, Tray, Tip, %AppName%
Menu, Tray, Default, %LangSettings%
Return

ShowSettings:
Gui, Show, Center, %LangSettings%
Return

OK:
Gui, Submit, Hide
TransparencyConvert:
If (TransparencyMenus > 100||TransparencyMenus < 0)
  {
  GuiControl,, TransparencyMenus, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueMenus := Round(TransparencyMenus*2.25)
  IniWrite, %TransparencyMenus%           , %AppName%.ini, Main                ,

TransparencyMenus
  }
If (TransparencyMsgBoxes > 100||TransparencyMsgBoxes < 0)
  {
  GuiControl,, TransparencyMsgBoxes, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueMsgBoxes := Round(TransparencyMsgBoxes*2.25)
  IniWrite, %TransparencyMsgBoxes%           , %AppName%.ini, Main                ,

TransparencyMsgBoxes
  }
If (TransparencyTrayTips > 100||TransparencyTrayTips < 0)
  {
  GuiControl,, TransparencyTrayTips, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueTrayTips := Round(TransparencyTrayTips*2.25)
  IniWrite, %TransparencyTrayTips%           , %AppName%.ini, Main                ,

TransparencyTrayTips
  }
If (TransparencyStartMenu > 100||TransparencyStartMenu < 0)
  {
  GuiControl,, TransparencyStartMenu, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueStartMenu := Round(TransparencyStartMenu*2.25)
  IniWrite, %TransparencyStartMenu%           , %AppName%.ini, Main                ,

TransparencyStartMenu
  }
If (TransparencyTaskbar > 100||TransparencyTaskbar < 0)
  {
  GuiControl,, TransparencyTaskbar, 50
  Gosub, ShowSettings
  }
Else
  {
  TransparencyValueTaskbar := Round(TransparencyTaskbar*2.25)
  IniWrite, %TransparencyTaskbar%           , %AppName%.ini, Main                ,

TransparencyTaskbar
  }
Return

ActiveChange:
If Not (ActiveMenus)
  {
  WinSet, Trans, 0, ahk_class #32768
  IniWrite, %ActiveMenus%, %AppName%.ini, Active, Menus
  }
If Not (ActiveMsgBoxes)
  {
  WinSet, Trans, 0, ahk_class #32770
  IniWrite, %ActiveMsgBoxes%, %AppName%.ini, Active, MsgBoxes
  }
If Not (ActiveTrayTips)
  {
  WinSet, Trans, 0, ahk_class tooltips_class32
  IniWrite, %ActiveTrayTips%, %AppName%.ini, Active, TrayTips
  }
If Not (ActiveStartMenu)
  {
  WinSet, Trans, 0, ahk_class DV2ControlHost
  WinSet, Trans, 0, ahk_class BaseBar
  IniWrite, %ActiveStartMenu%, %AppName%.ini, Active, StartMenu
  }
If Not (ActiveTaskbar)
  {
  WinSet, Trans, 0, ahk_class Shell_TrayWnd
  IniWrite, %ActiveTaskbar%, %AppName%.ini, Active, Taskbar
  }
Return

CorrectSettings:
If (ActiveMenus)
  GuiControl, , ActiveMenus, 1
Else
  GuiControl, , ActiveMenus, 0
If (ActiveMsgBoxes)
  GuiControl, , ActiveMsgBoxes, 1
Else
  GuiControl, , ActiveMsgBoxes, 0
If (ActiveTrayTips)
  GuiControl, , ActiveTrayTips, 1
Else
  GuiControl, , ActiveTrayTips, 0
If (ActiveStartMenu)
  GuiControl, , ActiveStartMenu, 1
Else
  GuiControl, , ActiveStartMenu, 0
If (ActiveTaskbar)
  GuiControl, , ActiveTaskbar, 1
Else
  GuiControl, , ActiveTaskbar, 0
Return




CreateMenu:
Menu, RunMenu, Add, Editor, RunEditor
Menu, RunMenu, Add, Explorer, RunExplorer
Menu, Menu1, Add, Run, :RunMenu
Menu, Menu1, Add, Switch between tasks, KeyAltTab
Menu, Menu1, Add, ,
Menu, Menu1, Add, Deactivate, Disable
Menu, Menu1, Add, ,
Menu, Menu1, Add, Exit, Exit
Return

Disable:
Hotkey, RButton, Off
Return

Enable:
Hotkey, RButton, On
Return

Exit:
ExitApp
Return

Hotkey, RButton, On
Return

RButton::
Menu, Menu1, Show
Return

RunEditor:
Run, Notepad.exe
Return

RunExplorer:
Run, Explorer.exe
Return
 
KeyAltTab:
Send, !{Tab}
Return



Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Blackholyman, Cerberus, Google [Bot], LazyMan, poserpro and 79 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group