| Author |
Message |
Topic: A_ParamCount - to retrieve the number of PASSED parameters |
animeaime
Replies: 16
Views: 4067
|
Forum: Wish List Posted: Mon Aug 03, 2009 9:15 pm Subject: A_ParamCount - to retrieve the number of PASSED parameters |
Huh, weird. Is that suppose to happen??
Also, would it cause confusion to overload the %0% variable? I love the idea, provided the 0 isn't suppose to wok in functions, but will it confuse those n ... |
Topic: A_ParamCount - to retrieve the number of PASSED parameters |
animeaime
Replies: 16
Views: 4067
|
Forum: Wish List Posted: Mon Aug 03, 2009 7:53 pm Subject: A_ParamCount - to retrieve the number of PASSED parameters |
| No, that wouldn't work, because what if you want to access the command-line arguments in a function? - you would want to know how many arguments there were, so you would check %0%. |
Topic: A_ParamCount - to retrieve the number of PASSED parameters |
animeaime
Replies: 16
Views: 4067
|
Forum: Wish List Posted: Sat Jul 04, 2009 9:47 pm Subject: A_ParamCount - to retrieve the number of PASSED parameters |
Can you distinguish between omitted parameters and ones, which happen to be their defaults?
From my testing, no (for non-ByRef parameters). For ByValue (non-ByRef) parameters, a copy of the variable ... |
Topic: Toggle key |
animeaime
Replies: 8
Views: 1814
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 8:36 pm Subject: Toggle key |
They are not identical, your code works only once. It lacks a pair of parentheses:
<alt::SendInput, % "{LAlt " ((X := !X) ? "Down" : "Up ... |
Topic: Using Long Integer Arithmetic Library |
animeaime
Replies: 6
Views: 519
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 8:31 am Subject: Using Long Integer Arithmetic Library |
No, this one's your fault . You used MP_set to copy a value - you need to use MP_cpy. BTW, I reorder the code a bit.
MP_Init()
MsgBox, % fib(5)
fib(nth) ;Determine ... |
Topic: Using Long Integer Arithmetic Library |
animeaime
Replies: 6
Views: 519
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 8:09 am Subject: Using Long Integer Arithmetic Library |
| No, your code is right on...as proof, change "len" to "len2" in your code. The problem is that "len" is a variable used in the library - check the source code. So, when ... |
Topic: Toggle key |
animeaime
Replies: 8
Views: 1814
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 7:40 am Subject: Toggle key |
How about this?
<alt::SendInput, % "{LAlt " (X := !X ? "Down" : "Up") "}"
Yes, they are identical. |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 6:52 am Subject: simple problem with RegExMatch() or InStr() |
You're welcome, glad to help. Hope you check out [url=http://www.regular-expressions.info/]the tutorial - it's an even bigger life saver than me . |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 6:43 am Subject: simple problem with RegExMatch() or InStr() |
| OK, I'm not sure if this simplification leads to false positives, but here's the new version. This version assumes that a price, "#.## "will follow every pic ID, and that the first number i ... |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 6:14 am Subject: simple problem with RegExMatch() or InStr() |
how about if i want to search all pic ID number which match its price 4.90 only??
Where is the price found in the input? Can you give an example? In other words, how can you tell the price for a pic ... |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 6:13 am Subject: simple problem with RegExMatch() or InStr() |
So, it does the job? Good.
Ok. here's the breakdown.
When working with regular expressions, you are looking for a pattern. By using this pattern, you find what you seek. So, from your examples ... |
Topic: Organizing a program--best practices question |
animeaime
Replies: 8
Views: 739
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 5:15 am Subject: Organizing a program--best practices question |
| What I do is for functions I'm going to use again, I put them in my [url=http://www.autohotkey.com/docs/Functions.htm#lib]library folder. This way, I don't have to manually include them, because they ... |
Topic: Using Long Integer Arithmetic Library |
animeaime
Replies: 6
Views: 519
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 5:04 am Subject: Using Long Integer Arithmetic Library |
| Check out the example function of factorial in [url=http://www.autohotkey.com/forum/viewtopic.php?p=271869]my post. |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 5:00 am Subject: simple problem with RegExMatch() or InStr() |
| OK, below is my initial attempt, please give feedback on what it does right and wrong, so I can adjust the code. Of course, you can adjust the code as you see fit. As testing, I copied the contents o ... |
Topic: simple problem with RegExMatch() or InStr() |
animeaime
Replies: 11
Views: 570
|
Forum: Ask for Help Posted: Sat Jul 04, 2009 4:45 am Subject: simple problem with RegExMatch() or InStr() |
Dumb question, but can you give a "snip" (i.e. example) of a pic ID? By using this example, you can extract the pattern.
For example, I think this is a pic ID, but I want to be sure.
&q ... |
| |