Function Posted November 21, 2007 Share Posted November 21, 2007 Hello, I've been working on a simple script that replaces the right click menu on the tray icon to something more favorable than the plain old Pause / Exit. I've gotten this far, but now I'm stuck. I don't know how to replicate the Pause function and how to implement a Reload function. Also, how does one run the help file directly? Any ideas?expandcollapse popup#include <Constants.au3> Opt("WinTitleMatchMode",2) Opt("SendKeyDelay", 0) Opt("SendKeyDownDelay", 0) Opt("TrayMenuMode",1) $help = TrayCreateItem("&Help") $seperator1 = TrayCreateItem("") $windowspy = TrayCreateItem("&Window Spy") $reload = TrayCreateItem("&Reload This Script") $edit = TrayCreateItem("&Edit This Script") $seperator2 = TrayCreateItem("") $pause = TrayCreateItem("&Pause Script") $exit = TrayCreateItem("E&xit") TraySetState() ;SCRIPT BODY While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $help Run ("C:\Program Files\AutoIt3\AutoIt3.chm");@ScriptDir & "\AutoIt3.chm" can't be called directly it seems Case $msg = $windowspy Run (@ScriptDir & "\Au3Info.exe") Case $msg = $reload Sleep(100) Case $msg = $edit Run ("notepad.exe " & @ScriptFullPath) Case $msg = $pause Sleep(100) Case $msg = $exit ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
Kryptonite Posted November 21, 2007 Share Posted November 21, 2007 (edited) For the helpfile thing, in the Autoit3 directory, there is a file called "Autoit3Help.exe" or something to that effect. It is basically a launcher for the helpfile, and can be called through Run() EDIT: And for the pause: Global $paused = false While 1 If $paused then Do Sleep(200) Until not $paused EndIf ;Your whole select statement... Case $paused If $paused = False then $paused = true Else $paused = false EndIf ;... Your other code This wont work as it is, but you get my idea right? Edited November 21, 2007 by Kryptonite Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now