Jump to content

Recommended Posts

Posted

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

Posted (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 by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted

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...
Posted (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 by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted

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
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

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.
Posted (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 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
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...