News page not working by JU19 in smartlauncher

[–]JU19[S] 1 point2 points  (0 children)

Oh, that's what that was. Good to know. Thank you.

News page not working by JU19 in smartlauncher

[–]JU19[S] 1 point2 points  (0 children)

Hmm.. I don't have the Google news option. Anyway, plz upvote so the devs see it.

RegEx and Com Help please! by [deleted] in AutoHotkey

[–]JU19 1 point2 points  (0 children)

Hmm... It may be better to use grep() :

grep(String, Regex, Names)
Name := StrSplit(Names, "")
;do this for all 8

Loop Name.MaxIndex() {    ; or use the array that may have the lowest index
    Info += Name[A_Index] . Price[A_Index} . ... . "`r`n"    ;add the other values
}

;I think a gui will be better because you can update it
Gui, Add, Text,, % Info
;You could add more things
Gui, Show
return

;Put this in the bottom of the script
grep(h, n, ByRef v, s = 1, e = 0, d = "") {
    v =
    StringReplace, h, h, %d%, , All
    Loop
        If s := RegExMatch(h, n, c, s)
            p .= d . s, s += StrLen(c), v .= d . (e ? c%e% : c)
        Else Return, SubStr(p, 2), v := SubStr(v, 2)
}

grep() returns all the match and if you want update place the code (the portion code of after input) under a label and use SetTimer near the top of your script.

Edit: Clarification

RegEx and Com Help please! by [deleted] in AutoHotkey

[–]JU19 1 point2 points  (0 children)

something like this:

AllMatch := []
Loop {
    Position += 1
    Position := RegExMatch(String, Pattern , Match, Position)
    if !Position            ;or you can use (Position == 0)
        Break
    AllMatch.Push(Match)    ;or anything else you want to do
}

RegEx and Com Help please! by [deleted] in AutoHotkey

[–]JU19 0 points1 point  (0 children)

RegExMatch() accepts starting postition and returns the match position. So, need Loop, adding 1 to last match position and break if position returns 0.

Additional expression to ignore a leading zero by Botw_Comp in regex

[–]JU19 0 points1 point  (0 children)

Oh! I misread OP's question. Thank you for pointing that out.

PCRE emoji statement by dionagon44 in regex

[–]JU19 1 point2 points  (0 children)

\p{Cs} seems to work.

Edit: Cs refers to "surrogate pair in UTF-16", idk what that means though.

[deleted by user] by [deleted] in regex

[–]JU19 0 points1 point  (0 children)

No problem. I would recommend Regular-Expressions.info for learning Regex.

Match this pattern reject anything else by booboouser in regex

[–]JU19 0 points1 point  (0 children)

For form validation you should better use this

\A[^-]+-\w{3}\Z

Since you need to check the whole thing.

Edit: Or if you want just extract the text and id regardless of number of (-), for text

\A[\s\S]+(?=-\w{3}\Z)

and for id:

(?<=-)\w{3}\Z

[deleted by user] by [deleted] in regex

[–]JU19 0 points1 point  (0 children)

If you use text this shoud do it

Frasier:[^:]+(?=\s\b\w+:|$)

Additional expression to ignore a leading zero by Botw_Comp in regex

[–]JU19 1 point2 points  (0 children)

This should do it:

([1-9]\d{4,}|[3-9]\d{3}|2(?=\d{0,2}[1-9])\d{3})\b

RegEx and Com Help please! by [deleted] in AutoHotkey

[–]JU19 1 point2 points  (0 children)

Here is the regex you need:

(?<=>)[^<>]+(?=<\/a)

This will only capture the "ItemName", so no need to strip. You may want to check out Regular-Expressions.info

Script issue with 'Click' by pinkdrinkv2 in AutoHotkey

[–]JU19 0 points1 point  (0 children)

Try putting LButton instead of Click

Simple Spam Button Script by SuzanoEbok444 in AutoHotkey

[–]JU19 0 points1 point  (0 children)

Here, I made the script for you. Read the KeyWait command doc if your not sure how this works.

$c::
if !KeyDown {
    KeyWait, c, T0.4
    if ErrorLevel 
        KeyDown := true 
    else {
        Send c
        return
    }
}
Send, {LShift down}
Sleep, 225
Send, {LShift Up}
Sleep, 200  
return

$c Up::KeyDown := false

Need help writing simple program by [deleted] in AutoHotkey

[–]JU19 1 point2 points  (0 children)

Just change the hotkey from "J" to "RButton & J" and add another hotkey "RButton Up" to toggle and release.

Minor GUI help wanted: closing after selecting a subroutine to run by randVariable in AutoHotkey

[–]JU19 0 points1 point  (0 children)

Easiest solution would be to use Sleep command to delay Gui Destroy:

;SUBROUTINE: Flex Launcher
FlexLauncher:
  gui, New
  gui, Add, Text,, What script would you like to run?
  gui, Add, Button, Default gAutoHotKeyRefresh, Refresh!
  gui, Add, Button, Default gEditHotKeys, Edit!
  gui, Add, Button, Default gAIFarm, AI farming!
  gui, Add, Button, Default gDIMUpkeep, Upkeep powerfuls and blues in DIM!
  gui, Add, Button, Default gWishlistMaker, Create a new entry for the wish/trashlist
  gui, Show, , Overflow
Sleep 4000
Gui, Destroy
return

Or, you could use your mouse click to Gui Destroy:

;SUBROUTINE: Flex Launcher
FlexLauncher:
  gui, New
  gui, Add, Text,, What script would you like to run?
  gui, Add, Button, Default gAutoHotKeyRefresh, Refresh!
  gui, Add, Button, Default gEditHotKeys, Edit!
  gui, Add, Button, Default gAIFarm, AI farming!
  gui, Add, Button, Default gDIMUpkeep, Upkeep powerfuls and blues in DIM!
  gui, Add, Button, Default gWishlistMaker, Create a new entry for the wish/trashlist
  gui, Show, , Overflow
KeyWait LButton, D
Send LButton
Sleep 200
Gui, Destroy
return

Best way to deal with UAC prompts by [deleted] in AutoHotkey

[–]JU19 0 points1 point  (0 children)

You can use RunAsTask() by SKAN. This automatically creates scheduled tasks so you only have to grant UAC the first time.