 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Invalid User Guest
|
Posted: Mon Feb 14, 2005 9:34 am Post subject: Coding Games |
|
|
I think a fun way to keep all the users that are active in tune could be a fun game. Something like code based puzzles like "Find What is wrong" could be fun, at least something for us (me) to do. Rewards could be updated versions 10 seconds before public realease... or somthing retarded or of the like, what ever, or maybe just a point system. Who knows. Puzzles could be working tests of code modified so they dont work like they should. I dont know. I just get bored sometimes and want somethign to do. Rules of the game could be...
The puzzle is presented.
the thread is locked for one weeks time
The User to post the most effective code wins, judged by the AHKs best...
And A new problem is posted.
of course if a user posts the code asking for help in any thread is disqualified.
OH dear bordom has hit hard.  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Feb 14, 2005 9:55 am Post subject: |
|
|
I would be more then happy I've you could teach me HowTo use [ASCIIDoc]
Another perfect thing would be to teach AHK's GUI (in case you're bored), with screenshots, of course!
Invalid User - The GUI (1)
| Code: | Gui, Add, Text,, Hello World !
Gui, Show |
|
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Mon Feb 14, 2005 10:09 am Post subject: |
|
|
How about this as a starting point:
A short guideline that might help with GUIs:
- Try to avoid Goto, use GoSub instead
- Try not to use AutoLabels for Buttons, use g-label (or sometimes just called Labels) instead
- Give every control that has to perform an action (when selected by the user) a g-label
- Give every control that you want to manipulate during run a variable (you can manipulate the control with GuiControl)
- Give each Label and variable a speaking name, e.g. ApplySettings, BuildGUI1MainWindow, ChkBackGround, EdtOptionsMainwindow
- Use SetTimer instead of Loops with Sleep to do task that repeat after a certain time.
- Seperate the code that creates the look of the GUI from the code that performs the action of that GUI (g-labels) by putting them into seperate subroutines.
- With multiple windows, include in every GUI and GuiControl command the Gui ID. Otherwise AHK might at times not know which window to work on.
[...]
- In any other question read and search the manual, all questions are mostly answered. Otherwise look for examples. And then ask for support in the forum.
_ _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Mon Feb 14, 2005 12:42 pm Post subject: |
|
|
| toralf wrote: | | - Try not to use AutoLabels for Buttons, use g-label (or sometimes just called Labels) instead | This might help maintainability for some scripts, but for simply ones, such as those having OK/Cancel/Clear, I think the auto-labels are okay.
| Quote: | | With multiple windows, include in every GUI and GuiControl command the Gui ID. Otherwise AHK might at times not know which window to work on. | I don't think that's necessary once you get comfortable about the ID rules, which are:
1) 1 is the default window for non-Gui threads.
2) Gui threads, such as ButtonOK, use their own window as their number, which makes it safe to omit the number from "Gui Submit" or "GuiControlGet".
3) You can use "Gui N:Default" to change the default gui ID for the current thread to N to avoid having to include N: in every line.
In general, I think tutorials should be heavy on examples because that seems the most effective way to learn syntax and concepts together.
Thanks. |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Mon Feb 14, 2005 7:13 pm Post subject: |
|
|
I too have started creating a Neophytes guide to AHK it am breaking it down into lesson and it covers everything to Guis to String processing. it should be in depth but easy to understand for a beginner _________________ my lame sig  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|