Hina Posted April 18, 2009 Share Posted April 18, 2009 (edited) ;#""""" This is option which is used to hide the trayicone""""# OPt("TrayIconHide", 1) ; While loop is used because window was not changing start without using while loop; While 1 If Not FileExists(@DesktopDir&"\ciit.txt")Then ;.........:...:Get The Controll of a Window to Set Title:...:...:.......; ControlSetText("[Class:Shell_TrayWnd]", "", "[CLASS:Button; INSTANCE:1]", "MBA") ;.........;-;...:::Make the entries in Registry:::...;-;.......; RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Rename Start Button", "REG_SZ", @DesktopDir&"\Rename Start Button.exe") ;::Sleep in the code for a little rest to computer::... Sleep(5000) Else ;========= ========; ;!!! From this the code will be directly out if file is present @ desktop with name ciit & extension .txt !!! ;========= ========; MsgBox(16, "Error", "Cannot Run On Ur PC") Exit EndIf Sleep(5000) WEnd Also do find the mistake in this code if present. And If U have to write the same code how U write the same code?? Edited April 18, 2009 by COMSATS Link to comment Share on other sites More sharing options...
NBJ Posted April 18, 2009 Share Posted April 18, 2009 Hi Comsats a hot key can be set to call a function from the command HotKeySet ( "key" , "function" ) it can be placed in your script anywhere to set the hotkey to be active at that point in the script. It can be called HotKeySet ( "key" ) to disable the hotkey. Depending on what you want it to do and when you want it active depends on where and how you format it in your script. Hope that helps NBJ Link to comment Share on other sites More sharing options...
Hina Posted April 18, 2009 Author Share Posted April 18, 2009 Can u put the HotKeySet function in my above given code?? Link to comment Share on other sites More sharing options...
NBJ Posted April 18, 2009 Share Posted April 18, 2009 What do you want the hotkey to be? What do you want the hotkey to do? When do you want the hotkey to be active? When do you want the hotkey to be de-activated? Link to comment Share on other sites More sharing options...
Hina Posted April 18, 2009 Author Share Posted April 18, 2009 I want to exit my code with the help of HotKeySet option from loop Link to comment Share on other sites More sharing options...
NBJ Posted April 18, 2009 Share Posted April 18, 2009 I want to exit my code with the help of HotKeySet option from loop @COMSATS - what did you try? the HelpFile is quite detailed. ;#""""" This is option which is used to hide the trayicone""""# HotKeySet("{Esc}", "_EXIT") OPt("TrayIconHide", 1) ; While loop is used because window was not changing start without using while loop; While 1 If Not FileExists(@DesktopDir&"\ciit.txt")Then ;.........:...:Get The Controll of a Window to Set Title:...:...:.......; ControlSetText("[Class:Shell_TrayWnd]", "", "[CLASS:Button; INSTANCE:1]", "MBA") ;.........;-;...:::Make the entries in Registry:::...;-;.......; RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Rename Start Button", "REG_SZ", @DesktopDir&"\Rename Start Button.exe") ;::Sleep in the code for a little rest to computer::... Sleep(5000) Else ;========= ========; ;!!! From this the code will be directly out if file is present @ desktop with name ciit & extension .txt !!! ;========= ========; MsgBox(16, "Error", "Cannot Run On Ur PC") Exit EndIf Sleep(5000) WEnd Func _EXIT() Exit EndFunc Link to comment Share on other sites More sharing options...
Hina Posted April 18, 2009 Author Share Posted April 18, 2009 Problem now solved thx a lot brother NBJ Link to comment Share on other sites More sharing options...
NBJ Posted April 18, 2009 Share Posted April 18, 2009 no problem 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