Jump to content

gamepin126

Active Members
  • Posts

    251
  • Joined

  • Last visited

gamepin126's Achievements

Universalist

Universalist (6/7)

0

Reputation

  1. I use this frequently to prevent a scheduled task from running more than once. You should be able to easily change this around to test multiple strings. Func multiProtect($sProc) ; prevents multiple instances Local $list = ProcessList(), $c = 0 For $i = 1 To $list[0][0] If StringRegExp($list[$i][0], $sProc) Then $c += 1 If $c > 1 Then Exit Next EndFunc ;==>multiProtect
  2. Hmm, so then are you using Expresso? It's the only other editor I know of. That's also really unfortunate to hear. I use EditPad Pro as my main text editor, it's so handy!
  3. Awesome, I'm still new to regex. Thanks again!
  4. That did it, thanks. And thanks for the quick responses. However, it's also returning the correct match, and ".45" in the next element which is a little annoying, but workable.
  5. Ah, I guess I did. But that's not the issue. I'll fix that in the post but those are just test words.
  6. The relevant code's quite large, but this is the primary issue I'm having. I'm using RegexBuddy to test my patterns, and it has no issue returning the value I want. Test string : "value 795.45 23.57% 64.28" Pattern : "^value\s{2,}\d+(\.\d+)?" Both without quotes, of course. $input = InputBox("input", "") $pattern = InputBox("pattern", "") $array = StringRegExp($input, $pattern, 1) If @error = 0 Then $nOffset = @extended Else ExitLoop EndIf for $i = 0 to UBound($array) - 1 msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i]) Next Now, that pattern should return "value 795.45" however, it only returns ".45". Is this intended, or an alternate method of getting the string I want? I've had this issue every time I've used optional groups. It's the only thing that gets returned.
  7. Using this code, and if you start pressing buttons fast enough it starts acting really weirdly. I was playing a game and got disconnected because of spamming (not intended). It started started acting as if I held the button down permanently, I wasn't. Then it'd start sending things I didn't want to be sent. #include <misc.au3> Dim $i[3] = ["2", "1", "0"] $dll = DllOpen("user32.dll") $c = 0 While 1 If _IsPressed("62", $dll) Then ;numpad 2 $c = 2 ElseIf _IsPressed("65", $dll) Then ; numpad 5 $c = 1 ElseIf _IsPressed("68", $dll) Then ; numpad 8 $c = 0 Else $c = -1 EndIf If $c > -1 Then Send("{ENTER}") Sleep(50) Send("Sending # " & $i[$c]) Sleep(50) Send("{ENTER}") Sleep(100) $c = -1 EndIf Sleep(100) WEnd The output if you hit the keys fast... 8885 Sending 1 1282 5Sending 0#include <misc.au3> Dim $i[3] = ["2", "1", "0"] $dll = DllOpen("user32.dll") $active = 1 $c = 0 While 1 If $active Then If _IsPressed("62", $dll) Then $c = 2 ElseIf _IsPressed("65", $dll) Then $c = 1 ElseIf _IsPressed("68", $dll) Then $c = 0 Else $c = -1 EndIf If $c > -1 Then Send("{ENTER}") Sleep(50) Send("Sending # " & $i[$c]) Sleep(50) Send("{ENTER}") Sleep(100) $c = -1 EndIf EndIf Sleep(100) WEnd 2 5 2Sending 1852 58285 It varies, sometimes it'll just sit there and spam endlessly, other times it'll just say like "Sleep(50)" and continue doing what it's doing, or spit out my whole script. Is this a known issue, when I searched it didn't come up with anything like this.
  8. I know, I was just answering his question.
  9. Yea, you can just drag n drop them into the fonts folder to install them.
  10. Couldn't you just do For $n = 1 to 2 Download("http://www.dafont.com/top.php?page=" & $n & "&nb_ppp=50") Next ? Very nice script by the way
  11. you can remove it in koda, go to the styles tab
  12. I used SciteConfig to change the colors for everything, and I was wondering where they're stored.
  13. Where are the style settings saved for Scite?
  14. $str = "" For $i = 1 to 10000 $str &= "DDS|" & $i FileWrite("Word.txt", $str) Next fixed it The @CRLF isn't necessary cuz it'll make a new line for every invokation of filewriteline.
×
×
  • Create New...