Code: Select all
A_Clipboard := '"C:\Users\Andy\Desktop\test.txt"'
FullFileName := Trim(A_Clipboard, '""')
MsgBox FullFileName
The code works correctly, the syntax in the editor is also correct because it displays without error.
I am also testing a second way of getting rid of the quotation marks from the path using the StrReplace option and here there is a error with the correctness of the code displayed in the editor (scren below). What is strange is that the code works correctly and yet displays an error in the editor
Code: Select all
A_Clipboard := '"C:\Users\Andy\Desktop\test.txt"'
FullFileName := StrReplace(A_Clipboard, '"')
MsgBox FullFileName
Can you tell me what the problem is? I have also tried this option but it does not work:
Code: Select all
A_Clipboard := '"C:\Users\Andy\Desktop\test.txt"'
FullFileName := StrReplace(A_Clipboard, '""')
MsgBox FullFileName