Selecione o texto até o caractere encontrado [duplicado]

1

Gostaria de saber como posso selecionar um texto como

+^{Left} 

até que um caractere específico ("-" neste caso) seja encontrado.

Obrigado pela sua ajuda.

    
por colonel_claypoo 20.02.2015 / 14:00

1 resposta

1

F1::
ClipSaved := ClipboardAll  ; save clipboard
Loop
{
    If GetKeyState("F2","P")  ; terminate the loop whenever you want by pressing F2
        break    
    clipboard =           ; empty the clipboard (start off empty to allow ClipWait to detect when the text has arrived)
    ; Send, +^{Left}      ; select text by whole words to the left
    Send, +{Left}         ; select text by single characters to the left
    Send, ^c              ; copy selected text
    ClipWait              ; wait until the clipboard contains data
    StringLeft, OutputVar, clipboard, 1  ; save the first character from the left side of the clipboard in the variable OutputVar
    If OutputVar = -      ; if the specific character "-" has been found
        break             ; terminate the loop
}
clipboard := ClipSaved    ;restore original clipboard
return

link

    
por 20.02.2015 / 19:30

Tags