Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
macroman
- Pro Scripter
- Posts: 91
- Joined: Mon Jun 02, 2014 5:32 am
Post
by macroman » Thu Dec 01, 2016 2:56 pm
Hello all, I'm trying to execute this via httprequest but it's not working... how do I make this work?
Code: Select all
HTTPRequest>https://dummyimage.com/hd1080/000/fff/image.jpg&text=☆☆☆ STARS,E:\s\6.jpg,GET,,,,,,
trying to have the stars in the url which works fine in a normal browser:
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Dec 05, 2016 9:15 am
Hi,
First you need the ? character before text, not & which is for subsequent parameters.
You also need to URL encode the data. This works:
Code: Select all
Let>URL=https://dummyimage.com/hd1080/000/fff/image.jpg?text=%E2%98%86%E2%98%86%E2%98%86%20STARS
HTTPRequest>URL,%SCRIPT_DIR%\t2.jpg,GET,,hres
I used the encoder/decoder here:
http://meyerweb.com/eric/tools/dencoder/
If you don't know what the data will be at runtime, there's a URL encoding function you can use here:
viewtopic.php?f=2&t=9260