| View previous topic :: View next topic |
| Author |
Message |
MicahR
Joined: 14 Aug 2008 Posts: 3
|
Posted: Thu Aug 14, 2008 1:02 am Post subject: Script Error - Autohotkey wont start - HELP |
|
|
Hey guys started Autohotkey then right clicked the icon on bottom right of screen, went to Edit this script - i was putting in hotkeys so i can control 2 versions of World of warcraft at same time - i tried to put in shift+c - which apparently does not work -
now when i try and start autohotkey it says
Note" The hotkey~shift+c:: will not be active because it does not exist in the current layout
Then it says: Error invalid key or button name, specifically: shift+c, then shows some lines of code and says at botton "The program will exit"
Problem is the icon never appears at bottom of screen cause of this issue - so i cant right click and remove the shift+c - how do i get in so i can fix this ????
email is micahron@gmail.com[/b] |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1496
|
|
| Back to top |
|
 |
MicahR
Joined: 14 Aug 2008 Posts: 3
|
Posted: Thu Aug 14, 2008 1:49 am Post subject: |
|
|
Quick start tutorial
To create a new script:
Open Windows Explorer and navigate to a folder of your choice.
Pull down the File menu and choose New >> AutoHotkey Script (or Text Document).
Type a name for the file, ensuring that it ends in .ahk. For example: Test.ahk
Right-click the file and choose Edit Script.
On a new blank line, type the following:
#space::Run www.google.com
The symbol # stands for the Windows key, so #space means holding down the Windows key then pressing the spacebar to activate a hotkey. The :: means that the subsequent command should be executed whenever this hotkey is pressed, in this case to go to the Google web site. To try out this script, continue as follows:
Save and close the file.
In Windows Explorer, double-click the script to launch it. A new tray icon appears.
Hold down the Windows key and press the spacebar. A web page opens in the default browser.
To exit or edit the script, right click its tray icon.
Im already stuck at line 1:
Open Windows Explorer and navigate to a folder of your choice.
Pull down the File menu and choose New >> AutoHotkey Script (or Text Document).
Windows explorer? i have an internet explorer ... um what the hell is a windows explorer ... after readin this i dont think this is my answer - im talking about eddting the script that autoloads when i start AutoHotKey. I get an error cause of the script and it wont load cuase of it - but since it wont load i cant edit that script .. what to do here ??? im screwed - i even deleted program and installed it again - that script is loaded in already |
|
| Back to top |
|
 |
ribbs2521
Joined: 28 Sep 2007 Posts: 103 Location: New York
|
Posted: Thu Aug 14, 2008 2:11 am Post subject: |
|
|
| Welcome the the forum.... I would like to help you but I'm not quite sure what the issue is that you are having. Could you include the code so we can see it. I have found that a lot of times, if you don't include code, people are less likely to help because we can't really see what your issue is first hand. If you post it than others can run the script and see what your issue is and better depict what the problem is. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Aug 14, 2008 2:19 am Post subject: |
|
|
| MicahR wrote: | | im talking about eddting the script that autoloads when i start AutoHotKey. |
It is another one of these...
...I REALLY want the default install of AutoHotkey to do something else...I could even write the 1st start script...& NOBODY would be confused on this issue again...running AutoHotkey from the Start Menu needs to NOT do this, the 1st time it asks them if they wanna edit the script, they say yes, make a script, then later they click Edit This Script on the tray icon...THEN they make a TYPO & can't fix it...re-install, nope, that didn't fix it either...all because they can't find the "default script"...I want to provide a default script that actually guides users thru saving a script where they can find it & also my script would give them a way to edit their errant script...(clicking Start -> Programs -> AutoHotkey -> AutoHotkey would run my "helper" script & not their syntax error'd script)...if it's not clear, I am offering to write this...but only if it's included in the default install...even a stub script that could download my full/updated helper script... |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1145 Location: The Interwebs
|
Posted: Thu Aug 14, 2008 3:12 am Post subject: Re: Script Error - Autohotkey wont start - HELP |
|
|
Guys. None of you are answering his question:
| MicahR wrote: | | how do i get in so i can fix this ???? |
Just right click on the script, and one of the options should be "Edit". Click that. Or open it with a text editor such as Notepad. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Aug 14, 2008 4:19 am Post subject: Re: Script Error - Autohotkey wont start - HELP |
|
|
| Krogdor wrote: | | Guys. None of you are answering his question: |
...yes I did...he has been running AutoHotkey from the Start Menu...so he doesn't know where the default script is to edit it...my Solution link mentions Notepad...to REALLY drive it home...
To Edit the Default AutoHotkey Script...
- Click Start -> Notepad (if you've pinned it...or Start -> Programs -> Accessories -> Notepad {right click & select Pin to Start Menu})
- In Notepad, click File -> Open
- Click My Documents in the left side of the dialog
- Find AutoHotkey.ahk or AutoHotkey.ini
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Thu Aug 14, 2008 5:12 am Post subject: |
|
|
JS, can I lift the list of links you posted and put it in my help thread? It's well collected. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1145 Location: The Interwebs
|
Posted: Thu Aug 14, 2008 5:22 am Post subject: Re: Script Error - Autohotkey wont start - HELP |
|
|
| Anonymous wrote: | | Krogdor wrote: | | Guys. None of you are answering his question: |
...yes I did...he has been running AutoHotkey from the Start Menu...so he doesn't know where the default script is to edit it...my Solution link mentions Notepad...to REALLY drive it home...
[list]To Edit the Default AutoHotkey Script... |
Whoops  |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Aug 14, 2008 7:19 am Post subject: |
|
|
| engunneer wrote: | | JS, can I lift the list of links you posted and put it in my help thread? It's well collected. |
...yes but only if they remain purple linked...hehehe...I love the look of my purple links...(you can click quote to be able to copy the list already purple linked, just remove the excess {caused by clicking quote} & copy/paste to your thread)...you could also add both help descriptions from the Solution link & the new steps I posted here (above) & now here, in this post!...
Also I haven't re-installed AutoHotkey in a while, so where exactly is the default script created?...(in which versions did it change?)...is it My Documents -> AutoHotkey.ahk (or .ini) or My Documents -> AutoHotkey\AutoHotkey.ahk (or .ini)...
| MicahR wrote: | | Windows explorer? i have an internet explorer... |
...1st of all "Windows Explorer" is...
Start -> Programs -> Accessories -> Windows Explorer
(plus about 100 other ways to open it!) ...2nd "Internet Explorer" is the single most insecure browser (browser means "internet viewing thingy"...the thing you use to view AutoHotkey.com & other websites)...you really should install...
...but that is not gonna fix your issue with AutoHotkey, it's just a generally good idea...
Those instructions on the tutorial should just say My Computer (not Windows Explorer) or something else (like My Documents)...& it should tell you how to get there, like I do...
To create a new AutoHotkey (.ahk) Script...
- Open My Documents (or any folder on your computer where you want to store your scripts)
Click Start -> My Documents - Click File -> New -> AutoHotkey Script
...if "AutoHotkey Script" is not in the list you need to install or re-install AutoHotkey...or pick "Text Document"... - Type a name...make sure it ends with .ahk (dot ahk)...
By default Window's Hides extensions for known file types, you should absolutely turn this off...
- Start -> Control Panel -> Tools -> Folder Options... -> View
- Uncheck "Hide extensions for known file types"
- Click OK -> Close Control Panel
- Press Enter or click off the icon to accept the new name
- Right click the new icon, click Edit Script
...if "Edit Script" is not in the list, you need to install or re-install AutoHotkey...or the extension on the file is not ".ahk"... ...something like that, clear...
Also...as I mentioned above, what happens when people go Start -> Programs -> AutoHotkey -> AutoHotkey...needs to change...that needs to be a "script manager"...listing all the users scripts (default saved in My Documents -> AutoHotkey)...& allowing common options, like click a script in the list & check "Run this script on startup"...people ALWAYS need to edit their scripts & alot wanna know how to "make it run everytime I start my computer"...I am volunteering to write this "script manager"... |
|
| Back to top |
|
 |
MicahR
Joined: 14 Aug 2008 Posts: 3
|
Posted: Thu Aug 14, 2008 11:24 am Post subject: |
|
|
Thanks so much for the information guys. Seems like this must happen all the time to newcomers. A shame that endless forum trolling last night could not find the answer. The last reply looks like what I need. I just hope that after creating this new script, that when I restart it will not load the old messed up script. Cause I have a feeling that might happen. Only because while trying to find the default script in the various folders in autohotkey I found a random script and double clicking it put it into my lower-right-screen tray. Right clicking allowed me to edit the script and it worked with both World of Warcraft games running.
But when I reloaded autohotkey it went back to the broken default script again. I'm at work now so I can't test out until I get home but I will post my results later. Thanks for the information guys . Really appreciated |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Aug 14, 2008 12:19 pm Post subject: |
|
|
| MicahR wrote: | | I just hope that after creating this new script, that when I restart it will not load the old messed up script. |
...restart in what way? The computer? Is a link to AutoHotkey.exe in your startup? Then yes restarting will load the messed up default script...but you just need to scour your hard drive...then edit it so it's not messed up any more...
| MicahR wrote: | | ...I found a random script and double clicking it put it into my lower-right-screen tray. |
...you probably shouldn't double click random scripts, just right click them & click Edit Script...read what it is, then double click it, if you wanna run it...if you find the "messed up default script"...edit those lines with the problem, save, then it will be a "fixed default script"...you don't need to just start from scratch with a new script to avoid the messed up default one...
| MicahR wrote: | | But when I reloaded autohotkey it went back to the broken default script again. |
...reloaded how? Right clicking the "random scripts" tray icon & clicking reload?...that should only reload that "random script"...
I'm not sure this is a good idea, but if you haven't found that default script yet...do this...
Start -> Programs -> Accessories -> Command Prompt
Then type...
| Code: | cd\
dir/s/b/a *ah? *AutoHotkey*.ini | ...that will probably take a while, but will list EVERY file ending with .ah? (question mark means .ahk .ahi & any last char)...& also any AutoHotkey.ini files...if you do run that, you might wanna paste the results here, so we can point out the default script...so to catch the output to a file, run this (type it into a Command Prompt)...
| Code: | cd\
dir/s/b/a *ah? *AutoHotkey*.ini >%temp%\dir-ahk-tmp.txt
notepad %temp%\dir-ahk-tmp.txt |
...that will perform the search & dump it in a file & the next command opens notepad with that file...also note cd\ is important to get to the root of the drive for a full search... |
|
| Back to top |
|
 |
terrdil Guest
|
Posted: Thu Sep 11, 2008 11:54 pm Post subject: hotkey load error |
|
|
I also had this problem and agree it should not be allowed to happen. The error message ought to dump you right back into the edit mode so something can be done about it rather than taking two hours to find the right posting.
As the final feedback was not posted I wanted to wrap this up with a easy workable solution that was touched on at the end of the postings. Uninstall AutoHotKey - Empty any copies in the recycle bin - Do a search on .ahk including hidden files - erase any file that shows up - reinstall AutoHotKey. I know this is a sloppy solution but I do not want to spend the time to determine exactly where the critical problem file was. |
|
| Back to top |
|
 |
|