| Author |
Message |
Forum: Support Topic: Count of substring occurences within a string. |
| Democratus |
|
Posted: March 31st, 2008, 9:08 pm
|
|
Replies: 3 Views: 492
|
| Is there an (easy) way to count the amount of times a substring is found within a string? For example, I want to obtain several links located on a website that all begin the same way but end differently, and I wish to locate the amount of times the pattern they all have in common appears in the HTML... |
|
 |
Forum: Support Topic: Question about 'if' and 'else' |
| Democratus |
|
Posted: March 31st, 2008, 2:37 am
|
|
Replies: 7 Views: 467
|
| "If %HealthBar% =0x562625" In If statements you do not need percent signs to declare a variable. EDIT: That is, in the initial declaration. For example, in this it would be: If HealthBar = 0x562625 But if you compare it to another variable you will need to apply percents: If HealthBar = %H... |
|
 |
Forum: Support Topic: Question about 'if' and 'else' |
| Democratus |
|
Posted: March 31st, 2008, 1:39 am
|
|
Replies: 7 Views: 467
|
| An If statement does not need a corresponding Else statement. You can just delete the Else. |
|
 |
Forum: Support Topic: First iteration only exclusive |
| Democratus |
|
Posted: March 31st, 2008, 12:11 am
|
|
Replies: 3 Views: 410
|
| That's the long way I was speaking of (suppose it's not so much long as inefficient, in this case). I suppose my request was just wishful thinking, but I really need it to be more efficient because this loop gets called a lot and has a lot of actions to discern between. I suppose it'll have to do fo... |
|
 |
Forum: Support Topic: First iteration only exclusive |
| Democratus |
|
Posted: March 30th, 2008, 7:50 pm
|
|
Replies: 3 Views: 410
|
| Sorry, I haven't searched very well for this topic, but I only have a few minutes so I hope you will forgive me if this topic has already come up. Does anyone know a very quick way to perform certain actions only on the first iteration of a loop and then perform a different set of actions on every o... |
|
 |
Forum: Support Topic: Extract numbers from a list in a text file? |
| Democratus |
|
Posted: March 30th, 2008, 4:53 am
|
|
Replies: 6 Views: 2449
|
| Because some of us aren't kings of efficiency. |
|
 |
Forum: Support Topic: Timer / Autherazation / Control Pixel Search? |
| Democratus |
|
Posted: March 30th, 2008, 4:28 am
|
|
Replies: 6 Views: 545
|
| Before answering any of those issues, there is one thing I should mention that kind of defeats all of this: Exe2ahk.exe. Anyone who has this file can decompile an executable and return it to its original ahk form (without the comments) and alter it any way they wish. For something legitimate and com... |
|
 |
Forum: Support Topic: How do you find the URL of the source of a page? |
| Democratus |
|
Posted: March 30th, 2008, 4:24 am
|
|
Replies: 4 Views: 539
|
| Not sure if I'm interpreting your meaning properly, but if you're looking for the code in web pages, just copy the URL and use: URLDownloadToFile, %URL%, %FilePath% After that, you can Loop, READ or whatever you want to isolate any coding within the page. Additionally, if you have Firefox you can do... |
|
 |
Forum: Support Topic: Extract numbers from a list in a text file? |
| Democratus |
|
Posted: March 30th, 2008, 3:53 am
|
|
Replies: 6 Views: 2449
|
| This code will read each line in a text file, parse that line by spaces, and apply the first parsed value to an array. You may then call the array variables as you like, or parse through them again simply by using the parsing command (see below) without including the delimiters. ListDir = %A_ScriptD... |
|
 |
Forum: Support Topic: Macro |
| Democratus |
|
Posted: March 27th, 2008, 4:45 am
|
|
Replies: 11 Views: 570
|
| I don't really see how those would do anything seeing as how the problems are located within the game. Unfortunately, the only alternative to just redoing the macro would be to make a command that would pause the macro mid-routine then continue it once the trade is over. |
|
 |
Forum: Support Topic: GUI List help |
| Democratus |
|
Posted: March 25th, 2008, 5:50 am
|
|
Replies: 1 Views: 423
|
| When the Gui Submit command is used, the control's associated output variable (if any) receives the text of the currently selected item. However, if the control has the AltSubmit property, the output variable instead receives the item's position number (the first item is 1, the second is 2, etc.). ... |
|
 |
Forum: Support Topic: What's the Best Way to Toggle a Logical Value Variable? |
| Democratus |
|
Posted: March 24th, 2008, 11:18 pm
|
|
Replies: 7 Views: 707
|
| This is not entirely relevant, but I just wanted to let you guys know (since I use this method a ton) that you can utilize HugoV's method very well in ternary operators. Here's an example I have in a script of mine: LV_ModifyCol(A_EventInfo, (1 = (B_CellState%A_EventInfo% := !B_CellState... |
|
 |
Forum: Support Topic: Welcome Screen when returning from DLL-initiated Standby |
| Democratus |
|
Posted: March 23rd, 2008, 11:02 pm
|
|
Replies: 3 Views: 1004
|
| You could attempt to use a work-around, such as closing progman window and sending enter (since it defaults to sleep on the shutdown dialog). That, or you could create a custom blocking macro that you have sleep once you call the DLL and then have it pop up when they get back, only allowing control ... |
|
 |
Forum: Support Topic: Compatible audio types with MCI |
| Democratus |
|
Posted: March 17th, 2008, 7:27 pm
|
|
Replies: 1 Views: 421
|
| Simply as the title states, does anyone know all of the audio formats supported by MCI or where I could look them up (I've checked MSDN and found nothing)? |
|
 |
Forum: Support Topic: Adding Search Function to a List |
| Democratus |
|
Posted: March 12th, 2008, 11:40 pm
|
|
Replies: 9 Views: 1345
|
| Here's a very very simple working example. Just make sure there's a text file named "Test" in the same directory as the script and add some lines of text to it. GUI, Add, Edit, gInput vInput GUI, Add, ListBox, vListBox, Enter text to search... GUI, show Return Input: GUIControl,, ListBox, ... |
|
 |
| Sort by: |