'How to assign (file.txt) tu variable via Applescript

I need to select a .txt file that contains a list of urls and pass it to theFile variable. unfortunately it doesn't work, the system says it can't find the file.

on run

set theFile to ("Macintosh HD⁩:⁨Utenti⁩:enricosindico⁩:Scrivania:URL.txt⁩")

open theFile



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source