Syntax error in the Editor

The popular SciTE-based AutoHotkey Script Editor
User avatar
andy_BSZY
Posts: 67
Joined: 13 Sep 2023, 09:52

Syntax error in the Editor

27 Sep 2023, 03:08

I have a question regarding the correct display of syntax in the SciTE4AutoHotkey editor. In my code, I need to get rid of the quotes from the file path copied to the clipboard.

Code: Select all

A_Clipboard := '"C:\Users\Andy\Desktop\test.txt"'

FullFileName := Trim(A_Clipboard, '""')

MsgBox FullFileName

Image

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
Image

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

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 5 guests