Illegal characters in a link?
Illegal characters in a link?
So I have no problems sending a link into a chat box on a specific site. If I go like Send, DuckDuckGo.com/.
But if the link itself is stored in an INI file and extracted into VarLink, AHK won't let me use this: Send, % VarLink
It spews out some illegal character error.
How do I solve this? How do I extract a link with illegal characters in it stored in a variable into a Send command?
But if the link itself is stored in an INI file and extracted into VarLink, AHK won't let me use this: Send, % VarLink
It spews out some illegal character error.
How do I solve this? How do I extract a link with illegal characters in it stored in a variable into a Send command?
Re: Illegal characters in a link?
You'll need to provide some specifics because what you described wouldn't normally be the case. Show the specific error that was displayed, the contents of the .ini file section, and the lines of your script that read that in and send it. It's obviously a lot more helpful to share the error and the actual text that caused it rather than describe it as "some illegal character error."
Actually it sounds more like the error was probably about an illegal character for a variable name. There aren't illegal characters for text that gets sent. I'm thinking your Send command isn't actually as you showed it but rather that you told it to send the contents of the variable name that is contained in your variable, such as this:
...and your link does contain characters that are not allowed for variable names. Showing your actual code should reveal the problem.
Actually it sounds more like the error was probably about an illegal character for a variable name. There aren't illegal characters for text that gets sent. I'm thinking your Send command isn't actually as you showed it but rather that you told it to send the contents of the variable name that is contained in your variable, such as this:
Code: Select all
Send, % %VarLink%
Re: Illegal characters in a link?
link probably contains %-encoded unicode chars
change the code to
change the code to
Code: Select all
Send % "{Text}" theVar
Re: Illegal characters in a link?
That would make sense. I was taking his link example DuckDuckGo.com/ at face value, and not his Send command.
Re: Illegal characters in a link?
I can't show you the code because it was an error that previously occurred so I had to do things differently. And no, it was not DDG.com. It was something else. I'll see if I can dig up a actual link when I get home to my lappy.
Re: Illegal characters in a link?
Okay. So I tried to make my error happen again to post it here. But I can't seem to make that error happen again. That be totally like me to only make errors and mistakes when not trying to make them.
But anyways, if I want Firefox to open a link stored in a variable, how do I do that? I was copying the content of the var into Firefox link field. But there's got to be a better way to do this.
But anyways, if I want Firefox to open a link stored in a variable, how do I do that? I was copying the content of the var into Firefox link field. But there's got to be a better way to do this.
Re: Illegal characters in a link?
Never mind. I figured it out.
Code: Select all
Var := "DucDuckGo.com"
Run, % Var