http://www.autohotkey.com/search/search.php
i try search exact phraze "bad symbols" & "illegal symbols" nothing.
many know exist bad\restricted symbols for windows file & folders same like:
Quote:
\, /, :, *, ", ?, |, <, >
i have problem with regExp WTF? Save Wintitle containg Restricted symbols to file and delete or (better replace Restricted symbols on Stricted Symbols)
Code:
;#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode 2
DetectHiddenWindows On
DetectHiddenText, On
#SingleInstance force
MsgBox F1%A_Tab%Set active title of explorer.exe with bad symbols `nF2%A_Tab%Get & save active win title name to scriptdir (Except BadSymbols) `nF3%A_Tab%Take it back original explorer title
GroupAdd winExp,ahk_class ExploreWClass
GroupAdd winExp,ahk_class CabinetWClass
;SET ACTIVE TITLE WITH BAD SYMBOLS (FOR TEST)
#IfWinActive ahk_group winExp
F1::
badSymbols = \,/, :, *, ?, ", <, >, | RESTRICTED SYMBOLS GETOUT!!!
WinSetTitle, A,, %badSymbols%
Return
;GET & SAVE ACTIVE WIN TITLE NAME TO SCRIPTDIR (Except BadSymbols)
#IfWinActive ahk_group winExp
F2::
WinGetTitle, AT, A
ControlGetText, path, Edit1, A
;HERE NEED CODE FOR REPLACING RESTRICTED SYMBOLS FROM VARIABLE "AT"
FileAppend, %AT%, %path%\%AT%.txt
Return
;TAKE IT BACK ORIGINAL EXPLORER TITLE
#IfWinActive ahk_group winExp
F3::
ControlGetText, path, Edit1, A
SplitPath, path, nam, dir, ext, nm, drive
WinSetTitle,A,, %nam%
Return
#IfWinActive
Esc::ExitApp
and i try that, same sh1t
Code:
#IfWinActive
F1::
;\/:*?"<>|
;StringReplace Title, outRep, %badsymb%, +, All
;StringReplace, clipboard, clipboard, \/ : * ? " < > |, , All
ta = E:\1prog\*Gr?aph\!Screen Capture\`Console\Capturemation
Loop
{
StringReplace, fk, ta, /, =,+ UseErrorLevel
if ErrorLevel = 0 ; No more replacements needed.
MsgBox %fk% `n%ta%
Break
}
badsymb = \,/, :, *, ?, ", <, >, | NeedAnyLegalSymbolsCozOtherwiseNotSavingToFile
Loop, parse, badsymb, `,
;MsgBox %A_LoopField%
StringReplace, t, ta, %A_LoopField%, =, All
MsgBox %ta%
Return
#IfWinActive
Esc::ExitApp
i try use RegExp i have problem
Code:
Line Text: RegExReplace(tit, "\\|\/|\:|\*|\?|\||\<|\>|\"", " ")
Error: Missing ")"
last symbol
Quote:
"
fck brain, help please
that my dream
