[forum] Workaround category
#1
Posted 27 June 2012 - 07:54 AM
That way people could post and easily find small workarounds to issues with AHK.
For instance, someone on IRC couldn't figure out how to send a single tab to the
clipboard. I came up with something for him but it would be nice if I had a place to
post it up other that Support since most posts there are questions looking to get answered.
#2
Posted 27 June 2012 - 09:54 AM
#3
Posted 27 June 2012 - 12:21 PM
My issue with this is that there are a million workarounds for any (perceived) issue. What should happen in the event that an elegant solution is posted in response to a workaround?
-1, because I think it should just go in the support forum as a question, so better solutions can be found.
#4
Posted 27 June 2012 - 01:28 PM
i think it'd better have subcategory such as :
-------------------------
- Support
+ Hotkeys & Hotstrings
+ GUI
+ COM
+ Functions
+ Advanced Issues
+ Others
-----------------------
#5
Posted 27 June 2012 - 01:41 PM
#6
Posted 27 June 2012 - 01:59 PM
interesting thought. I'd like to see more +1/-1 votes here.
#7
Posted 27 June 2012 - 02:16 PM
I would vote that truly elegant solutions or work-arounds be placed in the tutorials forum.What should happen in the event that an elegant solution is posted in response to a workaround?
If a better solution is found, the post in the tutorials can be easily modified.-1, because I think it should just go in the support forum as a question, so better solutions can be found.
I like this idea, but users post in the wrong forum on regular basis already. This would only get worse as the number of forums increases.One solution is to not have posts in the support section, and force them to be in a subforum.
#8
Guests
Posted 27 June 2012 - 02:44 PM
Some moderators at other forums simply delete faqs, they either wait for an answer or post it themselves and say something like "this thread will be removed after 7 days or earlier if you confirm you've read it" or something similar.agreed that support has a ton of duplicate stuff. that's sort of how it goes.
It doesn't stop the faqs because there are always people too lazy or incompetent (don't know the keywords to use) to search but it does mean there is hardly any repetition. It also produces better search results, not 10 pages of search results with autoclickers/spamming a key threads but just one with a handful of results.
#9
Posted 27 June 2012 - 09:47 PM
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=1&t=88096">viewtopic.php?f=1&t=88096</a><!-- l -->
Oh, and my original idea for the subcategory was that any other solutions
would just be listed as comments under the original thread.
#10
Posted 28 June 2012 - 02:09 AM
#11
Posted 29 June 2012 - 03:46 AM
First let me say, with all that you have contributed to this site and your brilliant mind as a programer, I sincerely have the utmost respect for you. I will however have to disagree with you on this.
I made that post confident that what I was offering was a workaround to an issue not only in AHK but the documentation as well. What I was referring to when I asked for "a more direct way of doing this" was a more direct and simplified workaround as I knew that what should work does not.
As per doc- Var := expression
x := "literal string" ; [color=#FF0000]Same performance as x = literal string.[/color]As per doc- Variables and Expressions
Storing values in variables: To store a string or number in a variable, there are two methods: traditional and expression. The traditional method uses the equal sign operator (=) to assign unquoted literal strings or variables enclosed in percent signs. For example: MyString = This is a literal string. By contrast, the expression method uses the colon-equal operator (:=) to store numbers, quoted strings, and other types of expressions. [color=#FF0000]The following examples are functionally identical to the previous ones:[/color] MyString := "This is a literal string."These two basic doc examples alone would lead one to believe that if they opted to use the traditional method, clipboard = x`tx would result in xTABx Which it does. Logically one would assume then that x`t or `tx or even just `t would return the expected result. It does not.
Only when using the expression method does one actually get the expected, logical result. Why would a literal `t have to be represented using the expression method? It shouldn't as x`tx indicates. This shows one of two things. Either that the highlighted statements in the above doc examples are not entirely correct, or if they are, there is inconsistent behavior, ie bug in AHK. Most likely it is a combination of the two.
But what it all boils down to is that AHK is expected by the user to behave in a particular manor both logically and supported by the documentation in regards to a literal tab. And that does not appear to be the case.
Workaround - Oxford Dictionary
"A method for overcoming a problem or limitation in a program or system."
And in this case, I believe the documentation as well.
A tab can not consistently be sent to the clipboard (and possibly any variable) via `t (and it appears using any other syntax) using the standard method as the AHK documentation and logic leads one to believe.
By definition, would not only my solution but the other solution as well still be a workaround?
I am however starting to realize that a workaround subcategory may not work out. It would probably get bombarded with people posting workarounds who do not actually make an attempt to read the docs first.
#12
Posted 29 June 2012 - 07:50 AM
By default, any spaces or tabs at the beginning and end of Value are omitted from Var. To prevent this, use the methods described at AutoTrim Off.
Source: SetEnv
#13
Posted 29 June 2012 - 12:19 PM
This statement is more in line with my point/fear.I am however starting to realize that a workaround subcategory may not work out. It would probably get bombarded with people posting workarounds who do not actually make an attempt to read the docs first.
One of the side-effects of posting so much here is that I don't read the docs all the time, since i remember the main things that i need to help people. In this case, my mind immediately jumps to A_Tab, so I didn't read the Variables and Expressions page in the docs. I will admit my fault for not RTFM
If I had seen the topic in Support before it was answered, I would have directed you to A_Tab, which links to AutoTrim for more details. I feel Autotrim explains what is going on. <!-- m -->http://www.autohotke...ds/AutoTrim.htm<!-- m -->
Also, in AHK_L, Var = `t is explicitly allowed (this is a change from Basic)
Also, I thank that you think I am a brilliant programmer, but i have to deflect that to AHK's programmers. I don't use half the capabilities of AHK and the tools that Chris, Lex, and others have provided for us. I simply like attempting to help people with technical problems.
#14
Posted 29 June 2012 - 03:00 PM
However, AutoTrim still needs to be disabled at run-time.Also, in AHK_L, Var = `t is explicitly allowed (this is a change from Basic)
#15
Posted 30 June 2012 - 12:10 AM
Alas AutoTrim has finally raised it's head and slapped me in the face. ;p
I'm one of those who can't break past learning by need. AutoTrim has been one of those things that while scouring through docs would always get skipped over. Some day I'll learn if it doesn't sound relevant to the task, it probably is......
Lexikos I REALLY need to try out AHK_L one of these days. I am far from what anyone would even remotely call a programer or writer of amazing scripts. It just always assume AHK_L is beyond my scope of understanding or skill level.
I guess it shows my ignorance by asking this, but what is the purpose for having AutoTrim on by default? I mean if someone specifically writes a code with a leading or trailing space or tab, why would he want it automatically trimmed off? I'm not saying it shouldn't be. I'm just not certain why it would be.
Ahh, this is getting way off topic....




