Trouble Passing Variable into IMG Tag

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
jdombeck
Posts: 2
Joined: Wed Jun 05, 2019 3:22 pm

Trouble Passing Variable into IMG Tag

Post by jdombeck » Wed Jun 05, 2019 3:42 pm

I am trying to automate via python the following type of tag:

TAG POS=1 TYPE=IMG ATTR=SRC:https://www.url.com/resize/Images/Image ... g?40269856

by passing the string "imageid" into the macro and using:

TAG POS=1 TYPE=IMG ATTR=SRC:https://www.url.com/resize/Images/Image ... ?{{imageid}}

However, the {{imageid}} construction is not being substituted by the passed-in string. This has worked well for me in tags like TAG POS=1 TYPE=SPAN ATTR=TXT:{{variable}}, but I cannot seem to get it to work in this case. Any tricks or tips here?

Thanks!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Trouble Passing Variable into IMG Tag

Post by chivracq » Wed Jun 05, 2019 3:51 pm

jdombeck wrote:
Wed Jun 05, 2019 3:42 pm
I am trying to automate via python the following type of tag:

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:https://www.url.com/resize/Images/ImageStore_4000x800-2.png?40269856
by passing the string "imageid" into the macro and using:

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:https://www.url.com/resize/Images/ImageStore_4000x800-2.png?{{imageid}}
However, the {{imageid}} construction is not being substituted by the passed-in string. This has worked well for me in tags like TAG POS=1 TYPE=SPAN ATTR=TXT:{{variable}}, but I cannot seem to get it to work in this case. Any tricks or tips here?

Thanks!
CIM...! :mrgreen: (Read my Sig...)

+ Can you post your (simplified) '.py' Script how you build/launch your Macro and pass your Var...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply