TehBeyond Posted January 6, 2007 Share Posted January 6, 2007 I have been working on a cool app to hide the active window with a single keypress and recall it later. However, when I try to execute my script, it says I did not define the variable. I have read and re-read, but fail to understand the problem. Any help on this would be appreciated. If you have any questions on my code and its lack of good documentation, post them and I will get back to you. Thanks. WHPleaseHelp.au3 I would have told you I have Alzheimer's, but I forgot.My Splendid-Tastic Blog Link to comment Share on other sites More sharing options...
FuryCell Posted January 6, 2007 Share Posted January 6, 2007 (edited) I noticed the way you called HotKeySet(). HotKeySet("{F5}",WinDo(0)) This is improper use of the HotKeySet() function. Also, due to the improper use of HotKeySet() the function gets called before $window is defined. Edited January 6, 2007 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Paulie Posted January 6, 2007 Share Posted January 6, 2007 I noticed the way you called hotkeyset. HotKeySet("{F5}",WinDo(0)) This is improper use of the hotkeyset function. Also, due to the improper use of hotkeyset the function gets called before $window is defined.I ran it once just to se what was up, and it ended up hiding the SciTe window, i had to restart the process... Link to comment Share on other sites More sharing options...
FuryCell Posted January 6, 2007 Share Posted January 6, 2007 (edited) I ran it once just to se what was up, and it ended up hiding the SciTe window, i had to restart the process...I'm assuming that was after you fixed its errors as it will error out the way it was posted. Edited January 6, 2007 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Paulie Posted January 6, 2007 Share Posted January 6, 2007 I'm assuming that was after you fixed its errors as it will error out the way it was posted.yeah, i missed the hotkey error, i just moved the "$window[3]" to be dimmed in the function and got rid of the globals that he put in the function. Wasn't paying attention Link to comment Share on other sites More sharing options...
FuryCell Posted January 6, 2007 Share Posted January 6, 2007 yeah, i missed the hotkey error, i just moved the "$window[3]" to be dimmed in the function and got rid of the globals that he put in the function. Wasn't paying attention I see. It appears there is a lot of errors in his code. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
TehBeyond Posted January 6, 2007 Author Share Posted January 6, 2007 Okay, so remove the Global $window[3]. Then modify the HotKeySet so it works, how would I do that? I would have told you I have Alzheimer's, but I forgot.My Splendid-Tastic Blog Link to comment Share on other sites More sharing options...
BALA Posted January 6, 2007 Share Posted January 6, 2007 (edited) The correct syntax for the HotKey command is: HotKeySet ( "key" [, "function"] )oÝ÷ Ø ÞÅ©©ì(ºW[y«¢+Ù!½Ñ-åMÐ ÅÕ½ÐííÅôÅÕ½Ðì°ÅÕ½Ðí=¸ÅÕ½Ðì¤)Õ¹=¸ ¤(í¼Ý¡ÑÙÈ¡É)¹Õ¹ That will do whatever you want to happen, happen when you press the F1 key. For the variable, I suggest putting it as close to the top as you can, so you will avoid the "undeclared variable" bug Edited January 6, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
TehBeyond Posted January 6, 2007 Author Share Posted January 6, 2007 Oh, I see now. The problem was that you cannot set paramaters for a function called with HotKeySet! The stupid thing about this is that it specifically says that in the Help file, but I missed it. Thanks a ton for the catch. I would have told you I have Alzheimer's, but I forgot.My Splendid-Tastic Blog 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