Search found 302 matches

by Nightwolf85
19 Mar 2017, 20:07
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

That makes sense, and I appreciate the feedback and clarification. I'll work on putting in the comments so it is easier for other people to understand, and modify. To start this isn't a complete parser, but this is the big RegEx string split into Function, Label, and Hotkey parts. It isn't everythin...
by Nightwolf85
19 Mar 2017, 12:48
Forum: Ask for Help (v1)
Topic: Remapping Middle click to Alt + Middle click on certain website
Replies: 6
Views: 1470

Re: Remapping Middle click to Alt + Middle click on certain website

Hello, I'm not sure if that is your exact code for this portion, but the #Include needs to have the file that contains the function, so I'll assume you have that right as it doesn't run as is. As far as I am aware you can't have more than on #IF active at a time, so your second use of it overwrites ...
by Nightwolf85
19 Mar 2017, 06:24
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

ludamo, My main goal was for my parser to pull out functions, hotkeys, and labels. However, I didn't want it to just work for code that I write, but for any code that I get from others online. If your solution works for you that is great, but it places too many formatting restrictions on the code fo...
by Nightwolf85
18 Mar 2017, 20:35
Forum: Ask for Help (v1)
Topic: Removing all leading numbers in strings
Replies: 6
Views: 1924

Re: Removing all leading numbers in strings

To cover the case wolf_II brings up 3.6 7UP Bank that doesn't match correctly in my first code, you could use this RegexReplace instead: RegexReplace(A_Loopfield, "^[0-9. ]+(?=\b)") All I did was replace the \w with a \b and that matches correctly in most cases I believe. Unless if it was 7 Up it wo...
by Nightwolf85
18 Mar 2017, 17:46
Forum: Ask for Help (v1)
Topic: Removing all leading numbers in strings
Replies: 6
Views: 1924

Re: Removing all leading numbers in strings

I would read the file, then go through one line at a time and use RegexReplace to remove any numbers from the beginning of the line. Something like: newLines := "" Loop, Read, InputFile ; Read in the file one line at a time. newLines .= RegexReplace(A_Loopfield, "^[0-9. ]+(?=\w)") . "`n" ; This Rege...
by Nightwolf85
18 Mar 2017, 11:25
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

Ah, yeah that is a unique setup from mine, glad you got it sorted out.
by Nightwolf85
18 Mar 2017, 09:42
Forum: Ask for Help (v1)
Topic: Does not work "sleep" and "toggle on/off script" Topic is solved
Replies: 11
Views: 2696

Re: Does not work "sleep" and "toggle on/off script" Topic is solved

Great I'm glad its working, and yeah my bad. That zero was put there from me hitting NumPad0 while testing, and since I don't have that window I didn't notice.
by Nightwolf85
18 Mar 2017, 07:41
Forum: Ask for Help (v1)
Topic: How do you delay the launch of a program when executed?
Replies: 2
Views: 1507

Re: How do you delay the launch of a program when executed?

You could make a script to launch the first program, then sleep and then run adobe to open the PDF. On your computer if set your script to be the default program for opening PDFs it should work. You may need to compile it for that work, I don't know, but it does make it a lot simpler if you do. Just...
by Nightwolf85
18 Mar 2017, 06:45
Forum: Ask for Help (v1)
Topic: Does not work "sleep" and "toggle on/off script" Topic is solved
Replies: 11
Views: 2696

Re: Does not work "sleep" and "toggle on/off script" Topic is solved

Yeah that is because there is no way to interrupt the sleeps that are going on. If this is the only code in your script you could do: x := (A_ScreenWidth // 2) y := (A_ScreenHeight // 2) toggle := False Numpad0:: Toggle := !Toggle IF (Toggle) SetTimer, doLoop, 500 Else { Reload ; This will exit the ...
by Nightwolf85
18 Mar 2017, 06:08
Forum: Ask for Help (v1)
Topic: Does not work "sleep" and "toggle on/off script" Topic is solved
Replies: 11
Views: 2696

Re: Does not work "sleep" and "toggle on/off script" Topic is solved

XiCynx you are right, one of the great things about AutoHotkey is that there are many solutions to the same problem. I also should've commented and explained what each line was doing in my answer to help others learn why it works. Numpad0::SetTimer, doLoop, % ((toggle := !toggle) ? 500 : "Off") This...
by Nightwolf85
17 Mar 2017, 23:31
Forum: Ask for Help (v1)
Topic: Remap Capslock to F24
Replies: 1
Views: 975

Re: Remap Capslock to F24

Use Input level to accomplish what you want.
https://autohotkey.com/docs/commands/_InputLevel.htm

Code: Select all

#InputLevel 1
*CapsLock::F24
#InputLevel 0
F24 & a::tooltip, Hyper-%A_ThisHotkey%
by Nightwolf85
17 Mar 2017, 22:55
Forum: Ask for Help (v1)
Topic: Does not work "sleep" and "toggle on/off script" Topic is solved
Replies: 11
Views: 2696

Re: Does not work "sleep" and "toggle on/off script" Topic is solved

Your loop has no way of breaking, I'm not sure what you intend to do exactly, but it looks like this code should do what it looks like you are trying to do: x := (A_ScreenWidth // 2) y := (A_ScreenHeight // 2) toggle := False Numpad0::SetTimer, doLoop, % ((toggle := !toggle) ? 500 : "Off") doLoop: T...
by Nightwolf85
17 Mar 2017, 21:28
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

That is odd, did you make sure to follow the steps in the OP to enable the function list parser for AHK, I don't repost those steps, just my version of the parser itself. 2. In <associationMap> field add these lines: <association ext=".ahk" id="ahk_function"/> <association userDefinedLangName="Name"...
by Nightwolf85
17 Mar 2017, 21:04
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

For class properties, is the only real difference that they use a square bracket instead of regular parenthesis? If so then this should work, but please note I haven't extensively tested this to make sure it doesn't break any other matches ( But it really shouldn't ) <parser id="ahk_function" displa...
by Nightwolf85
15 Mar 2017, 13:48
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

Thank you, I'm pretty happy with the version we have now too. I'm sure we'll eventually find something it does wrong though. *EDIT* I couldn't help myself, this isn't finding anything new, but I don't think it stops finding anything, and it is more efficient. I'm not sure it matters cause it always ...
by Nightwolf85
13 Mar 2017, 20:19
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

You are correct, my mistake. I didn't think of there being a space or tab after the comment and new line before the bracket, which was a stupid assumption. Fixed: Removed, try version below This still has the potential to eat up other functions in certain cases like below, granted it is a syntax err...
by Nightwolf85
13 Mar 2017, 12:57
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

I've found out that if I update the 'commentExpr' to match AHK comments more accurately the work it took to fix the comment issue was not completely needed ( it was needed for class still apparently ). I see no benefit to using one fix over the other though, so I've put both in at the same time. The...
by Nightwolf85
13 Mar 2017, 11:05
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

mapa4, You're welcome. I really thought that last version worked, it seems to work for me without skipping now. Maybe you checked before I made the edits? http://i.imgur.com/8npM7uf.png Noesis, I think you are right it is annoying and I took your suggestion and used it in the parser, with a slight c...
by Nightwolf85
12 Mar 2017, 14:56
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

Hmm it works in NP++' Find' without that extra \s\t for me, since the previous .* before the new lines will eat spaces and tabs already, the problem comes when adding that RegEx to the functionlist parser, it seems to break the functionality. Look up to a previous post of mine where I explain it wit...
by Nightwolf85
11 Mar 2017, 19:34
Forum: Notepad++
Topic: Enable Function List in Notepad++ for AHK Scripts (with classes now)
Replies: 64
Views: 77939

Re: Enable Function List in Notepad++ for AHK Scripts (with classes now)

Those aren't pasting errors, the functionlist file is in XML format and I need to use " and < otherwise the XML will be messed up, but guest3456 is correct they should be switched to " and < when not in the XML file. The ? is important because (?<!) is negative lookbehind in RegEx; Which in the case...

Go to advanced search